Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#451 from richardmarshall/kustomize…
Browse files Browse the repository at this point in the history
…-add-patch-command

Add subcommand for adding patches to the kustomization file
  • Loading branch information
k8s-ci-robot committed Apr 30, 2018
2 parents d0a3f12 + 129458d commit a6ce976
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions demos/springboot.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ spec:
value: prod
EOF
cat <<EOF >>$DEMO_HOME/kustomization.yaml
patches:
- patch.yaml
EOF
kustomize edit add patch patch.yaml
cat <<EOF >$DEMO_HOME/application-prod.properties
spring.jpa.hibernate.ddl-auto=update
Expand Down Expand Up @@ -304,16 +301,14 @@ include this patch.

<!-- @addPatch @test -->
```
mv $DEMO_HOME/kustomization.yaml $DEMO_HOME/tmp.yaml
sed '/patches:$/{N;s/- patch.yaml/- patch.yaml\n- memorylimit_patch.yaml\n- healthcheck_patch.yaml/}' \
$DEMO_HOME/tmp.yaml >& $DEMO_HOME/kustomization.yaml
kustomize edit add patch memorylimit_patch.yaml
kustomize edit add patch healthcheck_patch.yaml
```

`kustomization.yaml` should have patches field:

> ```
> patches
> patches:
> - patch.yaml
> - memorylimit_patch.yaml
> - healthcheck_patch.yaml
Expand Down

0 comments on commit a6ce976

Please sign in to comment.