Fix deployment test

This commit is contained in:
erik 2023-01-25 13:10:16 +01:00
parent 83817bdb2c
commit 7193a34365

View file

@ -18,63 +18,61 @@
(cut/generate-secret {:keycloak-admin-user "user" :keycloak-admin-password "password"}))))
(deftest should-generate-deployment
(is (= {:apiVersion "apps/v1"
:kind "Deployment"
(is (= {:apiVersion "apps/v1",
:kind "Deployment",
:metadata
{:name "keycloak" :namespace "default" :labels {:app "keycloak"}},
{:name "keycloak", :namespace "default", :labels {:app "keycloak"}},
:spec
{:replicas 1
:selector {:matchLabels {:app "keycloak"}}
{:replicas 1,
:selector {:matchLabels {:app "keycloak"}},
:template
{:metadata {:labels {:app "keycloak"}}
{:metadata {:labels {:app "keycloak"}},
:spec
{:containers
[{:name "keycloak"
:image "quay.io/keycloak/keycloak:20.0.3"
:imagePullPolicy "IfNotPresent"
:args ["start"]
[{:name "keycloak",
:image "quay.io/keycloak/keycloak:20.0.3",
:imagePullPolicy "IfNotPresent",
:args ["start"],
:volumeMounts
[{:name "keycloak-cert"
:mountPath "/etc/certs"
:readOnly true}]
[{:name "keycloak-cert",
:mountPath "/etc/certs",
:readOnly true}],
:env
[{:name "KC_HTTPS_CERTIFICATE_FILE"
[{:name "KC_HTTPS_CERTIFICATE_FILE",
:value "/etc/certs/tls.crt"}
{:name "KC_HTTPS_CERTIFICATE_KEY_FILE"
{:name "KC_HTTPS_CERTIFICATE_KEY_FILE",
:value "/etc/certs/tls.key"}
{:name "KC_HOSTNAME" :value "test.de"}
{:name "DB_VENDOR" :value "POSTGRES"}
{:name "DB_ADDR" :value "postgresql-service"}
{:name "DB_SCHEMA" :value "public"}
{:name "DB_DATABASE"
{:name "KC_HOSTNAME", :value "test.de"}
{:name "KC_PROXY", :value "edge"}
{:name "DB_VENDOR", :value "POSTGRES"}
{:name "DB_ADDR", :value "postgresql-service"}
{:name "DB_SCHEMA", :value "public"}
{:name "DB_DATABASE",
:valueFrom
{:configMapKeyRef
{:name "postgres-config", :key "postgres-db"}}}
{:name "DB_USER"
{:name "DB_USER",
:valueFrom
{:secretKeyRef
{:name "postgres-secret", :key "postgres-user"}}}
{:name "DB_PASSWORD"
{:name "DB_PASSWORD",
:valueFrom
{:secretKeyRef
{:name "postgres-secret" :key "postgres-password"}}}
{:name "PROXY_ADDRESS_FORWARDING", :value "true"}
{:name "KEYCLOAK_USER"
{:name "postgres-secret", :key "postgres-password"}}}
{:name "KEYCLOAK_ADMIN",
:valueFrom
{:secretKeyRef
{:name "keycloak-secret", :key "keycloak-user"}}}
{:name "KEYCLOAK_PASSWORD"
{:name "KEYCLOAK_ADMIN_PASSWORD",
:valueFrom
{:secretKeyRef
{:name "keycloak-secret" :key "keycloak-password"}}}]
:ports [{:name "http" :containerPort 8080}]
:readinessProbe
{:httpGet {:path "/auth/realms/master", :port 8080}}}]
{:name "keycloak-secret", :key "keycloak-password"}}}],
:ports [{:name "http", :containerPort 8080}]}],
:volumes
[{:name "keycloak-cert"
[{:name "keycloak-cert",
:secret
{:secretName "keycloak"
{:secretName "keycloak",
:items
[{:key "tls.crt" :path "tls.crt"}
{:key "tls.key" :path "tls.key"}]}}]}}}}
[{:key "tls.crt", :path "tls.crt"}
{:key "tls.key", :path "tls.key"}]}}]}}}}
(cut/generate-deployment {:fqdn "test.de"}))))