This file contains 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") | |
--- | |
kind: Deployment | |
--- | |
kind: Service | |
--- | |
#@overlay/match by=overlay.subset({"kind": "Deployment"}) | |
#@overlay/match by=overlay.all, expects=2 |
This file contains 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") | |
#@overlay/match by=overlay.subset({"kind": "Deployment"}) | |
--- | |
spec: | |
template: | |
spec: | |
containers: | |
- name: redis | |
image: redis:5.0.4 |
This file contains 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: | |
name: frontend-deployment | |
labels: | |
app: frontend | |
spec: | |
replicas: 3 | |
selector: |
This file contains 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
#! add-namespace.yaml | |
#@ load("@ytt:overlay", "overlay") | |
#@overlay/match by=overlay.all, expects="1+" | |
--- | |
metadata: | |
#@overlay/match missing_ok=True | |
namespace: my-namespace |
This file contains 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
kind: Foo | |
spec: | |
github: | |
event1: | |
apple: 1 | |
event2: | |
banana: 2 | |
event3: | |
cherry: 3 | |
--- |
This file contains 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:yaml", "yaml") | |
#@ def edit_secret(name): | |
names: | |
defaultTLSCertificateSecret: #@ name | |
#@ end | |
#@overlay/match by=overlay.subset({"kind": "MyKind"}) | |
--- |
This file contains 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:data", "data") | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
labels: | |
app: nginx | |
spec: | |
replicas: 3 |
This file contains 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-schema | |
--- | |
#@schema/type any=True | |
other_keys: "" | |
#@schema/type any=True | |
test: {} |
This file contains 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:data", "data") | |
#@ load("@ytt:yaml", "yaml") | |
#@ load("@ytt:overlay", "overlay") | |
#@ def default_values(): | |
--- | |
item1: test | |
item2: test | |
#@ end |
This file contains 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:data", "data") | |
#@ load("@ytt:template", "template") | |
#@ load("@ytt:struct", "struct") | |
#@ def path_to_key(name, metric): | |
#@ return name.replace("/", "_") + "_" + metric | |
#@ end | |
#@ def config_headers(route, metric): | |
#@ return {path_to_key(route, metric): metric + "_defaulttemplate.json"} |