Commit 4f910fad authored by Hidde-Jan Jongsma's avatar Hidde-Jan Jongsma
Browse files

feat: only inject database_url if it is set

Update chart version

Rename application.database_url to application.databaseUrl

Existing name was inconsistent with other values

Add application.databaseUrl documentation

Conditionally inject db url in db jobs and worker

Write tests for application.databaseUrl

Add databaseUrl documentation to values.yaml

Fix spelling mistake in worker deployment

Fix another typo

Put tests in right files

Keep database_url value name
parent 0283c102
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
apiVersion: v1
description: GitLab's Auto-deploy Helm Chart
name: auto-deploy-app
version: 2.23.0
version: 2.24.0
icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
| application.initializeCommand | If present, this variable will run as shell command within an application Container as a Helm post-install Hook. Intended to run database initialization commands. When set, the Deployment resource will be skipped.| `nil` |
| application.secretName        | Pass in the name of a Secret which the deployment will [load all key-value pairs from the Secret as environment variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) in the application container. | `nil` |
| application.secretChecksum    | Pass in the checksum of the secrets referenced by `application.secretName`. | `nil` |
| application.database_url      | If present, sets the `DATABASE_URL` environment variable. If postgres is enabled this will be autogenerated. | `nil` |
| hpa.enabled                   | If true, enables horizontal pod autoscaler. A resource request is also required to be set, such as `resources.requests.cpu: 200m`.| `false` |
| hpa.minReplicas               |             | `1`                                |
| hpa.maxReplicas               |             | `5`                                |
+2 −0
Original line number Diff line number Diff line
@@ -31,8 +31,10 @@ spec:
            name: {{ .Values.application.secretName }}
        {{- end }}
        env:
{{- if .Values.application.database_url }}
        - name: DATABASE_URL
          value: {{ .Values.application.database_url | quote }}
{{- end }}
        - name: GITLAB_ENVIRONMENT_NAME
          value: {{ .Values.gitlab.envName | quote }}
        - name: GITLAB_ENVIRONMENT_URL
+2 −0
Original line number Diff line number Diff line
@@ -31,8 +31,10 @@ spec:
            name: {{ .Values.application.secretName }}
        {{- end }}
        env:
{{- if .Values.application.database_url }}
        - name: DATABASE_URL
          value: {{ .Values.application.database_url | quote }}
{{- end }}
        - name: GITLAB_ENVIRONMENT_NAME
          value: {{ .Values.gitlab.envName | quote }}
        - name: GITLAB_ENVIRONMENT_URL
+2 −0
Original line number Diff line number Diff line
@@ -99,8 +99,10 @@ spec:
              name: app-postgres
              key: privateIP
{{- end }}
{{- if .Values.application.database_url }}
        - name: DATABASE_URL
          value: {{ .Values.application.database_url | quote }}
{{- end }}
        - name: GITLAB_ENVIRONMENT_NAME
          value: {{ .Values.gitlab.envName | quote }}
        - name: GITLAB_ENVIRONMENT_URL
Loading