-
Notifications
You must be signed in to change notification settings - Fork 578
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
AWSClusterSpec's "ControlPlaneLoadBalancer" field should be mutable #1754
Comments
Related to the update attempts I described earlier, if I attempt to create an AWSCluster object specifying the "spec.controlPlaneLoadBalancer" field with a value of
|
Maybe that's coming from something inherent in CRDv1, have seen some odd stuff on vsphere too, but it's a weird error message for sure. Not sure it's the webhook's causing it, but it could be. To the mutability question then, we can scope this down to relaxing constraint to allow cross-zone AZ support being toggaaalable? |
Yes, that would be good. It would help too, though, if we were more tolerant of going from no mention of this "ControlPlaneLoadBalancer" to the presence of the field with values that match the existing values. In other words, if we were able to compare the submitted value against the current value with defaults taken into account. You can see above that I wasn't even able to submit an updated manifest that would match the effective values of these fields, because I was specifying values that match the default values. Likewise, if we had specified these fields with values that match the defaults, and then we remove the fields from our manifests, ideally we'd accept that update, because it induces no need for reconciling a change in intended state. |
We decided to make many fields immutable when the current implementation wasn't handling mutations correctly. There was discussion of this in #1673. I think we are amenable to changing these when the controllers become capable of managing updates. |
/milestone v0.5.x |
/assign |
/lifecycle active |
/kind bug
What steps did you take and what happened:
Create a CAPA cluster using the default settings. Observe that the API servers are fronted by a Classic ELB using the "Internet-facing" scheme, with cross-zone load balancing disabled.
Edit the Kubernetes manifest for the AWSCluster object, adding a "controlPlaneLoadBalancer" field (be it in JSON or YAML), with its "crossZoneLoadBalancing" field set to
true
.Apply the changes to the API server, and observe that it rejects the attempt, complaining that the "spec.controlPlaneLoadBalancer [...] field is immutable". Note, though, that no matter what I specify here—even for cases where it should match the current configuration once parsed—the API server rejects it. Here are some candidate updates:
Observe that the field doesn't appear to be set on the existing Kubernetes object:
This is the only mention of the "controlPlaneLoadBalancer" field that the API server accepts:
What did you expect to happen:
The CAPA controllers would reconfigure the load balancer to allow cross-zone load balancing. At minimum, I'd expect it to accept specified values that match the current values (after defaults are applied).
Anything else you would like to add:
PR #1677 introduced the validation that rejects all mutation of the
AWSCluster.Spec.ControlPlaneLoadBalancer
field. That may have been in the interest of safety, if there is not yet any way to reconcile these changes to the fields. @benmoss, do you recall this one?As far as I can tell, it's not possible to change the scheme of a Classic ELB after it's created, but it is possible to change its cross-zone load balancing setting (via the aws tool, or the API with this attribute).
Environment:
v0.5.4
kubectl version
):/etc/os-release
):This is a kind cluster running on macOS.
The text was updated successfully, but these errors were encountered: