Skip to content

Commit 439b168

Browse files
authored
Merge pull request #448 from fluxcd/fix-ssa
Fix SSA upstream bugs for Kubernetes < 1.22
2 parents 5144667 + 7282308 commit 439b168

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

controllers/kustomization_controller.go

+3
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,9 @@ func (r *KustomizationReconciler) apply(ctx context.Context, manager *ssa.Resour
651651
// sort by kind, validate and apply all the others objects
652652
sort.Sort(ssa.SortableUnstructureds(stageTwo))
653653
if len(stageTwo) > 0 {
654+
if err := ssa.SetNativeKindsDefaults(stageTwo); err != nil {
655+
return false, err
656+
}
654657
changeSet, err := manager.ApplyAll(ctx, stageTwo, kustomization.Spec.Force)
655658
if err != nil {
656659
return false, fmt.Errorf("%w\n%s", err, changeSetLog.String())

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/fluxcd/pkg/apis/kustomize v0.2.0
1313
github.com/fluxcd/pkg/apis/meta v0.10.1
1414
github.com/fluxcd/pkg/runtime v0.12.2
15-
github.com/fluxcd/pkg/ssa v0.0.2
15+
github.com/fluxcd/pkg/ssa v0.0.3
1616
github.com/fluxcd/pkg/testserver v0.1.0
1717
github.com/fluxcd/pkg/untar v0.1.0
1818
github.com/fluxcd/source-controller/api v0.16.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ github.com/fluxcd/pkg/apis/meta v0.10.1/go.mod h1:yUblM2vg+X8TE3A2VvJfdhkGmg+uqB
218218
github.com/fluxcd/pkg/runtime v0.12.0/go.mod h1:EyaTR2TOYcjL5U//C4yH3bt2tvTgIOSXpVRbWxUn/C4=
219219
github.com/fluxcd/pkg/runtime v0.12.2 h1:4iOpx2j/w15kNemDOnZrF6ugJ/rhSmRu7aI+xn23+BI=
220220
github.com/fluxcd/pkg/runtime v0.12.2/go.mod h1:tuWdqpWPhgjQvYrSnojdZ4plyU8DRU1NDzsfOhnzl2g=
221-
github.com/fluxcd/pkg/ssa v0.0.2 h1:ATIPgo7YxPfI2anLkBYDavbtTlpuvvHgqk8dKxthH4Y=
222-
github.com/fluxcd/pkg/ssa v0.0.2/go.mod h1:QisgqnXXnHKNfdnrpJ3wQrwuto111mvdNcKkfe9Cwvk=
221+
github.com/fluxcd/pkg/ssa v0.0.3 h1:5s/dZIaJGtI/46w5VRmr5sy/jNJGpxPnSad8oSzAbkc=
222+
github.com/fluxcd/pkg/ssa v0.0.3/go.mod h1:B/6V2gF3zq3P6EstM/qTmOEUf3YgOh1ybFfAAmG4Shw=
223223
github.com/fluxcd/pkg/testserver v0.1.0 h1:nOYgM1HYFZNNSUFykuWDmrsxj4jQxUCvmLHWOQeqmyA=
224224
github.com/fluxcd/pkg/testserver v0.1.0/go.mod h1:fvt8BHhXw6c1+CLw1QFZxcQprlcXzsrL4rzXaiGM+Iw=
225225
github.com/fluxcd/pkg/untar v0.1.0 h1:k97V/xV5hFrAkIkVPuv5AVhyxh1ZzzAKba/lbDfGo6o=

0 commit comments

Comments
 (0)