Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure control-planes are distributed to different ZONES #227

Open
mcbenjemaa opened this issue Oct 16, 2024 · 1 comment · May be fixed by #244
Open

Make sure control-planes are distributed to different ZONES #227

mcbenjemaa opened this issue Oct 16, 2024 · 1 comment · May be fixed by #244
Labels
enhancement New feature or request kind/feature Categorizes issue or PR as related to a new feature.

Comments

@mcbenjemaa
Copy link
Member

Describe the solution you'd like:
[A clear and concise description of what you want to happen.]

Currently, the KCP references an IONOSCloudMachine which defines a spec. availabilityZone.
The availability zone can be set to AUTO, which will let IONOS cloud decide.
But might the decision be not convenient for a HA setup

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

We need a way of distributing control-plane nodes to different zones.

Proposal

Add a new field spec. availabilityZones which is mutually exclusive with spec. availabilityZone.
Always spec. availabilityZone take precedence.

whenever spec. availabilityZones is set and machine type is CP, CAPIC needs to get the KCP machines and round robin the zones for each machine.

@mcbenjemaa mcbenjemaa added enhancement New feature or request kind/feature Categorizes issue or PR as related to a new feature. labels Oct 16, 2024
@mcbenjemaa
Copy link
Member Author

mcbenjemaa commented Dec 16, 2024

Proposal

the availabilityZone field is still taking effect.

kind: IonosCloudMachine
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
metadata:
  name: "test-control-plane"
spec:
    availabilityZone: AUTO
    datacenterID: <>
    numCores: 4
    memoryMB: 8192
      

if the User sets both availabilityZone and availabilityZones, the availabilityZone take precedence.

kind: IonosCloudMachine
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
metadata:
  name: "test-control-plane"
spec:
    availabilityZone: AUTO
    availabilityZones: ["ZONE_1", "ZONE_2", "ZONE_3"]
    datacenterID: <>
    numCores: 4
    memoryMB: 8192
      

Once the availabilityZones is set only.
The controller will check if this machine is a CP, and will distribute the zones for all CP machines,
and finally will set the selected availability zone to the field spec.availabilityZone

kind: IonosCloudMachine
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
metadata:
  name: "test-control-plane"
spec:
    availabilityZones: ["ZONE_1", "ZONE_2", "ZONE_3"]
    datacenterID: <>
    numCores: 4
    memoryMB: 8192
      

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
1 participant