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

🐛 fix: separate control plane logging and vpc config updates

Open ianedwards opened this issue 1 year ago • 10 comments
trafficstars

What type of PR is this? /kind bug

What this PR does / why we need it:

EKS does not allow for both a VPC config update and a logging update in the same API call. If both of these changes are applied to the spec at once, then the AWSManagedControlPlane will fail to reconcile.

Addresses the restriction in the EKS API by separating logging and vpc config updates into two separate steps.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #3553

Special notes for your reviewer:

Checklist:

  • [ ] squashed commits
  • [ ] includes documentation
  • [X] includes emojis
  • [ ] adds unit tests
  • [ ] adds or updates e2e tests

Release note:

Separate Control Plane logging and VPC Config updates to ensure both can be applied

ianedwards avatar Apr 10 '24 16:04 ianedwards

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: ianedwards (50b90cf68ca0f666c94ec592fbe4fee1b3db5a9e)

Welcome @ianedwards!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-aws 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-aws has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Apr 10 '24 16:04 k8s-ci-robot

Hi @ianedwards. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Apr 10 '24 16:04 k8s-ci-robot

/ok-to-test

damdo avatar Apr 12 '24 14:04 damdo

/test ?

nrb avatar Apr 22 '24 19:04 nrb

@nrb: The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-aws-build
  • /test pull-cluster-api-provider-aws-build-docker
  • /test pull-cluster-api-provider-aws-test
  • /test pull-cluster-api-provider-aws-verify

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-aws-apidiff-main
  • /test pull-cluster-api-provider-aws-e2e
  • /test pull-cluster-api-provider-aws-e2e-blocking
  • /test pull-cluster-api-provider-aws-e2e-clusterclass
  • /test pull-cluster-api-provider-aws-e2e-conformance
  • /test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-aws-e2e-eks
  • /test pull-cluster-api-provider-aws-e2e-eks-gc
  • /test pull-cluster-api-provider-aws-e2e-eks-testing

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-aws-apidiff-main
  • pull-cluster-api-provider-aws-build
  • pull-cluster-api-provider-aws-build-docker
  • pull-cluster-api-provider-aws-test
  • pull-cluster-api-provider-aws-verify

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Apr 22 '24 19:04 k8s-ci-robot

/test pull-cluster-api-provider-aws-e2e-eks /test pull-cluster-api-provider-aws-e2e-eks-gc /test pull-cluster-api-provider-aws-e2e-eks-testing

nrb avatar Apr 22 '24 19:04 nrb

e2e tests passed

richardcase avatar Apr 23 '24 13:04 richardcase

Thanks for this @ianedwards .

When an update to the logging occurs does the status of the cluster change to "updating"?

richardcase avatar Apr 23 '24 13:04 richardcase

Thanks for this @ianedwards .

When an update to the logging occurs does the status of the cluster change to "updating"?

Hey @richardcase Apologies for the delay. Updating logging for a cluster in EKS does in fact cause it to go into an "Updating" status. Let me know if there's any additional clarification I can provide here.

ianedwards avatar May 29 '24 20:05 ianedwards

It looks like the ekscontrolplanev1.EKSControlPlaneUpdatingCondition is set as true, rather than cluster.Status. However, based on the setStatus function, I think this is correct.

After an update is applied, clusterStatus == eks.ClusterActive && conditions.IsTrue(scope.ControlPlane, ekscontrolplanev1.EKSControlPlaneUpdatingCondition). Then, on the next reconcile, EKSControlPlaneUpdatingCondition will be marked back to false when setStatus is called again.

This function also matches reconcileClusterVersion, so I'm content to approve this.

/lgtm /approve

nrb avatar May 29 '24 21:05 nrb

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nrb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar May 29 '24 21:05 k8s-ci-robot

/area provider/eks

nrb avatar May 29 '24 21:05 nrb