-
Notifications
You must be signed in to change notification settings - Fork 29
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
OCPBUGS-33275: extramanifest configmaps validation update #521
OCPBUGS-33275: extramanifest configmaps validation update #521
Conversation
@Missxiaoguo: This pull request references Jira Issue OCPBUGS-33275, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (trwest@redhat.com), skipping review request. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work Angie, thanks
dropped some minor comments below, mainly related to code style guidelines
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tiny comments! But lgtm otherwise
f0c8263
to
7726893
Compare
/retest-required |
/lgtm |
/lgtm |
Signed-off-by: Angie Wang <angwang@redhat.com>
7726893
to
a64e82f
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: donpenney 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 |
/test ibu-e2e-flow |
/override ci/prow/integration ci/prow/ibu-e2e-flow |
@donpenney: Overrode contexts on behalf of donpenney: ci/prow/ibu-e2e-flow, ci/prow/integration In response to this:
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-sigs/prow repository. |
/override ci/prow/ci-index |
@donpenney: Overrode contexts on behalf of donpenney: ci/prow/ci-index In response to this:
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-sigs/prow repository. |
@Missxiaoguo: Jira Issue OCPBUGS-33275: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-33275 has been moved to the MODIFIED state. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
Background / Context
LCA performs Kubernetes Dry-run to validate the manifests included in the extraManifests configmaps. Any invalid/webhook badRequest type of error returned from dry-run fails the Prep stage and blocks the upgrade.
Issue / Requirement / Reason for change
Kubernetes Dry-run sends requests to API server, where the server processes the request as if it were real, but without acutally making any modifications to the actual resources. As all API requests are single-resource requests, dryrun doesn't work for resources that depends on eariler resources that are not persisted in the cluster. For example, in a multi-object manifest that includes namespace A and resource A created within the namespace A. Running a dry-run on resource returns the namespace not found error.
The extra manifests are configurations intented to be applied to the new cluster version. Runing dry-run on the old version aims to thoroughly check for possible manifest error before upgrading. However, in cases where extramanifests configmaps contain the dependent resources, the Dry-run failure results in failed Prep, but the failure may be not the case for the new cluster version.
Solution / Feature Overview
Not only in the case of dependent resources, but there may also be other dry-run errors that occur only on the old cluster version. The dry-run validation should be a soft validation. The errors such as invalid or webhook badRequest type of error from dry-run are considered warnings. This also includes cases where CRDs are missing from the old version and dependent namespace does not exist on the old version but is also not found in the configmaps. The warnings do not block upgrade. Instead, the Prep status condition could be updated with a warning message and the failure details can be provided in an IBU annotation. The other type of errors such as random chars, missing resource Kind, resource ApiVersion, resource name or the presence of disallowed resource types, are treated as critical errors which will fail the Prep.
Implementation Details
Other Information
If user uses the ZTP/TALM to run IBU with extra manifests configmaps, the prep stage policy should include
message
check with "Prep stage completed successfully" which would prevent CGU to complete if there's validation warningLog error in the upgrade handler for the error that causes the upgrade to fail.
/cc @donpenney @pixelsoccupied @leo8a