Add an example config to ./deploy resources.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer 2020-07-09 11:42:31 -05:00
parent 12255109bd
commit fe81958d2c
2 changed files with 27 additions and 1 deletions

View File

@ -7,7 +7,20 @@ metadata:
name: #@ data.values.namespace name: #@ data.values.namespace
labels: labels:
name: #@ data.values.namespace 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:
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 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -30,3 +43,14 @@ spec:
- name: placeholder-name - name: placeholder-name
image: #@ data.values.image_repo + "@" + data.values.image_digest image: #@ data.values.image_repo + "@" + data.values.image_digest
imagePullPolicy: IfNotPresent 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"

View File

@ -4,3 +4,5 @@ app_name: placeholder-name
namespace: namespace:
image_repo: #! e.g. gcr.io/your-project-name/repo-name image_repo: #! e.g. gcr.io/your-project-name/repo-name
image_digest: #! e.g. sha256:f3c4fdfd3ef865d4b97a1fd295d94acc3f0c654c46b6f27ffad5cf80216903c8 image_digest: #! e.g. sha256:f3c4fdfd3ef865d4b97a1fd295d94acc3f0c654c46b6f27ffad5cf80216903c8
webhook_url: #! e.g., https://example.com
webhook_ca_bundle: #! e.g., "-----BEGIN CERTIFICATE----- [...]"