diff --git a/src/main/cljc/dda/k8s_keycloak/core.cljc b/src/main/cljc/dda/k8s_keycloak/core.cljc index ce2f4ec..ba85307 100644 --- a/src/main/cljc/dda/k8s_keycloak/core.cljc +++ b/src/main/cljc/dda/k8s_keycloak/core.cljc @@ -18,15 +18,17 @@ (not (nil? (re-matches #"(?=^.{4,253}\.?$)(^((?!-)[a-zA-Z0-9-]{1,63}(? (yaml/from-string (yaml/load-resource "deployment.yaml")) - (assoc-in [:spec :template :spec :containers 0 :env 0 :value] keycloak-admin-user) - (assoc-in [:spec :template :spec :containers 0 :env 1 :value] keycloak-admin-password)))) + (assoc-in [:spec :template :spec :containers 0 :env 3 :value] postgres-db-user) + (assoc-in [:spec :template :spec :containers 0 :env 5 :value] postgres-db-password) + (assoc-in [:spec :template :spec :containers 0 :env 6 :value] keycloak-admin-user) + (assoc-in [:spec :template :spec :containers 0 :env 7 :value] keycloak-admin-password)))) (defn generate-postgres-deployment [my-auth] - (let [{:keys [postgres-user postgres-password postgres-db]} my-auth] + (let [{:keys [postgres-db-user postgres-db-password]} my-auth] (-> (yaml/from-string (yaml/load-resource "postgres/postgres-deployment.yaml")) - (assoc-in [:spec :template :spec :containers 0 :env 0 :value] postgres-user) - (assoc-in [:spec :template :spec :containers 0 :env 1 :value] postgres-db) - (assoc-in [:spec :template :spec :containers 0 :env 2 :value] postgres-password)))) + (assoc-in [:spec :template :spec :containers 0 :env 0 :value] postgres-db-user) + (assoc-in [:spec :template :spec :containers 0 :env 2 :value] postgres-db-password)))) (defn generate-certificate [config] (let [{:keys [fqdn issuer]