-
Notifications
You must be signed in to change notification settings - Fork 33
Create a validation webhook #348
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
Create a validation webhook #348
Conversation
Hi @erusso7. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
✅ Deploy Preview for kubernetes-sigs-kmm ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
263bc79
to
b086628
Compare
ddcdbb4
to
9384427
Compare
c68febc
to
0f89b04
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 think we should also declare a dependency on cert-manager.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #348 +/- ##
==========================================
+ Coverage 82.84% 83.10% +0.25%
==========================================
Files 27 30 +3
Lines 2816 2882 +66
==========================================
+ Hits 2333 2395 +62
- Misses 392 396 +4
Partials 91 91
... and 4 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
b569508
to
07415db
Compare
.github/workflows/e2e.yaml
Outdated
- name: Install cert-manager | ||
run: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml | ||
|
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.
This is breaking make deploy
or kubectl apply -k https://github.com/kubernetes-sigs/kernel-module-management/config/default.
I am tryin to make a local copy of https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml inside config/certmanager
instead
@qbarrand thoughts?
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 have created 2 PRs to make sure we are not missing such changes in the future:
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.
Also, don't we need to install cert-manager
and the validation webhook in manager-hub
as well?
We can open an issue about it and do it in a later PR though.
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.
We may need to use kubernetes-sigs/kustomize#4708 (comment)
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 tried to extract the installation of certmanager
(not the Certificate
nor the Issuer
but `certmanager itself) to another PR that should be used as a base for this PR IMO.
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.
@ybettan I think we should not add the 5000 lines of YAML for cert-manager. Instead:
- if users are installing with
kubectl apply -k
, then we should document that they need to runkubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml
beforehand; - is users are installing from the OLM bundle, then we could specify that cert-manager is a dependency.
With regards to validating ManagedClusterModule
in the Hub context, I would address that in a separate PR.
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.
Updated PR for installing cert-manager
that install it from https directly instead of coping all the manifests.
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.
@erusso7 Can you please rebase the PR on the new main
branch?
48e5f28
to
417dc64
Compare
417dc64
to
e611b12
Compare
@erusso7: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
e611b12
to
07f0bb3
Compare
07f0bb3
to
0c18014
Compare
I don't know how this happened:
|
/retest |
- Scaffolding using the operator-sdk - Adapted the code just enabling Validation webhooks for Create and Update verbs. - Implement custom logic that validates the module's specs. Signed-off-by: Erusso7 <[email protected]>
/retest |
0c18014
to
096a965
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: erusso7, qbarrand 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 |
kubernetes-sigs#348) This change adds the implementation of the ManagedClusterModuleStatus. The latter reflects the number of desired, applied and degraded ManifestWork CRs owned by the respective ManagedClusterModule CR. Signed-off-by: Michail Resvanis <[email protected]> Upstream-Commit: 2a12408 Signed-off-by: Michail Resvanis <[email protected]> Co-authored-by: Michail Resvanis <[email protected]>
Job done:
operator-sdk
to enable the webhook for the operator.Create
andUpdate
webhookPending to do: