Skip to content

feat(config): add webhook as kustomize component#122

Open
AvineshTripathi wants to merge 3 commits intokubernetes-sigs:mainfrom
AvineshTripathi:feat/webhook-config
Open

feat(config): add webhook as kustomize component#122
AvineshTripathi wants to merge 3 commits intokubernetes-sigs:mainfrom
AvineshTripathi:feat/webhook-config

Conversation

@AvineshTripathi
Copy link
Contributor

@AvineshTripathi AvineshTripathi commented Feb 7, 2026

Description

This PR converts the webhook config to a component like metrics and cert-manager and enables it. It also removes dependency of service monitor from the controller.

NOTE: webhooks require TLS, so cert manager crds installation is mandatory and ENABLE_TLS needs to be true.

Related Issue

Testing

Checklist

  • make test passes
  • make lint passes

Signed-off-by: AvineshTripathi <avineshtripathi1@gmail.com>
@netlify
Copy link

netlify bot commented Feb 7, 2026

Deploy Preview for node-readiness-controller canceled.

Name Link
🔨 Latest commit 3630fda
🔍 Latest deploy log https://app.netlify.com/projects/node-readiness-controller/deploys/6993ff7615727d00082a07e6

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AvineshTripathi
Once this PR has been reviewed and has the lgtm label, please assign dchen1107 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 7, 2026
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 7, 2026
@k8s-ci-robot
Copy link
Contributor

Hi @AvineshTripathi. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 7, 2026
name: validating-webhook-configuration
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
cert-manager.io/inject-ca-from: nrr-system/nrr-serving-cert
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a reason these values are hardcoded here: they were previously populated using vars. However, vars is now deprecated (kubernetes-sigs/kustomize#5046
), and we should move to using replacements. When running Kustomize, it also throws the following warning indicating this deprecation.

# Warning: 'vars' is deprecated. Please use 'replacements' instead. [EXPERIMENTAL] Run 'kustomize edit fix' to update your Kustomization automatically.

If we switch to replacements, we run into a dependency issue. Both the webhook and metrics services need these replacements, but they are individual components and may or may not be deployed together. Because of this, we cannot keep the replacements in config/default. Placing them in individual components also does not work, as it fails to populate the nrr- prefix in the DNS names and annotations.

So I thought a better solution would be to hardcode it. Open for suggestions

Other places:

@ajaysundark
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 7, 2026
@ajaysundark ajaysundark requested review from Priyankasaggu11929 and ajaysundark and removed request for dchen1107 and haircommander February 7, 2026 23:59
@ajaysundark
Copy link
Contributor

@Priyankasaggu11929 had interests in testing the validation webhook, could you find time for this review?

@Priyankasaggu11929
Copy link
Member

@Priyankasaggu11929 had interests in testing the validation webhook, could you find time for this review?

yes, let me test it over the coming week and get back.

@Priyankasaggu11929
Copy link
Member

One thing (and maybe not for the scope of this PR and can be handled in follow ups) -

How would we manage scheduling cert-manager deployments on a tainted worker node (infact all other componets too?)

The other PR #117 only handle injecting matching tolerations for daemonsets.

And I don't think we can upfront manually insert matching tolerations in our provided kustomization components yaml?
(Maybe we later create MAP Policy/Policy-binding scoped to just these components?)

Signed-off-by: AvineshTripathi <avineshtripathi1@gmail.com>
@Priyankasaggu11929
Copy link
Member

LGTM from my side. Thanks!

Signed-off-by: AvineshTripathi <avineshtripathi1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants