aws-controllers-k8s / community

AWS Controllers for Kubernetes (ACK) is a project enabling you to manage AWS services from Kubernetes
https://aws-controllers-k8s.github.io/community/
Apache License 2.0
2.41k stars 254 forks source link

Immutable fields in Spec #739

Closed nmvk closed 3 years ago

nmvk commented 3 years ago

Is your feature request related to a problem? Currently many APIs have fields which are valid during creation but cannot be modified later. This can potentially create confusion as the resource would not be updated.

Example -

https://docs.aws.amazon.com/cli/latest/reference/elasticache/create-replication-group.html

In this ElastiCache API, --transit-encryption-enabled , --at-rest-encryption-enabled are currently immutable.

Describe the solution you'd like Validate if an immutable spec field is modified, then set appropriate condition.

Describe alternatives you've considered Webhook to validate the immutable fields.

a-hilaly commented 3 years ago

I believe this is done in https://github.com/aws-controllers-k8s/code-generator/pull/77 and https://github.com/aws-controllers-k8s/runtime/pull/17.

/close