-
Notifications
You must be signed in to change notification settings - Fork 546
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-4991: Fix dynamic conversion webhook issue #2912
OCPBUGS-4991: Fix dynamic conversion webhook issue #2912
Conversation
Hi @tchughesiv. Thanks for your PR. I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
5ba593f
to
eb5d3ab
Compare
781357f
to
b4a96c1
Compare
@tchughesiv: 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. |
/jira refresh |
@tchughesiv: This pull request references Jira Issue OCPBUGS-4991, which is invalid:
Comment 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. |
/jira refresh |
@tchughesiv: This pull request references Jira Issue OCPBUGS-4991, 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: 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. |
@tchughesiv: This pull request references Jira Issue OCPBUGS-4991, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
@tchughesiv: This pull request references Jira Issue OCPBUGS-4991, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
@tchughesiv: This pull request references Jira Issue OCPBUGS-4991, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
@tchughesiv: This pull request references Jira Issue OCPBUGS-4991, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
it appears the failed tests are unrelated to these changes. the flaky one seems to be due to a known issue and minikube may just have to be re-run. how should we proceed? |
/ok-to-test |
@tchughesiv I've rebased your PR from this side ^^ |
f4e2f70
to
fe6c3e3
Compare
New changes are detected. LGTM label has been removed. |
fe6c3e3
to
70f66e4
Compare
@tchughesiv could I also ask you to add some tests? |
@perdasilva sorry, been sidetracked w/ other work. I'll prioritize this work |
d2e49a4
to
e831e88
Compare
@perdasilva @asmacdo ready for review |
I think changes look good, but I'm not adding lgtm just yet because I want to try and reproduce first. I tried to quickly reproduce today on a kind cluster and resolution failed. Looks like there is some dependency which I do not have in my catalog. I didn't have time to look deeper into it, but I'll come back to it on Monday. |
a8f873e
to
7d8e306
Compare
Signed-off-by: Tommy Hughes <tohughes@redhat.com>
ok, I've managed to verify the bug as per the description:
trying to verify the fix |
verified fix - lgtm! |
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 - double checked the bug and the fix
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: perdasilva, tchughesiv 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 |
@tchughesiv: Jira Issue OCPBUGS-4991: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-4991 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. |
Signed-off-by: Tommy Hughes tohughes@redhat.com
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
Reviewer Checklist
/doc
[FLAKE]
are truly flaky and have an issue