diff --git a/stable/cockroachdb/Chart.yaml b/stable/cockroachdb/Chart.yaml index 5a8a62da16..5108283d26 100755 --- a/stable/cockroachdb/Chart.yaml +++ b/stable/cockroachdb/Chart.yaml @@ -1,6 +1,6 @@ name: cockroachdb home: https://www.cockroachlabs.com -version: 0.2.4 +version: 0.3.0 description: CockroachDB is a scalable, survivable, strongly-consistent SQL database. icon: https://raw.githubusercontent.com/cockroachdb/cockroach/master/docs/media/cockroach_db.png sources: diff --git a/stable/cockroachdb/templates/cockroachdb-statefulset.yaml b/stable/cockroachdb/templates/cockroachdb-statefulset.yaml index 0132381cc3..82e3634ebd 100644 --- a/stable/cockroachdb/templates/cockroachdb-statefulset.yaml +++ b/stable/cockroachdb/templates/cockroachdb-statefulset.yaml @@ -89,65 +89,47 @@ spec: release: {{ .Release.Name | quote }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" component: "{{ .Release.Name }}-{{ .Values.Component }}" - annotations: - scheduler.alpha.kubernetes.io/affinity: > - { - "podAntiAffinity": { - "preferredDuringSchedulingIgnoredDuringExecution": [{ - "weight": 100, - "labelSelector": { - "matchExpressions": [{ - "key": "component", - "operator": "In", - "values": ["{{ .Release.Name }}-{{ .Values.Component }}"] - }] - }, - "topologyKey": "kubernetes.io/hostname" - }] - } - } - # Init containers are run only once in the lifetime of a pod, before - # it's started up for the first time. It has to exit successfully - # before the pod's main containers are allowed to start. - # This particular init container does a DNS lookup for other pods in - # the set to help determine whether or not a cluster already exists. - # If any other pods exist, it creates a file in the cockroach-data - # directory to pass that information along to the primary container that - # has to decide what command-line flags to use when starting CockroachDB. - # This only matters when a pod's persistent volume is empty - if it has - # data from a previous execution, that data will always be used. - # The cockroachdb/cockroach-k8s-init image is defined at - # github.com/cockroachdb/cockroach/blob/master/cloud/kubernetes/init - pod.alpha.kubernetes.io/init-containers: '[ - { - "name": "bootstrap", - "image": "{{ .Values.BootstrapImage }}:{{ .Values.BootstrapImageTag }}", - "imagePullPolicy": "{{ .Values.ImagePullPolicy }}", - "args": [ - "-on-start=/on-start.sh", - "-service={{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}", - "-domain={{ .Values.ClusterDomain }}" - ], - "env": [ - { - "name": "POD_NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } - } - } - ], - "volumeMounts": [ - { - "name": "datadir", - "mountPath": "/cockroach/cockroach-data" - } - ] - } - ]' spec: + # Init containers are run only once in the lifetime of a pod, before + # it's started up for the first time. It has to exit successfully + # before the pod's main containers are allowed to start. + # This particular init container does a DNS lookup for other pods in + # the set to help determine whether or not a cluster already exists. + # If any other pods exist, it creates a file in the cockroach-data + # directory to pass that information along to the primary container that + # has to decide what command-line flags to use when starting CockroachDB. + # This only matters when a pod's persistent volume is empty - if it has + # data from a previous execution, that data will always be used. + # The cockroachdb/cockroach-k8s-init image is defined at + # github.com/cockroachdb/cockroach/blob/master/cloud/kubernetes/init + initContainers: + - name: bootstrap + image: "{{ .Values.BootstrapImage }}:{{ .Values.BootstrapImageTag }}" + imagePullPolicy: "{{ .Values.ImagePullPolicy }}" + args: + - "-on-start=/on-start.sh" + - "-service={{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}" + - "-domain={{ .Values.ClusterDomain }}" + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + volumeMounts: + - name: datadir + mountPath: "/cockroach/cockroach-data" + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - cockroachdb + topologyKey: kubernetes.io/hostname containers: - name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}" image: "{{ .Values.Image }}:{{ .Values.ImageTag }}"