wip changes to core
This commit is contained in:
parent
558653d698
commit
474b86681b
2 changed files with 19 additions and 42 deletions
|
@ -62,15 +62,8 @@
|
|||
(let [{:keys [user-name user-password]} my-auth]
|
||||
(->
|
||||
(yaml/from-string (yaml/load-resource "deployment.yaml"))
|
||||
(assoc-in [:spec :template :spec :containers]
|
||||
[{:name "keycloak"
|
||||
:image "quay.io/keycloak/keycloak:13.0.0"
|
||||
:env
|
||||
[{:name "KEYCLOAK_USER", :value user-name}
|
||||
{:name "KEYCLOAK_PASSWORD", :value user-password}
|
||||
{:name "PROXY_ADDRESS_FORWARDING", :value "true"}]
|
||||
:ports [{:name "http", :containerPort 8080}]
|
||||
:readinessProbe {:httpGet {:path "/auth/realms/master", :port 8080}}}]))))
|
||||
(assoc-in [:spec :template :spec :containers 0 :env 0 :value] user-name)
|
||||
(assoc-in [:spec :template :spec :containers 0 :env 1 :value] user-password))))
|
||||
|
||||
(defn generate-certificate [config]
|
||||
(let [{:keys [fqdn issuer]
|
||||
|
|
|
@ -83,19 +83,3 @@
|
|||
:ports [{:name "http", :containerPort 8080}]
|
||||
:readinessProbe {:httpGet {:path "/auth/realms/master", :port 8080}}}]}}}}
|
||||
(cut/generate-deployment {:user-name "testuser" :user-password "test1234"}))))
|
||||
|
||||
(deftest test-vector-replace-fqdn-function
|
||||
(let [ingress-yaml (yaml/from-string (yaml/load-resource "ingress.yaml"))
|
||||
fqdn "some_host"
|
||||
desired-result (-> ingress-yaml
|
||||
(assoc-in [:spec :rules] [{:host fqdn
|
||||
:http {:paths [{:backend {:serviceName "keycloak"
|
||||
:servicePort 8080}}]}}
|
||||
{:host fqdn
|
||||
:http {:paths [{:backend {:serviceName "another_keycloak"
|
||||
:servicePort 8081}}]}}
|
||||
]))]
|
||||
(is (= desired-result (cut/assoc-in-nested ingress-yaml [:spec :rules :host] fqdn))))
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue