From 1a3b7547631b92881858e8c2b41c73dc884372e7 Mon Sep 17 00:00:00 2001 From: Alex Robinson Date: Thu, 11 May 2017 15:10:56 -0400 Subject: [PATCH 1/2] Fix broken indentation in cockroachdb config from #45447 While I'm here, bring the e2e config precisely in line with the example config. --- .../cockroachdb/cockroachdb-statefulset.yaml | 21 +++++++++---------- .../statefulset/cockroachdb/statefulset.yaml | 14 ++++++++++++- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/examples/cockroachdb/cockroachdb-statefulset.yaml b/examples/cockroachdb/cockroachdb-statefulset.yaml index 7bb06e7d628..d3c1d856742 100644 --- a/examples/cockroachdb/cockroachdb-statefulset.yaml +++ b/examples/cockroachdb/cockroachdb-statefulset.yaml @@ -93,24 +93,23 @@ spec: image: cockroachdb/cockroach-k8s-init:0.1 imagePullPolicy: IfNotPresent args: - - "-on-start=/on-start.sh" - - "-service=cockroachdb" + - "-on-start=/on-start.sh" + - "-service=cockroachdb" env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - volumeMounts: - - name: datadir - mountPath: "/cockroach/cockroach-data" + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + volumeMounts: + - name: datadir + mountPath: "/cockroach/cockroach-data" affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: - matchExpress: + matchExpressions: - key: app operator: In values: diff --git a/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml b/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml index 4632fb165d6..e9843934df8 100644 --- a/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml +++ b/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml @@ -23,6 +23,7 @@ spec: initContainers: - name: bootstrap image: cockroachdb/cockroach-k8s-init:0.1 + imagePullPolicy: IfNotPresent args: - "-on-start=/on-start.sh" - "-service=cockroachdb" @@ -30,11 +31,22 @@ spec: - name: POD_NAMESPACE valueFrom: fieldRef: - apiVersion: v1 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: cockroachdb # Runs the master branch. Not recommended for production, but since From 09516cfb077cce0ab14f5faa9621e4970ac4b35c Mon Sep 17 00:00:00 2001 From: Alex Robinson Date: Thu, 11 May 2017 14:29:45 -0400 Subject: [PATCH 2/2] Add explicit image tag to cockroachdb example and test --- examples/cockroachdb/cockroachdb-statefulset.yaml | 7 +------ .../statefulset/cockroachdb/statefulset.yaml | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/examples/cockroachdb/cockroachdb-statefulset.yaml b/examples/cockroachdb/cockroachdb-statefulset.yaml index d3c1d856742..8a6bc162695 100644 --- a/examples/cockroachdb/cockroachdb-statefulset.yaml +++ b/examples/cockroachdb/cockroachdb-statefulset.yaml @@ -117,12 +117,7 @@ spec: topologyKey: kubernetes.io/hostname containers: - name: cockroachdb - # Runs the master branch. Not recommended for production, but since - # CockroachDB is in Beta, you don't want to run it in production - # anyway. See - # https://hub.docker.com/r/cockroachdb/cockroach/tags/ - # if you prefer to run a beta release. - image: cockroachdb/cockroach + image: cockroachdb/cockroach:v1.0 imagePullPolicy: IfNotPresent ports: - containerPort: 26257 diff --git a/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml b/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml index e9843934df8..d12b654ceab 100644 --- a/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml +++ b/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml @@ -49,12 +49,7 @@ spec: topologyKey: kubernetes.io/hostname containers: - name: cockroachdb - # Runs the master branch. Not recommended for production, but since - # CockroachDB is in Beta, you don't want to run it in production - # anyway. See - # https://hub.docker.com/r/cockroachdb/cockroach/tags/ - # if you prefer to run a beta release. - image: cockroachdb/cockroach + image: cockroachdb/cockroach:v1.0 imagePullPolicy: IfNotPresent ports: - containerPort: 26257