appuio / component-openshift4-nodes

Commodore Component: OpenShift 4 Machine Management
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Ignore .spec.state of ControlPlaneMachineSet #84

Closed DebakelOrakel closed 4 months ago

DebakelOrakel commented 4 months ago

Checklist

simu commented 4 months ago

Why ignore this instead of configuring it properly via hierarchy?

DebakelOrakel commented 4 months ago

Yeah It might makes sense to just set it to Active, sadly it can't be changed bc it is immutable :D https://github.com/appuio/component-openshift4-nodes/pull/82#discussion_r1644008591

On the other hand it might make sense to leave it as Inactive as most of the fields are immutable as long as it is set to Active. Otherwise it might be very hard to manage the machineset, pausing ArgoCD etc.

simu commented 4 months ago

The following config (e.g. in a cluster file in a tenant repo) seems to set spec.state=Active just fine in the catalog repo:

  openshift4_nodes:
    nodeGroups:
      master:
        replicas: 3
        spec:
          state: Active

As far as I'm aware the field in the resource isn't immutable, so I don't see a real reason to ignore diffs for it.

DebakelOrakel commented 4 months ago

I tested it and:

  openshift4_nodes:
    nodeGroups:
      master:
        replicas: 3
        state: 'Active'

does not change a thing, but thats probably due to incompetence on my side 🤦‍♂️

DebakelOrakel commented 4 months ago

As far as I'm aware the field in the resource isn't immutable, so I don't see a real reason to ignore diffs for it.

You are right, this only applies to vSphere specific parameters

simu commented 4 months ago

I tested it and:

  openshift4_nodes:
    nodeGroups:
      master:
        replicas: 3
        state: 'Active'

does not change a thing, but thats probably due to incompetence on my side 🤦‍♂️

Looks like you're missing a spec in there if you compare it to the snippet I posted