diff --git a/stable/concourse/Chart.yaml b/stable/concourse/Chart.yaml index 2f0467c55b..9bfe93c40e 100644 --- a/stable/concourse/Chart.yaml +++ b/stable/concourse/Chart.yaml @@ -1,5 +1,5 @@ name: concourse -version: 1.3.2 +version: 1.4.0 appVersion: 3.10.0 description: Concourse is a simple and scalable CI system. icon: https://avatars1.githubusercontent.com/u/7809479 diff --git a/stable/concourse/README.md b/stable/concourse/README.md index 21287fddd2..545be71b67 100644 --- a/stable/concourse/README.md +++ b/stable/concourse/README.md @@ -129,6 +129,7 @@ The following table lists the configurable parameters of the Concourse chart and | `worker.fatalErrors` | Newline delimited strings which, when logged, should trigger a restart of the worker | *See [values.yaml](values.yaml)* | | `worker.updateStrategy` | `OnDelete` or `RollingUpdate` (requires Kubernetes >= 1.7) | `RollingUpdate` | | `worker.podManagementPolicy` | `OrderedReady` or `Parallel` (requires Kubernetes >= 1.7) | `Parallel` | +| `worker.hardAntiAffinity` | Should the workers be forced (as opposed to preferred) to be on different nodes? | `false` | | `persistence.enabled` | Enable Concourse persistence using Persistent Volume Claims | `true` | | `persistence.worker.storageClass` | Concourse Worker Persistent Volume Storage Class | `generic` | | `persistence.worker.accessMode` | Concourse Worker Persistent Volume Access Mode | `ReadWriteOnce` | diff --git a/stable/concourse/templates/worker-statefulset.yaml b/stable/concourse/templates/worker-statefulset.yaml index b33a7b607d..693fd0bd75 100644 --- a/stable/concourse/templates/worker-statefulset.yaml +++ b/stable/concourse/templates/worker-statefulset.yaml @@ -116,6 +116,14 @@ spec: {{ toYaml .Values.worker.additionalAffinities | indent 8 }} {{- end }} podAntiAffinity: + {{- if .Values.worker.hardAntiAffinity }} + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app: {{ template "concourse.worker.fullname" . }} + release: {{ .Release.Name | quote }} + topologyKey: kubernetes.io/hostname + {{- else }} preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: @@ -124,6 +132,7 @@ spec: matchLabels: app: {{ template "concourse.worker.fullname" . }} release: {{ .Release.Name | quote }} + {{- end }} volumes: - name: concourse-keys secret: diff --git a/stable/concourse/values.yaml b/stable/concourse/values.yaml index 4ff3474afe..390afc59c3 100644 --- a/stable/concourse/values.yaml +++ b/stable/concourse/values.yaml @@ -342,6 +342,11 @@ worker: # values: # - "true" + ## Whether the workers should be forced to run on separate nodes. + ## This is accomplished by setting their AntiAffinity with requiredDuringSchedulingIgnoredDuringExecution as opposed to preferred + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature + hardAntiAffinity: false + ## Tolerations for the worker nodes. ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ tolerations: []