Skip to content

Commit

Permalink
Use patchesStrategicMerge for Kustomize patching
Browse files Browse the repository at this point in the history
Drop for legacy patches was dropped [1] in `sigs.k8s.io/kustomize/api`
`v0.13.0`, causing Fleet acceptance tests for Kustomize examples to
fail.

[1]: https://github.com/kubernetes-sigs/kustomize/releases/tag/api%2Fv0.13.0
  • Loading branch information
weyfonk committed Oct 3, 2023
1 parent 23790ca commit 86f321d
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
patches:
patchesStrategicMerge:
- redis-slave-deployment.yaml
- redis-slave-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
patches:
patchesStrategicMerge:
- frontend-deployment.yaml
- frontend-service.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
patches:
patchesStrategicMerge:
- frontend-deployment.yaml
2 changes: 1 addition & 1 deletion multi-cluster/kustomize/overlays/dev/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resources:
- ../../base
patches:
patchesStrategicMerge:
- redis-slave-deployment.yaml
- redis-slave-service.yaml
2 changes: 1 addition & 1 deletion multi-cluster/kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resources:
- ../../base
patches:
patchesStrategicMerge:
- frontend-deployment.yaml
- frontend-service.yaml
2 changes: 1 addition & 1 deletion multi-cluster/kustomize/overlays/test/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resources:
- ../../base
patches:
patchesStrategicMerge:
- frontend-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
patches:
patchesStrategicMerge:
- redis-slave-deployment.yaml
- redis-slave-service.yaml
2 changes: 1 addition & 1 deletion single-cluster/kustomize/overlays/dev/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bases:
- ../../base
patches:
patchesStrategicMerge:
- redis-slave-deployment.yaml
- redis-slave-service.yaml
6 changes: 3 additions & 3 deletions tests/expected/multi-cluster/helm-kustomize/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ spec:
dir: overlays/prod
name: fleet.yaml
- content: |
patches:
patchesStrategicMerge:
- redis-slave-deployment.yaml
- redis-slave-service.yaml
name: overlays/dev/kustomization.yaml
Expand Down Expand Up @@ -269,7 +269,7 @@ spec:
type: LoadBalancer
name: overlays/prod/frontend-service.yaml
- content: |
patches:
patchesStrategicMerge:
- frontend-deployment.yaml
- frontend-service.yaml
name: overlays/prod/kustomization.yaml
Expand All @@ -282,7 +282,7 @@ spec:
replicas: 3
name: overlays/test/frontend-deployment.yaml
- content: |
patches:
patchesStrategicMerge:
- frontend-deployment.yaml
name: overlays/test/kustomization.yaml
targets:
Expand Down
6 changes: 3 additions & 3 deletions tests/expected/multi-cluster/kustomize/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ spec:
- content: |
resources:
- ../../base
patches:
patchesStrategicMerge:
- redis-slave-deployment.yaml
- redis-slave-service.yaml
name: overlays/dev/kustomization.yaml
Expand Down Expand Up @@ -259,7 +259,7 @@ spec:
- content: |
resources:
- ../../base
patches:
patchesStrategicMerge:
- frontend-deployment.yaml
- frontend-service.yaml
name: overlays/prod/kustomization.yaml
Expand All @@ -274,7 +274,7 @@ spec:
- content: |
resources:
- ../../base
patches:
patchesStrategicMerge:
- frontend-deployment.yaml
name: overlays/test/kustomization.yaml
targets:
Expand Down
2 changes: 1 addition & 1 deletion tests/expected/single-cluster/helm-kustomize/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ spec:
dir: overlays/dev
name: fleet.yaml
- content: |
patches:
patchesStrategicMerge:
- redis-slave-deployment.yaml
- redis-slave-service.yaml
name: overlays/dev/kustomization.yaml
Expand Down
2 changes: 1 addition & 1 deletion tests/expected/single-cluster/kustomize/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ spec:
- content: |
bases:
- ../../base
patches:
patchesStrategicMerge:
- redis-slave-deployment.yaml
- redis-slave-service.yaml
name: overlays/dev/kustomization.yaml
Expand Down

0 comments on commit 86f321d

Please sign in to comment.