Skip to content

Commit

Permalink
Merge pull request #16 from kustomize-everything/highb-new-patch-syntax
Browse files Browse the repository at this point in the history
New patch syntax
  • Loading branch information
highb committed Aug 2, 2023
2 parents dea32c8 + fad5cec commit 6e73eed
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 26 deletions.
6 changes: 6 additions & 0 deletions env/dev/ingress-dev-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- op: replace
path: /spec/rules/0/host
value: guestbook-dev.demo.kustomize-everything.io
- op: replace
path: /spec/tls/0/hosts/0
value: guestbook-dev.demo.kustomize-everything.io
15 changes: 5 additions & 10 deletions env/dev/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ resources:
patchesStrategicMerge:
- guestbook-debug.yaml

patchesJson6902:
- target:
version: v1
patches:
- path: ingress-dev-patch.yaml
target:
group: networking.k8s.io
kind: Ingress
name: guestbook
patch: |-
- op: replace
path: /spec/rules/0/host
value: guestbook-dev.demo.kustomize-everything.io
- op: replace
path: /spec/tls/0/hosts/0
value: guestbook-dev.demo.kustomize-everything.io
version: v1

6 changes: 6 additions & 0 deletions env/prod/ingress-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- op: replace
path: /spec/rules/0/host
value: guestbook.demo.kustomize-everything.io
- op: replace
path: /spec/tls/0/hosts/0
value: guestbook.demo.kustomize-everything.io
11 changes: 3 additions & 8 deletions env/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@ kind: Kustomization
resources:
- ../../base

patchesJson6902:
- patch: |-
- op: replace
path: /spec/rules/0/host
value: guestbook.demo.kustomize-everything.io
- op: replace
path: /spec/tls/0/hosts/0
value: guestbook.demo.kustomize-everything.io
patches:
- path: ingress-patch.yaml
target:
group: networking.k8s.io
kind: Ingress
Expand All @@ -21,3 +15,4 @@ patchesJson6902:
images:
- name: ghcr.io/kustomize-everything/guestbook
newTag: 00027-d0d1e6a

6 changes: 6 additions & 0 deletions env/stage/ingress-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- op: replace
path: /spec/rules/0/host
value: guestbook-stage.demo.kustomize-everything.io
- op: replace
path: /spec/tls/0/hosts/0
value: guestbook-stage.demo.kustomize-everything.io
10 changes: 2 additions & 8 deletions env/stage/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@ kind: Kustomization
resources:
- ../../base

patchesJson6902:
- patch: |-
- op: replace
path: /spec/rules/0/host
value: guestbook-stage.demo.kustomize-everything.io
- op: replace
path: /spec/tls/0/hosts/0
value: guestbook-stage.demo.kustomize-everything.io
patches:
- path: ingress-patch.yaml
target:
group: networking.k8s.io
kind: Ingress
Expand Down

0 comments on commit 6e73eed

Please sign in to comment.