-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 conversion webhook support #4346
Add conversion webhook support #4346
Conversation
internal/generate/clusterserviceversion/clusterserviceversion_updaters.go
Outdated
Show resolved
Hide resolved
.../generate/testdata/clusterserviceversions/output/with-ui-metadata.clusterserviceversion.yaml
Outdated
Show resolved
Hide resolved
internal/generate/clusterserviceversion/clusterserviceversion_updaters.go
Outdated
Show resolved
Hide resolved
internal/generate/clusterserviceversion/clusterserviceversion_updaters.go
Outdated
Show resolved
Hide resolved
internal/generate/clusterserviceversion/clusterserviceversion_updaters.go
Outdated
Show resolved
Hide resolved
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
@varshaprasad96 this is still in-flight, correct? |
Yes, this is still in my to-do list. Will pick this up and continue working on it. |
/remove-lifecycle stale |
@varshaprasad96: PR needs rebase. 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. |
5e06a9f
to
fe91bc1
Compare
internal/generate/clusterserviceversion/clusterserviceversion_updaters.go
Outdated
Show resolved
Hide resolved
fe91bc1
to
c1703c8
Compare
Blocked by kubernetes-sigs/kubebuilder#2176 |
...enerate/testdata/clusterserviceversions/output/memcached-operator.clusterserviceversion.yaml
Outdated
Show resolved
Hide resolved
5fd2045
to
1f9c5f4
Compare
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.
I'd like to see a test case where multiple CRDs use the same conversion webhook server.
key an eye on it, the kubebuilder book cronjob example always fails about the missing |
@qinggniq those were added in kubernetes-sigs/kubebuilder#2176 but not to the book tutorials. @varshaprasad96 would you mind doing that when you have a chance? |
@estroz Yes, using the latest source code build kubebuilder to create webhook will generate the right |
internal/generate/clusterserviceversion/clusterserviceversion_updaters_test.go
Outdated
Show resolved
Hide resolved
internal/generate/clusterserviceversion/clusterserviceversion_updaters.go
Outdated
Show resolved
Hide resolved
internal/generate/clusterserviceversion/clusterserviceversion_updaters.go
Outdated
Show resolved
Hide resolved
internal/generate/clusterserviceversion/clusterserviceversion_updaters.go
Outdated
Show resolved
Hide resolved
internal/generate/clusterserviceversion/clusterserviceversion_updaters.go
Outdated
Show resolved
Hide resolved
This PR adds the conversion webhook definition to csv. The csv generator includes the logic to verfiy if the {v1, v1beta1} crd has conversion clinet config defined. If so, it scaffolds the conversion wh configuration defails in the csv Signed-off-by: varshaprasad96 <varshaprasad96@gmail.com>
e29060d
to
b421be0
Compare
@varshaprasad96 you have to Aside: we may want to consider running generation targets within a golang container so env issues like this do not happen. |
Signed-off-by: varshaprasad96 <varshaprasad96@gmail.com>
b421be0
to
d789200
Compare
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
Description of the change:
This PR adds support to scaffold conversion webhook in CSV,
when CRDs include conversion webhookClientConfig.
Follow-up from: #3762
Co-authored-by: Eric Stroczynski ericstroczynski@gmail.com
Motivation for the change:
Support conversion webhook scaffold in SDK
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs