siderolabs / sidero

Sidero Metal is a bare metal provisioning system with support for Kubernetes Cluster API.
https://www.sidero.dev
Mozilla Public License 2.0
410 stars 64 forks source link

Provide a way to make single node clusters schedulable #1219

Closed lieberlois closed 1 year ago

lieberlois commented 1 year ago

By default, sidero provisioned control plane nodes will have the NoSchedule taint. In the documentation, I have found nothing to reconfigure that. Its possible to configure that for Talos (https://www.talos.dev/v1.5/talos-guides/howto/workers-on-controlplane/) but I havent found anything regarding the sidero clusterapi provider.

smira commented 1 year ago

Just apply a config patch from the doc you referenced in Sidero Metal. Any Talos machine config change should be a config patch in Sidero/CAPI.

lieberlois commented 1 year ago

On what resource? 🤔 Would be great if this was added to the docs!

Like this?

apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: TalosControlPlane
metadata:
  name: cluster-0-cp
  namespace: default
spec:
  controlPlaneConfig:
    controlplane:
      generateType: controlplane
      talosVersion: v1.5.1
      configPatches:
        - op: replace
          path: /cluster/allowSchedulingOnControlPlanes
          value: true
  infrastructureTemplate:
    apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
    kind: MetalMachineTemplate
    name: cluster-0-cp
  replicas: 1
  version: v1.28.1
smira commented 1 year ago

yes, controlplane makes sense

lieberlois commented 1 year ago

So that configPatch should work?

configPatches:
    - op: replace
      path: /cluster/allowSchedulingOnControlPlanes
      value: true
smira commented 1 year ago

you can test config patches with talosctl gen config if you want to test it before applying offline