cluster-api-provider-aws icon indicating copy to clipboard operation
cluster-api-provider-aws copied to clipboard

I can't change some resources, Immutability error

Open your-ko opened this issue 1 year ago • 4 comments
trafficstars

/kind bug

What steps did you take and what happened:

I created a cluster with a node pool and a few nodes in it by using AWSManagedMachinePool and MachinePool. After that, I changed the disk size in the node pool. I got an error:

one or more objects failed to apply, reason: error when patching "/dev/shm/1327104644": admission webhook "validation.awsmanagedmachinepool.infrastructure.cluster.x-k8s.io" denied the request: AWSManagedMachinePool.infrastructure.cluster.x-k8s.io "prov-node-pool" is invalid: spec.diskSize: Invalid value: 50: field is immutable.

What did you expect to happen: I would expect that either disk size would be just increased. Or the nodes in the node pool will be rolled out with the new disk size.

Anything else you would like to add: Actually almost the same error happen when I try, for example, to rename the node pool:

error when patching "/dev/shm/178698734": admission webhook "validation.awsmanagedmachinepool.infrastructure.cluster.x-k8s.io" denied the request: AWSManagedMachinePool.infrastructure.cluster.x-k8s.io "prov-node-pool" is invalid: spec.eksNodegroupName: Invalid value: "prov-node-pool": field is immutable

So I see that some fields (tags, node pool min/max size) can be changed, and some fields are immutable, so I can't modify them. Unless I delete them manually and create new ones

Environment:

  • Cluster-api-provider-aws version: 2.5.2
  • Cluster-api-operator version: 0.11.0
  • Kubernetes version: (use kubectl version): 1.29

your-ko avatar Jul 02 '24 15:07 your-ko