From b8f92e3a24d81701f541577d389cd21bd56c9e0d Mon Sep 17 00:00:00 2001
From: Ryan Garcia <garcia.ryan@solute.us>
Date: Fri, 29 Oct 2021 22:20:05 +0000
Subject: [PATCH] Update k3d values.yaml for vault

---
 tests/test-values.yaml | 63 ++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 61 insertions(+), 2 deletions(-)

diff --git a/tests/test-values.yaml b/tests/test-values.yaml
index 1691f4e0ca..71869e2278 100644
--- a/tests/test-values.yaml
+++ b/tests/test-values.yaml
@@ -360,8 +360,6 @@ twistlock:
 
 # Addons are toggled based on labels in CI
 addons:
-  vault:
-    enabled: true
   argocd:
     enabled: false
     sso:
@@ -1045,3 +1043,64 @@ addons:
             cypress_url: "https://keycloak.bigbang.dev"
             cypress_username: "admin"
             cypress_password: "password"
+      # Custom dev secret configuration
+      secrets:
+        env:
+          stringData:
+            CUSTOM_REGISTRATION_CONFIG: /opt/jboss/keycloak/customreg.yaml
+            KEYCLOAK_IMPORT: /opt/jboss/keycloak/realm.json
+            X509_CA_BUNDLE: /etc/x509/https/cas.pem
+        certauthority:
+          stringData:
+            cas.pem: '{{ .Files.Get "resources/dev/dod_cas.pem" }}'
+        customreg:
+          stringData:
+            customreg.yaml: '{{ .Files.Get "resources/dev/baby-yoda.yaml" }}'
+        realm:
+          stringData:
+            realm.json: '{{ .Files.Get "resources/dev/baby-yoda.json" }}'
+      extraVolumes: |-
+        - name: certauthority
+          secret:
+            secretName: {{ include "keycloak.fullname" . }}-certauthority
+        - name: customreg
+          secret:
+            secretName: {{ include "keycloak.fullname" . }}-customreg
+        - name: realm
+          secret:
+            secretName: {{ include "keycloak.fullname" . }}-realm
+      extraVolumeMounts: |-
+        - name: certauthority
+          mountPath: /etc/x509/https/cas.pem
+          subPath: cas.pem
+          readOnly: true
+        - name: customreg
+          mountPath: /opt/jboss/keycloak/customreg.yaml
+          subPath: customreg.yaml
+          readOnly: true
+        - name: realm
+          mountPath: /opt/jboss/keycloak/realm.json
+          subPath: realm.json
+          readOnly: true
+      
+      extraVolumeMountsBigBang:
+        - name: tlscert
+          mountPath: /etc/x509/https/tls.crt
+          subPath: tls.crt
+          readOnly: true
+        - name: tlskey
+          mountPath: /etc/x509/https/tls.key
+          subPath: tls.key
+          readOnly: true
+  vault:
+    enabled: false
+    values:
+      server:
+        dataStorage:
+          enabled: true 
+      bbtests:
+        enabled: true
+        cypress:
+          artifacts: true 
+          envs:
+            cypress_vault_url: "http://vault.vault.svc:8200"
-- 
GitLab