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

Add release image validation for NodePools #1709

Merged

Conversation

enxebre
Copy link
Member

@enxebre enxebre commented Aug 29, 2022

What this PR does / why we need it:
Add release image validation for NodePools:

  • Move existing HC release image validation into support/ package.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
ref https://issues.redhat.com/browse/HOSTEDCP-543

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 29, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 29, 2022
@enxebre enxebre force-pushed the validate-nodepool-releaseimage branch from e5a7825 to acf9837 Compare August 29, 2022 14:25
@csrwng
Copy link
Contributor

csrwng commented Aug 29, 2022

@enxebre I think this is good, but for nodepools we can't just validate the release on its own. We need to validate it in relation to the HC version. My initial thought is that we should not allow creating a new nodepool to anything other than the HC release version. And when upgrading a nodepool we should only be able to upgrade it to the current HC version.

@enxebre
Copy link
Member Author

enxebre commented Aug 29, 2022

@enxebre I think this is good, but for nodepools we can't just validate the release on its own. We need to validate it in relation to the HC version. My initial thought is that we should not allow creating a new nodepool to anything other than the HC release version. And when upgrading a nodepool we should only be able to upgrade it to the current HC version.

I agree, the PR is already validating against the HC as the latest supported version https://github.com/openshift/hypershift/pull/1709/files#diff-c666a2a9dc48b0d3de33cc8fa3a054f853671f0428f9d56b263750dfc6d26e00R1360-R1365

@csrwng
Copy link
Contributor

csrwng commented Aug 29, 2022

I agree, the PR is already validating against the HC as the latest supported version https://github.com/openshift/hypershift/pull/1709/files#diff-c666a2a9dc48b0d3de33cc8fa3a054f853671f0428f9d56b263750dfc6d26e00R1360-R1365

But should we allow a version < HC's (on creation)?

@enxebre
Copy link
Member Author

enxebre commented Aug 30, 2022

But should we allow a version < HC's (on creation)?

We can not prevent creation of anything, i.e as soon as the resource is applied it's persisted, then in the backend we do the validation and short circuit reconciliation. In the reconciliation loop there's no means to differentiate between create/update (or may be we could you .generation?). The backend validating against hc.release as latest allowed and letting webhook/cli validate/default to hc.version for creation makes sense to me.

Did you have something different in mind for this?

@csrwng
Copy link
Contributor

csrwng commented Aug 30, 2022

As discussed earlier today, it's fine to proceed with this validation and separately enable the webhook to do a more fine grained validation.

@enxebre
Copy link
Member Author

enxebre commented Sep 5, 2022

/retest

@enxebre
Copy link
Member Author

enxebre commented Sep 20, 2022

/test e2e-aws

@enxebre enxebre force-pushed the validate-nodepool-releaseimage branch from acf9837 to 95d16af Compare September 26, 2022 09:35
@csrwng
Copy link
Contributor

csrwng commented Sep 26, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 26, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 26, 2022

@enxebre: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-nested acf9837 link true /test e2e-aws-nested
ci/prow/e2e-kubevirt-gcp-ovn acf9837 link false /test e2e-kubevirt-gcp-ovn
ci/prow/capi-provider-agent-sanity 95d16af link false /test capi-provider-agent-sanity

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 6678f08 into openshift:main Sep 26, 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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants