ContainerImage.Pinniped/deploy/deployment.yaml
Matt Moyer a9cf376000 Fix string templating in YAML config.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
2020-07-09 11:58:28 -05:00

57 lines
1.3 KiB
YAML

#@ load("@ytt:data", "data")
---
apiVersion: v1
kind: Namespace
metadata:
name: #@ data.values.namespace
labels:
name: #@ data.values.namespace
---
apiVersion: v1
kind: ConfigMap
metadata:
name: #@ data.values.app_name + "-config"
namespace: #@ data.values.namespace
labels:
app: #@ data.values.app_name
data:
#@yaml/text-templated-strings
placeholder-config.yaml: |
apiVersion: v1alpha1
webhookURL: (@= data.values.webhook_url @)
webhookCABundlePath: /etc/config/ca.pem
ca.pem: #@ data.values.webhook_ca_bundle
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: #@ data.values.app_name + "-deployment"
namespace: #@ data.values.namespace
labels:
app: #@ data.values.app_name
spec:
replicas: 1
selector:
matchLabels:
app: #@ data.values.app_name
template:
metadata:
labels:
app: #@ data.values.app_name
spec:
containers:
- name: placeholder-name
image: #@ data.values.image_repo + "@" + data.values.image_digest
imagePullPolicy: IfNotPresent
command:
- ./app
- --config
- /etc/config/placeholder-config.yaml
volumeMounts:
- name: config-volume
mountPath: /etc/config
volumes:
- name: config-volume
configMap:
name: #@ data.values.app_name + "-config"