diff --git a/src/main/helm/templates/deployment.yaml b/src/main/helm/templates/deployment.yaml index b554d57c771f82258d30f20cd129eca4f55eb66f..54775001fee442756defcbb005b29ebc6102c263 100644 --- a/src/main/helm/templates/deployment.yaml +++ b/src/main/helm/templates/deployment.yaml @@ -111,6 +111,18 @@ spec: value: {{ .Values.zufiManager.address }} - name: grpc_client_zufi-manager_negotiationType value: {{ (.Values.zufiManager).grpcClientNegotiationType | default "TLS" }} + {{- if ((.Values.ozgcloud).feature).postfach }} + - name: ozgcloud_feature_postfach + value: {{ .Values.ozgcloud.feature.postfach | quote }} + {{- end }} + {{- if ((.Values.ozgcloud).feature).benutzerRollen }} + - name: ozgcloud_feature_benutzerRollen + value: {{ .Values.ozgcloud.feature.benutzerRollen | quote }} + {{- end }} + {{- if ((.Values.ozgcloud).feature).organisationsEinheiten }} + - name: ozgcloud_feature_organisationsEinheiten + value: {{ .Values.ozgcloud.feature.organisationsEinheiten | quote }} + {{- end }} envFrom: {{- if (.Values.database).useExternal }} - secretRef: diff --git a/src/main/resources/application-dev.yaml b/src/main/resources/application-dev.yaml index 691b5933ad9270b73fe54d3f0779c5b692e49389..43f589362f0a68ab411c97d57e27b0ca9d8546a1 100644 --- a/src/main/resources/application-dev.yaml +++ b/src/main/resources/application-dev.yaml @@ -3,4 +3,8 @@ ozgcloud: administration: sync: organisationseinheiten: - cron: "* */5 * * * *" \ No newline at end of file + cron: "* */5 * * * *" + feature: + postfach: true + benutzerRollen: true + organisationsEinheiten: true \ No newline at end of file diff --git a/src/main/resources/application-e2e.yaml b/src/main/resources/application-e2e.yaml index 864d289ed86348cab1d4997844729b83f6a793ba..1ca78e907b35e39a905f46a0ed082b64be7dd6b2 100644 --- a/src/main/resources/application-e2e.yaml +++ b/src/main/resources/application-e2e.yaml @@ -8,4 +8,10 @@ server: management: server: - port: 8081 \ No newline at end of file + port: 8081 + +ozgcloud: + feature: + postfach: true + benutzer-rollen: true + organisations-einheiten: true \ No newline at end of file diff --git a/src/main/resources/application-local.yaml b/src/main/resources/application-local.yaml index b39daf33653aa0db748c56b8a2353f4614a84dde..99608d21a21751a91617a7f5f1d43cac1db83adc 100644 --- a/src/main/resources/application-local.yaml +++ b/src/main/resources/application-local.yaml @@ -17,6 +17,10 @@ ozgcloud: api: user: administrationApiUser password: administrationApiUser + feature: + postfach: true + benutzer-rollen: true + organisations-einheiten: true grpc: client: diff --git a/src/test/helm/deployment_features_test.yaml b/src/test/helm/deployment_features_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b0f29d2d6c6ed3f1e0cf54027dc940e6c43619d7 --- /dev/null +++ b/src/test/helm/deployment_features_test.yaml @@ -0,0 +1,78 @@ +# +# Copyright (C) 2024 Das Land Schleswig-Holstein vertreten durch den +# Ministerpräsidenten des Landes Schleswig-Holstein +# Staatskanzlei +# Abteilung Digitalisierung und zentrales IT-Management der Landesregierung +# +# Lizenziert unter der EUPL, Version 1.2 oder - sobald +# diese von der Europäischen Kommission genehmigt wurden - +# Folgeversionen der EUPL ("Lizenz"); +# Sie dürfen dieses Werk ausschließlich gemäß +# dieser Lizenz nutzen. +# Eine Kopie der Lizenz finden Sie hier: +# +# https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 +# +# Sofern nicht durch anwendbare Rechtsvorschriften +# gefordert oder in schriftlicher Form vereinbart, wird +# die unter der Lizenz verbreitete Software "so wie sie +# ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN - +# ausdrücklich oder stillschweigend - verbreitet. +# Die sprachspezifischen Genehmigungen und Beschränkungen +# unter der Lizenz sind dem Lizenztext zu entnehmen. +# + +suite: test feature properties +release: + name: administration + namespace: sh-helm-test +templates: + - templates/deployment.yaml +set: + ozgcloud: + bundesland: sh + bezeichner: helm + sso: + serverUrl: https://sso.company.local + imagePullSecret: image-pull-secret +tests: + - it: should not contain feature properties if values are missing + asserts: + - notContains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_feature_postfach + any: true + - notContains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_feature_benutzerRollen + any: true + - notContains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_feature_organisationsEinheiten + any: true + - it: should set (optional) feature properties + set: + ozgcloud: + feature: + postfach: true + benutzerRollen: true + organisationsEinheiten: true + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_feature_postfach + value: "true" + - contains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_feature_benutzerRollen + value: "true" + - contains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_feature_organisationsEinheiten + value: "true" \ No newline at end of file