-
Notifications
You must be signed in to change notification settings - Fork 70
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-13526: fix dynamic conversion webhook #490
OCPBUGS-13526: fix dynamic conversion webhook #490
Conversation
@perdasilva: This pull request references Jira Issue OCPBUGS-4991, which is invalid:
Comment 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 kubernetes/test-infra repository. |
@perdasilva: This pull request references Jira Issue OCPBUGS-13526, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: 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 kubernetes/test-infra repository. |
/retest |
/hold I start to pre-verify it. after it is done, will unhold it if it is ok. |
/unhold |
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.
Need to regenerate manifests. Other than that - looks good to me.
pkg/manifests/csv.yaml
Outdated
@@ -5,7 +5,7 @@ metadata: | |||
name: packageserver | |||
namespace: openshift-operator-lifecycle-manager | |||
labels: | |||
olm.version: 0.19.0 | |||
olm.version: 0.0.0-24bb499733c06e67583c59cfe6f7a42ec0a996a9 |
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.
@perdasilva this probably happened because you ran make manifests
which sets OLM_VERSION
to commit based versioning.
You need to run make verify-manifests
(or make verify
for everything) and commit changes. make verify-manifests
sets a static 0.19.0
version:
operator-framework-olm/Makefile
Lines 153 to 155 in b85e891
verify-manifests: OLM_VERSION=0.19.0 # set static version to avoid failing for commit based versioning | |
verify-manifests: manifests | |
$(MAKE) diff |
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.
Thank you!!!!
/retest |
1 similar comment
/retest |
/test verify |
/retest |
Signed-off-by: Tommy Hughes <[email protected]> Upstream-repository: operator-lifecycle-manager Upstream-commit: 858c7cdb2f4cfe3d351225972aede54e3b114ce4 Signed-off-by: perdasilva <[email protected]>
@perdasilva: all tests passed! 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. |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ankitathomas, perdasilva 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 |
@perdasilva: Jira Issue OCPBUGS-13526: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-13526 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 kubernetes/test-infra repository. |
/cherry-pick release-4.15 |
@perdasilva: new pull request could not be created: failed to create pull request against openshift/operator-framework-olm#release-4.15 from head openshift-cherrypick-robot:cherry-pick-490-to-release-4.15: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"No commits between openshift:release-4.15 and openshift-cherrypick-robot:cherry-pick-490-to-release-4.15"}],"documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-pull-request"} 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/test-infra repository. |
/cherry-pick release-4.14 |
@perdasilva: new pull request could not be created: failed to create pull request against openshift/operator-framework-olm#release-4.14 from head openshift-cherrypick-robot:cherry-pick-490-to-release-4.14: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"No commits between openshift:release-4.14 and openshift-cherrypick-robot:cherry-pick-490-to-release-4.14"}],"documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-pull-request"} 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/test-infra repository. |
/cherry-pick release-4.13 |
@perdasilva: new pull request created: #499 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/test-infra repository. |
operator-framework/operator-lifecycle-manager#2912
Signed-off-by: Tommy Hughes [email protected]
Description of the change:
With this change, relevant CRDs will properly retain dynamic conversion webhook settings in
crd.spec.conversion.webhook.clientConfig
.Motivation for the change:
Currently, during a fresh install of an operator with conversion webhooks enabled,
crd.spec.conversion.webhook.clientConfig
is dynamically updated initially, as expected, with the proper webhook ns, name, & caBundle. However, within a few seconds, those critical settings are overwritten with the bundle’s packaged CRD conversion settings. This breaks the operator and stops the installation from completing successfully.However, if that same operator version is installed as part of an upgrade from a prior release... the dynamic clientConfig settings are retained and all works as expected. This appears to be due to the differences in CSV
status.phase
progression.Testing remarks:
Steps to Reproduce:
Post-fix:
The
crd.spec.conversion.webhook.clientConfig
should instead retain the following settings.$ oc apply -f https://gist.githubusercontent.com/tchughesiv/0951d40f58f2f49306cc4061887e8860/raw/3c7979b58705ab3a9e008b45a4ed4abc3ef21c2b/conversionIssuesFreshInstall.yaml $ oc get crd dbaasproviders.dbaas.redhat.com --template '{{ .spec.conversion.webhook.clientConfig }}' map[caBundle:LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJoekNDQVMyZ0F3SUJBZ0lJZXdhVHNLS0hhbWd3Q2dZSUtvWkl6ajBFQXdJd0dERVdNQlFHQTFVRUNxxxxxxxxxxxxx service:map[name:dbaas-operator-controller-manager-service namespace:redhat-dbaas-operator path:/convert port:443]]
Additional info:
Oddly enough, currently if the operator is installed as an upgrade... instead of a fresh install... the webhook settings are properly/permanently set and everything works as expected. This can be tested in a fresh cluster like this.
$ oc apply -f https://gist.githubusercontent.com/tchughesiv/703109961f22ab379a45a401be0cf351/raw/2d0541b76876a468757269472e8e3a31b86b3c68/conversionWorksUpgrade.yaml $ oc get crd dbaasproviders.dbaas.redhat.com --template '{{ .spec.conversion.webhook.clientConfig }}' -w
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 858c7cdb2f4cfe3d351225972aede54e3b114ce4