Last active
February 28, 2021 05:23
-
-
Save making/c193f52b9ab95f0440ddfe26b909953a to your computer and use it in GitHub Desktop.
Replica数を変数で指定したい
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: demo | |
name: demo | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: demo | |
template: | |
metadata: | |
labels: | |
app: demo | |
spec: | |
containers: | |
- image: ghcr.io/making/hello-tanzu | |
name: hello-tanzu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ load("@ytt:overlay", "overlay") | |
#@ load("@ytt:data", "data") | |
#@overlay/match by=overlay.subset({"kind":"Deployment", "metadata": {"name": "demo"}}) | |
--- | |
spec: | |
replicas: #@ data.values.demo.replicas |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@data/values | |
--- | |
demo: | |
replicas: 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment