-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp-with-overlay.yml
32 lines (27 loc) · 1003 Bytes
/
app-with-overlay.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! If you want to customize any aspect of the configuration that is not explicitly exposed via app.make(...),
#! you can use [overlay feature](https://github.com/k14s/ytt/blob/master/docs/lang-ref-ytt-overlay.md).
#! For example, below we have `updates()` to force SSL redirection for this particular app.
#@ load("@ytt:template", "template")
#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:library", "library")
#@ def config(port=80):
name: hello
port: #@ port
#@overlay/replace
container:
image: hashicorp/http-echo
args:
- #@ "-listen=:" + str(port)
- -text="hello!"
#@ end
#@ def updates():
#@overlay/match by=overlay.subset({"kind":"Ingress"})
---
metadata:
#@overlay/match missing_ok=True
annotations:
#@overlay/match missing_ok=True
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
#@ end
#@ app = library.get("github.com/vmware-tanzu/carvel-ytt-library-for-kubernetes/app").with_data_values(config())
--- #@ template.replace(overlay.apply(app.eval(), updates()))