Skip to content

[feat] 1.76 ensure conversion hooks#783

Merged
ldmonster merged 1 commit into
release-1.21from
feat/1.76-ensure-hooks
Jun 29, 2026
Merged

[feat] 1.76 ensure conversion hooks#783
ldmonster merged 1 commit into
release-1.21from
feat/1.76-ensure-hooks

Conversation

@ipaqsa

@ipaqsa ipaqsa commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Overview

Adds a new ModuleEnsureHooks converge task that applies a module's ConversionWebhook resources to the cluster before the main helm release, so the release can adopt them.

What this PR does / why we need it

CRD conversion webhooks must exist in the cluster before custom resources are applied. This PR renders a module's templates, extracts the ConversionWebhook manifests, and applies them ahead of the helm install.

  • HelmModule.RenderConversionWebhooks — renders the chart, splits the YAML, and returns only ConversionWebhook manifests.
  • ModuleManager.EnsureConversionWebhooks — applies those manifests via KubeObjectPatcher (CreateOrUpdate); no-op for non-helm modules or modules without webhooks.
  • New ModuleEnsureHooks task, queued for every enabled module right after ModuleEnsureCRDs (before ModuleRun).
  • Cheap static gate (ConversionWebhookExist, computed at module load) so only modules whose templates contain a ConversionWebhook are rendered.

Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
@ipaqsa ipaqsa requested a review from ldmonster June 24, 2026 18:47
@ipaqsa ipaqsa self-assigned this Jun 24, 2026
@ipaqsa ipaqsa added enhancement New feature or request go Pull requests that update Go code release-note/enhancement New feature or request release-note/new-feature Something worth to be mentioned labels Jun 24, 2026
@ipaqsa ipaqsa changed the title [feat] ensure hooks [feat] 1.76 ensure conversion hooks Jun 24, 2026
@ldmonster ldmonster merged commit 04ede3b into release-1.21 Jun 29, 2026
17 of 18 checks passed
@ldmonster ldmonster deleted the feat/1.76-ensure-hooks branch June 29, 2026 11:12
Fkuloff pushed a commit that referenced this pull request Jul 7, 2026
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
(cherry picked from commit 04ede3b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update Go code release-note/enhancement New feature or request release-note/new-feature Something worth to be mentioned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants