Skip to content
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

Relax the AWSManagedControlPlane version regex and remove normalising the version #3682

Merged

Conversation

Skarlso
Copy link
Contributor

@Skarlso Skarlso commented Aug 20, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

Removes the normalisation we perform for the version given to the AWSManagedControlPlane object. EKS requires a major.minor version format and we did that by truncating any given version and having a regex validation for the version being major.minor.

This, however, lead to us editing the spec and causing diff in applied / existing configs.

This PR attempts to remove this normalisation and relax the regex, so existing configurations don't break ( normally they would break, because we no longer truncate a given version ).

However, everywhere internally where we DO use the version for various things like creating a cluster, it should already be normalised.

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 #3594.

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 20, 2022
@k8s-ci-robot
Copy link
Contributor

@Skarlso: 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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 20, 2022
@Skarlso Skarlso changed the title Relax the AWSManagedControlPlane version regex and remove normalising… Relax the AWSManagedControlPlane version regex and remove normalising the version Aug 20, 2022
@Skarlso
Copy link
Contributor Author

Skarlso commented Aug 20, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Aug 20, 2022
@Skarlso
Copy link
Contributor Author

Skarlso commented Aug 20, 2022

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

@Ankitasw
Copy link
Member

Ankitasw commented Aug 22, 2022

/ok-to-test

@Skarlso Since you a member of kubernetes-sigs, there is no need for the ok-to-test label, your changes would be tested automatically.

@Skarlso
Copy link
Contributor Author

Skarlso commented Aug 22, 2022

@Ankitasw Ah! Okay, thank you! :) I thought it's always required. :D Cheers. :)

@richardcase
Copy link
Member

This will need to go into v1beta2 as its a change to the API (i.e. the format/validation).

Tagging in #2355 so that we know this is linked to api changes.

@richardcase
Copy link
Member

Although thinking about it the regex is backwards compatible so if someone already has v1.22 thats fine. And new clusters can additional use the v1.22.2 format.

@Skarlso
Copy link
Contributor Author

Skarlso commented Aug 22, 2022

Although thinking about it the regex is backwards compatible so if someone already has v1.22 thats fine. And new clusters can additional use the v1.22.2 format.

Yep :nod:.

@richardcase
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 23, 2022
@richardcase
Copy link
Member

I'll leave this to @sedefsavas to approve:

/assign sedefsavas

@richardcase
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 2, 2022
@k8s-ci-robot k8s-ci-robot merged commit 19b6440 into kubernetes-sigs:main Sep 2, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.x milestone Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

For EKS, CAPI truncates the version field in AWSManagedControlPlane spec after apply
5 participants