Skip to content

[Multi_K8s-Plugin] Add per-target kustomizeVersion and kustomizeOptions#6749

Merged
Warashi merged 7 commits into
pipe-cd:masterfrom
mohammedfirdouss:feat/multicluster-per-target-kustomize-overrides
May 24, 2026
Merged

[Multi_K8s-Plugin] Add per-target kustomizeVersion and kustomizeOptions#6749
Warashi merged 7 commits into
pipe-cd:masterfrom
mohammedfirdouss:feat/multicluster-per-target-kustomize-overrides

Conversation

@mohammedfirdouss

@mohammedfirdouss mohammedfirdouss commented May 7, 2026

Copy link
Copy Markdown
Contributor

What this PR does / Why we need it:

Adds kustomizeVersion and kustomizeOptions as per-target overrides inside each multiTargets entry in KubernetesMultiTarget, bringing the config schema closer to the RFC-0014 spec.

Previously, kustomizeVersion and kustomizeOptions were only available at the top-level spec.input, meaning all targets had to share the same kustomize version and options. This is a problem when deploying to clusters with different kustomize version requirements or different per-cluster flags (e.g. load-restrictor).

With this change, users can override these per target:

input:
  multiTargets:
    - target:
        name: cluster-hoge
      kustomizeVersion: "5.4.3"
      kustomizeOptions:
        load-restrictor: "LoadRestrictionsNone"
    - target:
        name: cluster-fuga
      kustomizeVersion: "5.3.0"

The override logic follows the same pattern already used for manifests in loadManifests: the per-target value is used when non-empty, otherwise the top-level spec.input value is used.

Which issue(s) this PR fixes:

Part of #6446

How was this tested:

Unit tests added to deployment/load_manifests_test.go using a capturing mock loader that records the LoaderInput passed to it, covering:

  • Top-level values used when multiTarget has none
  • Per-target version overrides top-level version
  • Per-target options override top-level options
  • Both version and options overridden together
  • nil multiTarget falls back to top-level values

Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
@mohammedfirdouss mohammedfirdouss force-pushed the feat/multicluster-per-target-kustomize-overrides branch from 29b8d04 to 740f3e3 Compare May 9, 2026 22:10

@Warashi Warashi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Warashi Warashi merged commit 7c1a0d2 into pipe-cd:master May 24, 2026
45 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for contributing to PipeCD! The changes in this pull request will be part of the upcoming release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants