diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..94f5d3343fade8e33cd2cb13cfeb5a0bcb6e38de --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# pluto + +Das helm chart zur Installation des allgemeinen Fachverfahrens - goofy. + +## FAQ + +### Benutzung beliebiger environment Werte + +In jedem der Projekte kann man beliebige weitere environments setzen. Dazu muss man in der jeweiligen values.yaml unter env.customList ein name value Paar setzen: + +```yaml +env: + customList: + - name: Dinge + value: true + - name: ... + value: ... +``` diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 57a5bc10419726ce6d405c473f6d1ffecdb6a701..901208252fea84ef7d43d50e2b57a16004178722 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -53,6 +53,9 @@ spec: value: {{ include "app.ssoServerUrl" . }} - name: goofy_keycloak_api_password value: {{ required "A sso apiPassword is required!" (.Values.sso).apiPassword }} + {{- with (.Values.env).customList }} +{{ toYaml . | indent 8 }} + {{- end }} image: "docker.ozg-sh.de/goofy:{{ coalesce (.Values.image).tag "latest" }}" imagePullPolicy: Always name: goofy diff --git a/unit-tests/deployment_env_test.yaml b/unit-tests/deployment_env_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d12a6bd409d89f877ace521b17e0e208c7e6948d --- /dev/null +++ b/unit-tests/deployment_env_test.yaml @@ -0,0 +1,24 @@ +suite: test environments +templates: + - templates/deployment.yaml +tests: + - it: check customList + template: deployment.yaml + set: + env.customList: + - name: my_test_environment_name + value: "A test value" + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: my_test_environment_name + value: "A test value" + - it: check customList test value is not set by default + template: deployment.yaml + asserts: + - notContains: + path: spec.template.spec.containers[0].env + content: + name: my_test_environment_name + value: "A test value" diff --git a/values.yaml b/values.yaml index 8cb8ed249ba05938e6de7a8b11029c3c6837c69a..965507f5c565be48a0a30ba810b5065224bf8a4b 100644 --- a/values.yaml +++ b/values.yaml @@ -13,6 +13,9 @@ imageCredentials: # env: # springProfiles: "oc,prod" # [default: oc,prod] +# customList: # add name value pair for additional environments +# - name: Dinge +# value: true # host: # [default: https://<name>.<level>.ozg-sh.de, if level == "prod" https://<name>.ozg-sh.de] optional, host override value. Be aware that XXX.dev.ozg-sh.de can be used in the dev cluster only.