kubernetes-sigs / cluster-api-provider-aws

Kubernetes Cluster API Provider AWS provides consistent deployment and day 2 operations of "self-managed" and EKS Kubernetes clusters on AWS.
http://cluster-api-aws.sigs.k8s.io/
Apache License 2.0
636 stars 561 forks source link

I can't change some resources, Immutability error #5042

Open UryDanko opened 3 months ago

UryDanko commented 3 months ago

/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:

k8s-ci-robot commented 3 months ago

This issue is currently awaiting triage.

If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
k8s-triage-robot commented 3 days ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

UryDanko commented 3 days ago

/remove-lifecycle stale