diff --git a/src/main/helm/templates/deployment.yaml b/src/main/helm/templates/deployment.yaml index a16babd5913f49359871cadf1807789b9edb8382..f70d294c33302ec1c5c8d88bea5c30d647c83cdc 100644 --- a/src/main/helm/templates/deployment.yaml +++ b/src/main/helm/templates/deployment.yaml @@ -124,11 +124,11 @@ spec: value: {{ .Values.ozgcloud.osiv2.api.nameidentifier}} {{- if (.Values.ozgcloud.osiv2.httpproxy).enabled}} - name: ozgcloud_osiv2_http-proxy_enabled - value: "{{ (.Values.ozgcloud.osiv2.httpproxy).enabled }}" + value: "{{ .Values.ozgcloud.osiv2.httpproxy.enabled }}" - name: ozgcloud_osiv2_http-proxy_host value: {{ .Values.ozgcloud.osiv2.httpproxy.host }} - name: ozgcloud_osiv2_http-proxy_port - value: "{{ .Values.ozgcloud.osiv2.httpproxy.port }}"" + value: "{{ .Values.ozgcloud.osiv2.httpproxy.port }}" {{- end }} {{- end }} {{- if (.Values.rabbitmq).enabled }} diff --git a/src/main/helm/templates/osiv2_auth_secret.yaml b/src/main/helm/templates/osiv2_auth_secret.yaml index 6cdd7d62f922d03a60df617c6a4847f961c01580..f4c42dae128e36a008aa98f7a564e1926cc376a0 100644 --- a/src/main/helm/templates/osiv2_auth_secret.yaml +++ b/src/main/helm/templates/osiv2_auth_secret.yaml @@ -22,7 +22,7 @@ # unter der Lizenz sind dem Lizenztext zu entnehmen. # -{{- if (.Values.ozgcloud.osiv2).auth }} +{{- if (.Values.ozgcloud.osiv2).enabled }} apiVersion: v1 kind: Secret metadata: diff --git a/src/test/helm/deployment_osiv2_test.yaml b/src/test/helm/deployment_osiv2_test.yaml index bb752f9a355476b7494fc706625f334eb514c01d..b5e43e66f1edac294897809a752c61419adfdea7 100644 --- a/src/test/helm/deployment_osiv2_test.yaml +++ b/src/test/helm/deployment_osiv2_test.yaml @@ -105,6 +105,11 @@ tests: content: name: ozgcloud_osiv2_api_name-identifier value: "name-identifier" + - notContains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_osiv2_http-proxy_enabled + any: true - it: should set osiv2 proxy values set: ozgcloud: @@ -113,7 +118,7 @@ tests: httpproxy: enabled: true host: "http://proxy.host" - port: "8080" + port: 8080 asserts: - contains: path: spec.template.spec.containers[0].env @@ -129,7 +134,7 @@ tests: path: spec.template.spec.containers[0].env content: name: ozgcloud_osiv2_http-proxy_port - value: 8080 + value: "8080" - it: should not by default set osiv2 values asserts: - contains: diff --git a/src/test/helm/osiv2_auth_secret_test.yaml b/src/test/helm/osiv2_auth_secret_test.yaml index 693b65c88ab1cd173f2d8f58f6e5f7e50c9b9c49..418d133d56c4417007478ec18cb42de8eb88095d 100644 --- a/src/test/helm/osiv2_auth_secret_test.yaml +++ b/src/test/helm/osiv2_auth_secret_test.yaml @@ -31,6 +31,7 @@ templates: set: ozgcloud: osiv2: + enabled: true auth: clientid: "client-id" clientsecret: "client-secret" @@ -62,7 +63,10 @@ tests: value: "client-secret" - it: should not create osiv2 auth secret by default set: - ozgcloud.osiv2.auth: null + ozgcloud: + osiv2: + enabled: false + auth: null asserts: - hasDocuments: count: 0