From 053e1acf1668c885c27255f50586dea7c542de9a Mon Sep 17 00:00:00 2001 From: Thomas O'Neill Date: Mon, 15 May 2023 15:24:12 -0400 Subject: [PATCH 1/3] Allow extra environment variables for dashboard, director and api --- charts/sorry-cypress/Chart.yaml | 2 +- charts/sorry-cypress/README.md | 5 ++++- charts/sorry-cypress/templates/deployment-api.yml | 3 +++ .../sorry-cypress/templates/deployment-dashboard.yml | 3 +++ .../sorry-cypress/templates/deployment-director.yml | 3 +++ charts/sorry-cypress/values.yaml | 11 +++++++++++ 6 files changed, 25 insertions(+), 2 deletions(-) diff --git a/charts/sorry-cypress/Chart.yaml b/charts/sorry-cypress/Chart.yaml index f5fece3..d640373 100644 --- a/charts/sorry-cypress/Chart.yaml +++ b/charts/sorry-cypress/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: sorry-cypress description: A Helm chart for Sorry Cypress type: application -version: 1.13.1 +version: 1.13.2 appVersion: 2.5.3 home: https://sorry-cypress.dev/ sources: diff --git a/charts/sorry-cypress/README.md b/charts/sorry-cypress/README.md index 0f0c945..7252e0c 100644 --- a/charts/sorry-cypress/README.md +++ b/charts/sorry-cypress/README.md @@ -93,6 +93,7 @@ https://sorry-cypress.dev/api#configuration | `api.initContainers` | Allows you to define init container(s) for the api pod | `[]` | | `api.enableApolloPlayground` | Allows you to enable or disable Apollo Playground landing page | `false` | | `api.pageItemsLimit` | Allows you to set the API PAGE_ITEMS_LIMIT variable | `10` | +| `api.extraEnv` | Additional environment variables for the API container | `[]` | ### Dashboard service @@ -124,6 +125,7 @@ https://sorry-cypress.dev/dashboard#configuration | `dashboard.ingress.hosts[0].path` | Root path to the service installation | `/` | | `dashboard.ingress.tls` | Ingress secrets for TLS certificates | `[]` | | `dashboard.initContainers` | Allows you to define init container(s) for the dashboard pod | `[]` | +| `dashboard.extraEnv` | Additional environment variables for the Dashboard container | `[]` | ### Director service @@ -166,7 +168,8 @@ https://sorry-cypress.dev/director/configuration | `director.readinessProbe.periodSeconds` | How often (in seconds) to perform the probe. | `5` | | `director.readinessProbe.timeoutSeconds` | Number of seconds after which the probe times out. | `3` | | `director.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `2` | -| `director.readinessProbe.failureThreshold` | When a probe fails, Kubernetes will try `failureThreshold` times before giving up. | `5` +| `director.readinessProbe.failureThreshold` | When a probe fails, Kubernetes will try `failureThreshold` times before giving up. | `5` +| `director.extraEnv` | Additional environment variables for the Director container | `[]` | ### Mongodb service diff --git a/charts/sorry-cypress/templates/deployment-api.yml b/charts/sorry-cypress/templates/deployment-api.yml index 0b32b04..a58203b 100644 --- a/charts/sorry-cypress/templates/deployment-api.yml +++ b/charts/sorry-cypress/templates/deployment-api.yml @@ -76,6 +76,9 @@ spec: value: "mongodb://{{ include "mongodb.hostname" . }}:{{ .Values.mongodb.service.port }}" {{- end }} {{- end }} + {{- with .Values.api.extraEnv }} + {{- toYaml . | nindent 8 }} + {{- end }} image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.api.image.pullPolicy }} name: {{ include "sorry-cypress-helm.fullname" . }}-api diff --git a/charts/sorry-cypress/templates/deployment-dashboard.yml b/charts/sorry-cypress/templates/deployment-dashboard.yml index 915a72c..60247e8 100644 --- a/charts/sorry-cypress/templates/deployment-dashboard.yml +++ b/charts/sorry-cypress/templates/deployment-dashboard.yml @@ -55,6 +55,9 @@ spec: {{- end }} - name: PORT value: "{{ .Values.dashboard.service.port }}" + {{- with .Values.api.extraEnv }} + {{- toYaml . | nindent 8 }} + {{- end }} image: "{{ .Values.dashboard.image.repository }}:{{ .Values.dashboard.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.dashboard.image.pullPolicy }} name: {{ include "sorry-cypress-helm.fullname" . }}-dashboard diff --git a/charts/sorry-cypress/templates/deployment-director.yml b/charts/sorry-cypress/templates/deployment-director.yml index 1d8df07..7648a55 100644 --- a/charts/sorry-cypress/templates/deployment-director.yml +++ b/charts/sorry-cypress/templates/deployment-director.yml @@ -161,6 +161,9 @@ spec: value: {{ .Values.director.environmentVariables.inactivityTimeoutSeconds | quote }} - name: GITLAB_JOB_RETRIES value: {{ .Values.director.environmentVariables.gitlabJobRetries | quote }} + {{- with .Values.api.extraEnv }} + {{- toYaml . | nindent 8 }} + {{- end }} image: "{{ .Values.director.image.repository }}:{{ .Values.director.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.director.image.pullPolicy }} name: {{ include "sorry-cypress-helm.fullname" . }}-director diff --git a/charts/sorry-cypress/values.yaml b/charts/sorry-cypress/values.yaml index cd4f1c4..61382e6 100644 --- a/charts/sorry-cypress/values.yaml +++ b/charts/sorry-cypress/values.yaml @@ -105,6 +105,10 @@ api: # - secretName: chart-example-tls # hosts: # - chart-example.local + + extraEnv: [] + # - name: ENV_NAME + # value: ENV_VALUE dashboard: image: @@ -191,6 +195,9 @@ dashboard: # - secretName: chart-example-tls # hosts: # - chart-example.local + extraEnv: [] + # - name: ENV_NAME + # value: ENV_VALUE director: serviceAccount: @@ -316,6 +323,10 @@ director: # - secretName: chart-example-tls # hosts: # - chart-example.local + + extraEnv: [] + # - name: ENV_NAME + # value: ENV_VALUE mongodb: # You need to ensure that director.environmentVariables.executionDriver is set to "../execution/mongo/driver" if you want the director to use mongodb. From 4d323ab33a151dd017e288c82a62e64c5b505a05 Mon Sep 17 00:00:00 2001 From: Thomas O'Neill Date: Mon, 15 May 2023 15:29:50 -0400 Subject: [PATCH 2/3] Add entry to changelog --- charts/sorry-cypress/changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/sorry-cypress/changelog.md b/charts/sorry-cypress/changelog.md index 5de7978..4e6c06a 100644 --- a/charts/sorry-cypress/changelog.md +++ b/charts/sorry-cypress/changelog.md @@ -1,6 +1,9 @@ # 1.14 - Update app to version `2.5.3` +# 1.13.2 +- Add option to include addional environment variables for the director, dashboard and api containers + # 1.13.1 - Add option to add annotations and labels to the runCleaner cronjob pods - Allow to specify the container security context to the runCleaner cronjob pods From eb482ef97b0320feaddefe21b81199e0d243576d Mon Sep 17 00:00:00 2001 From: Thomas O'Neill Date: Tue, 16 May 2023 15:22:50 -0400 Subject: [PATCH 3/3] style: Remove whitespace --- charts/sorry-cypress/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/sorry-cypress/values.yaml b/charts/sorry-cypress/values.yaml index 61382e6..7ed59e2 100644 --- a/charts/sorry-cypress/values.yaml +++ b/charts/sorry-cypress/values.yaml @@ -105,7 +105,7 @@ api: # - secretName: chart-example-tls # hosts: # - chart-example.local - + extraEnv: [] # - name: ENV_NAME # value: ENV_VALUE @@ -323,7 +323,7 @@ director: # - secretName: chart-example-tls # hosts: # - chart-example.local - + extraEnv: [] # - name: ENV_NAME # value: ENV_VALUE