diff options
author | Vincent Ambo <tazjin@google.com> | 2019-12-20T22·14+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2019-12-20T22·14+0000 |
commit | a9f5c637071879eb1497c447b3caa10ff838b32e (patch) | |
tree | a3d6eee34155b3226bbad25fd43f7b485f9c0646 /ops/kontemplate/example/some-api | |
parent | 9885036eec80305fcd44b51a1878e7118282db78 (diff) | |
parent | 795a97466527a5f02e79e47b7fb316c78ffde667 (diff) |
merge(kontemplate): Integrate kontemplate at //depot/ops/kontemplate r/251
Diffstat (limited to 'ops/kontemplate/example/some-api')
-rw-r--r-- | ops/kontemplate/example/some-api/some-api.yaml | 52 | ||||
-rw-r--r-- | ops/kontemplate/example/some-api/some.cfg | 4 |
2 files changed, 56 insertions, 0 deletions
diff --git a/ops/kontemplate/example/some-api/some-api.yaml b/ops/kontemplate/example/some-api/some-api.yaml new file mode 100644 index 000000000000..f0188f9dbde3 --- /dev/null +++ b/ops/kontemplate/example/some-api/some-api.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: secret-certificate +data: + cert.pem: {{ passLookup "my/secret/certificate" | b64enc }} +--- +apiVersion: extensions/v1beta1 +kind: ConfigMap +metadata: + name: some-config +data: + # The content of the example configuration file is templated in here + # by the 'insertFile' function and indented for YAML-compatibility + # with the 'indent' function: + some.cfg: | +{{ insertFile "some.cfg" | indent 4 }} +--- +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: some-api +spec: + replicas: 1 + template: + metadata: + labels: + app: some-api + spec: + containers: + - image: my.container.repo/some-api:{{ .version }} + name: some-api + env: + - name: ENABLE_IMPORTANT_FEATURE + value: {{ .importantFeature }} + - name: SOME_GLOBAL_VAR + value: {{ .globalVar }} +--- +apiVersion: v1 +kind: Service +metadata: + name: some-api + labels: + app: some-api +spec: + selector: + app: some-api + ports: + - port: 80 + targetPort: {{ .apiPort }} + name: http diff --git a/ops/kontemplate/example/some-api/some.cfg b/ops/kontemplate/example/some-api/some.cfg new file mode 100644 index 000000000000..733d5e16789a --- /dev/null +++ b/ops/kontemplate/example/some-api/some.cfg @@ -0,0 +1,4 @@ +{ + "something": 1542, + "other-thing": "да" +} |