From 0d901366feff98bf819150ccf5bde6f338f4a2cc Mon Sep 17 00:00:00 2001
From: Branden Cobb <cobb_branden@bah.com>
Date: Wed, 23 Feb 2022 20:45:23 +0000
Subject: [PATCH] keycloak bbtest enable

---
 .gitlab-ci.yml         |  2 +-
 tests/test-values.yaml | 40 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cfd815bb29..c525309967 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
 include:
   - project: 'platform-one/big-bang/pipeline-templates/pipeline-templates'
     ref: master
-    file: '/pipelines/bigbang.yaml'
\ No newline at end of file
+    file: '/pipelines/bigbang.yaml'
diff --git a/tests/test-values.yaml b/tests/test-values.yaml
index 98d89512bc..286f378758 100644
--- a/tests/test-values.yaml
+++ b/tests/test-values.yaml
@@ -988,10 +988,48 @@ addons:
         limits: {}
       # Disabling helm tests for keycloak until they are working on rke2
       bbtests:
-        enabled: false
+        enabled: true
         cypress:
           envs:
             cypress_url: "https://keycloak.bigbang.dev"
+      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
 
   vault:
     enabled: false
-- 
GitLab