[stable/concourse] promote pod affinity from annotation to spec (#1756)

* [stable/concourse] fix json to work with kubernetes v1.7

This updates @pfeodrippe's pull request to address
@unguiculus's comments. It moves the affinity into the
kubernetes 1.7 compatible affinity. It follows the pattern
used to fix cockroachdb in #1326.

Closes #1462, #1525, #1306

* [stable/concourse] Add worker statefulset annotations

This allows us to attach things like kube2iam annotations to
the stateful sets to allow Concourse workers to access private ECR
repositories.

* [stable/concourse] Bump chart version
This commit is contained in:
Erick Tryzelaar
2017-08-23 07:26:52 +05:30
committed by Dhilip
parent cea24ad83a
commit 7161f1a4cc
4 changed files with 23 additions and 21 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
name: concourse
version: 0.3.2
version: 0.4.0
appVersion: 3.3.2
description: Concourse is a simple and scalable CI system.
icon: https://avatars1.githubusercontent.com/u/7809479
keywords:
+1 -1
View File
@@ -14,7 +14,7 @@ This chart bootstraps a [Concourse](https://concourse.ci/) deployment on a [Kube
## Prerequisites Details
* Kubernetes 1.5 (for `StatefulSets` support)
* Kubernetes 1.6 (for `pod affinity` support)
* PV support on underlying infrastructure (if persistence is required)
## Installing the Chart
@@ -7,6 +7,7 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
serviceName: {{ template "worker.fullname" . }}
replicas: {{ .Values.worker.replicas }}
@@ -15,24 +16,9 @@ spec:
labels:
app: {{ template "worker.fullname" . }}
annotations:
scheduler.alpha.kubernetes.io/affinity: >
{
"podAntiAffinity": {
"preferredDuringSchedulingIgnoredDuringExecution": [
{
"weight": 100,
"labelSelector": {
"matchExpressions": [{
"key": "app",
"operator": "In",
"values": ["{{ template "worker.fullname" . }}"]
}]
},
"topologyKey": "kubernetes.io/hostname"
}
]
}
}
{{- range $key, $value := .Values.worker.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
terminationGracePeriodSeconds: 60
containers:
@@ -90,6 +76,16 @@ spec:
readOnly: true
- name: concourse-work-dir
mountPath: /concourse-work-dir
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app: {{ template "worker.fullname" . }}
release: {{ .Release.Name | quote }}
volumes:
- name: concourse-keys
secret:
+6 -1
View File
@@ -313,7 +313,7 @@ web:
##
enabled: false
## Annotations.
## Annotations to be added to the web ingress.
##
# annotations:
# kubernetes.io/ingress.class: nginx
@@ -357,6 +357,11 @@ worker:
cpu: "100m"
memory: "512Mi"
## Annotations to be added to the worker pods.
##
# annotations:
# iam.amazonaws.com/role: arn:aws:iam::123456789012:role/concourse
## Persistent Volume Storage configuration.
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes
##