diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index c4b47548..2a8b1448 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -7,7 +7,20 @@ 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: + 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 @@ -30,3 +43,14 @@ spec: - 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" \ No newline at end of file diff --git a/deploy/values.yaml b/deploy/values.yaml index 465a0e7d..801159e6 100644 --- a/deploy/values.yaml +++ b/deploy/values.yaml @@ -4,3 +4,5 @@ app_name: placeholder-name namespace: image_repo: #! e.g. gcr.io/your-project-name/repo-name image_digest: #! e.g. sha256:f3c4fdfd3ef865d4b97a1fd295d94acc3f0c654c46b6f27ffad5cf80216903c8 +webhook_url: #! e.g., https://example.com +webhook_ca_bundle: #! e.g., "-----BEGIN CERTIFICATE----- [...]"