Skip to content

feat: add werf deploy-dependency on controller to ValidatingWebhookConfiguration#203

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

feat: add werf deploy-dependency on controller to ValidatingWebhookConfiguration#203
duckhawk merged 1 commit into
mainfrom
feat/webhook-deploy-dependency

Conversation

@duckhawk

@duckhawk duckhawk commented Jul 8, 2026

Copy link
Copy Markdown
Member

What

Add a werf.io/deploy-dependency-controller annotation to the ValidatingWebhookConfiguration generated by helm_lib_module_validating_webhook_configuration.

Why

The generated ValidatingWebhookConfiguration points at the webhook-serving controller Service but had no ordering guarantee. During a rollout werf could apply the webhook configuration before the controller Deployment became Ready, so any resource matching the webhook rules (e.g. StorageClass create/update) would fail admission until the backend came up.

With the annotation, werf deploys the ValidatingWebhookConfiguration only after the controller Deployment reaches the Ready state.

Changes

  • _module_controller.tpl: add werf.io/deploy-dependency-controller: state=ready,kind=Deployment,name=<controllerName>,namespace=d8-<chart> to the webhook configuration metadata. New optional controllerName config parameter (default: controller, matching the default fullname of helm_lib_module_controller_manifests).
  • Chart.yaml: bump chart version 1.72.7 -> 1.72.8.
  • Tests: assert the default annotation and a custom controllerName override.

Testing

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

…nfiguration

The generated ValidatingWebhookConfiguration referenced the webhook-serving
controller Service without any ordering guarantee, so werf could apply it
before the controller Deployment was ready — causing admission failures for
matching resources during rollout.

Add a werf.io/deploy-dependency-controller annotation so the webhook
configuration is deployed only after the controller Deployment is Ready.
The controller Deployment name is configurable via the new controllerName
config parameter (default: "controller").

Bump chart version to 1.72.8.

Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
@duckhawk duckhawk merged commit f37d196 into main Jul 8, 2026
4 checks passed
@duckhawk duckhawk deleted the feat/webhook-deploy-dependency branch July 8, 2026 15:43
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