Skip to content

Commit

Permalink
Bump kustomize to v5.0.3 used by our current KC deployment and mo…
Browse files Browse the repository at this point in the history
…ve back to `patchesStrategicMerge` because of upstream bug + how we render kustomizations locally (#68)

When we render locally or on CI we append vaultless patches to
`patchesStrategicMerge` directly into Flux v2 app GS ksutomization. We
have to append there because of upstream bug in kustomize that it cannot
handle patch files with multiple documents and Flux still uses such a
version.

For provider specific kustomizations it worked fine, because the
vaultless patch was applied later. But if they are in the same file, it
seems `patchesStrategicMerge` is applied before `patches` which renders
an incorrect result.

We should keep these - and ones modifying the same resources - in
`patchesStrategicMerge` until Flux bumps to a `kustomize` version that
has the bug fix.
  • Loading branch information
uvegla committed Nov 13, 2023
1 parent f6313f7 commit 41ba708
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions bases/flux-app-v2/giantswarm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ patches:
- --enable-leader-election
- --storage-path=/data
- "--storage-adv-addr=source-controller.$(RUNTIME_NAMESPACE).svc"
- path: patch-pvc-psp.yaml
- path: patch-kustomize-controller.yaml
# Keeping this because of vaultless helper + upstream bug in kustomize to apply patch files with multiple documents
patchesStrategicMerge:
- patch-pvc-psp.yaml
- patch-kustomize-controller.yaml
resources:
- resource-namespace.yaml
- resource-rbac.yaml
Expand Down
2 changes: 1 addition & 1 deletion bases/tools/Makefile.custom.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check https://github.com/fluxcd/flux2/blob/main/.github/runners/prereq.sh if
# you're updating kustomize versions.
KUSTOMIZE := ./bin/kustomize
KUSTOMIZE_VERSION ?= v4.5.7
KUSTOMIZE_VERSION ?= v5.0.3

HELM := ./bin/helm

Expand Down

0 comments on commit 41ba708

Please sign in to comment.