Commit 5fb976be authored by Aaron Walker's avatar Aaron Walker
Browse files

feat: nodeSelector and tolerations

parent a79cdc11
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.3.0
version: 2.4.0
icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
| image.secrets                 |             | `[name: gitlab-registry]`          |
| extraLabels                   | Allow labelling resources with custom key/value pairs | `{}` |
| podAnnotations                | Pod annotations | `{}`                           |
| nodeSelector                  | Node labels for pod assignment | `{}`           |
| tolerations                   | List of node taints to tolerate | `[]`          |
| application.track             |             | `stable`                           |
| application.tier              |             | `web`                              |
| application.migrateCommand    | If present, this variable will run as a shell command within an application Container as a Helm pre-upgrade Hook. Intended to run migration commands. | `nil` |
+8 −0
Original line number Diff line number Diff line
@@ -41,6 +41,14 @@ spec:
{{- end }}        
      imagePullSecrets:
{{ toYaml .Values.image.secrets | indent 10 }}
{{- if .Values.nodeSelector }}
      nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
      tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
      containers:
      - name: {{ .Chart.Name }}
        image: {{ template "imagename" . }}
+12 −0
Original line number Diff line number Diff line
@@ -43,6 +43,18 @@ items:
      spec:
        imagePullSecrets:
  {{ toYaml $.Values.image.secrets | indent 12 }}
{{- with $nodeSelectorConfig := default $.Values.nodeSelector $workerConfig.nodeSelector -}}
{{- if $nodeSelectorConfig  }}
        nodeSelector:
{{ toYaml $nodeSelectorConfig | indent 10 }}
{{- end }}
{{- end }}
{{- with $tolerationsConfig := default $.Values.tolerations $workerConfig.tolerations -}}
{{- if $tolerationsConfig  }}
        tolerations:
{{ toYaml $tolerationsConfig | indent 10 }}
{{- end }}
{{- end }}
        terminationGracePeriodSeconds: {{ $workerConfig.terminationGracePeriodSeconds }}
        containers:
        - name: {{ $.Chart.Name }}-{{ $workerName }}
+2 −0
Original line number Diff line number Diff line
@@ -137,6 +137,8 @@ type workerDeploymentTestCase struct {
	ExpectedSelector       *metav1.LabelSelector
	ExpectedLivenessProbe  *coreV1.Probe
	ExpectedReadinessProbe *coreV1.Probe
	ExpectedNodeSelector   map[string]string
	ExpectedTolerations    []coreV1.Toleration
}

type workerDeploymentSelectorTestCase struct {
Loading