Skip to content

feat: also gate ValidatingWebhookConfiguration on webhook Service presence#204

Merged
duckhawk merged 1 commit into
mainfrom
feat/webhook-deploy-dependency-service
Jul 8, 2026
Merged

feat: also gate ValidatingWebhookConfiguration on webhook Service presence#204
duckhawk merged 1 commit into
mainfrom
feat/webhook-deploy-dependency-service

Conversation

@duckhawk

@duckhawk duckhawk commented Jul 8, 2026

Copy link
Copy Markdown
Member

What

Add a second werf.io/deploy-dependency-service annotation to the ValidatingWebhookConfiguration generated by helm_lib_module_validating_webhook_configuration, gating it on the webhook Service being present.

Why

Follow-up to #203. That change made the webhook configuration wait for the controller Deployment to become Ready, but werf could still apply the ValidatingWebhookConfiguration before the webhook Service existed. In that window admission requests have no routable backend behind clientConfig.service.

The configuration must be deployed only after both the controller Deployment is Ready and the webhook Service is present.

Changes

  • _module_controller.tpl: add werf.io/deploy-dependency-service: state=present,kind=Service,name=<serviceName>,namespace=d8-<chart> alongside the existing controller dependency. Uses the existing serviceName config parameter (default: webhooks).
  • Chart.yaml: bump chart version 1.72.8 -> 1.72.9.
  • Tests: assert the Service dependency annotation for both the default and custom serviceName.

Testing

helm unittest tests/ — 346 tests passed, 81 suites.

…sence

The ValidatingWebhookConfiguration already depended on the controller
Deployment being Ready, but werf could still apply it before the webhook
Service existed, leaving admission requests without a routable backend.

Add a werf.io/deploy-dependency-service annotation (state=present) referencing
the webhook Service (serviceName) so the configuration is deployed only after
both the controller Deployment is Ready and the Service is present.

Bump chart version to 1.72.9.

Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
@NikolayDemchuk NikolayDemchuk self-requested a review July 8, 2026 17:10
@duckhawk duckhawk merged commit 8fd6c14 into main Jul 8, 2026
4 checks passed
@duckhawk duckhawk deleted the feat/webhook-deploy-dependency-service branch July 8, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants