Bläddra i källkod

Adding vault secret initialization

bodicsek 3 år sedan
förälder
incheckning
593da4fb14
2 ändrade filer med 25 tillägg och 5 borttagningar
  1. 18 1
      deployment/helm-chart/templates/deployment.yaml
  2. 7 4
      deployment/helm-chart/values.yaml

+ 18 - 1
deployment/helm-chart/templates/deployment.yaml

@@ -12,10 +12,27 @@ spec:
       labels:
         app: {{ .Values.appName }}
     spec:
+      initContainers:
+        - name: {{ .Values.appName }}-vault-init
+          image: {{ .Values.vaultImage }}
+          env:
+            - name: MOUNT_PATH
+              value: {{ .Values.vaultMountPath }}
+            - name: SECRET_NAME
+              value: {{ .Values.vaultSecretName }}
+          volumeMounts:
+            - name: vault
+              mountPath: {{ .Values.vaultMountPath }}
       containers:
         - name: {{ .Values.appName }}
           image: {{ .Values.imageRegistry }}/{{ .Values.appName }}:{{ .Values.appVersion }}
           ports:
-          - containerPort: 3000
+            - containerPort: 3000
+          volumeMounts:
+            - name: vault
+              mountPath: {{ .Values.vaultMountPath }}
       imagePullSecrets:
         - name: {{ .Values.imagePullSecret }}
+      volumes:
+        - name: vault
+          emptyDir: {}

+ 7 - 4
deployment/helm-chart/values.yaml

@@ -2,9 +2,12 @@
 # This is a YAML-formatted file.
 # Declare variables to be passed into your templates.
 
-appName: "occ-fw-backend"
+appName: occ-fw-backend
 appVersion: 1.0.0
-imageRegistry: "iad.ocir.io/cesdev"
+imageRegistry: iad.ocir.io/cesdev
 imagePullSecret: ocirsecret
-host: "customercentral-poc.oracle.com"
-pathPrefix: "/occ/api/"
+vaultImage: iad.ocir.io/cesdev/occ-fw-vault-init:1.0.0
+vaultMountPath: /vault
+vaultSecretName: idcs-client
+host: customercentral-poc.oracle.com
+pathPrefix: /occ/api/