@@ -77,46 +77,33 @@ spec:
77
77
metadata :
78
78
labels :
79
79
app : cockroachdb
80
- annotations :
81
- # Init containers are run only once in the lifetime of a pod, before
82
- # it's started up for the first time. It has to exit successfully
83
- # before the pod's main containers are allowed to start.
84
- # This particular init container does a DNS lookup for other pods in
85
- # the set to help determine whether or not a cluster already exists.
86
- # If any other pods exist, it creates a file in the cockroach-data
87
- # directory to pass that information along to the primary container that
88
- # has to decide what command-line flags to use when starting CockroachDB.
89
- # This only matters when a pod's persistent volume is empty - if it has
90
- # data from a previous execution, that data will always be used.
91
- pod.alpha.kubernetes.io/init-containers : ' [
92
- {
93
- "name": "bootstrap",
94
- "image": "cockroachdb/cockroach-k8s-init:0.1",
95
- "imagePullPolicy": "IfNotPresent",
96
- "args": [
97
- "-on-start=/on-start.sh",
98
- "-service=cockroachdb"
99
- ],
100
- "env": [
101
- {
102
- "name": "POD_NAMESPACE",
103
- "valueFrom": {
104
- "fieldRef": {
105
- "apiVersion": "v1",
106
- "fieldPath": "metadata.namespace"
107
- }
108
- }
109
- }
110
- ],
111
- "volumeMounts": [
112
- {
113
- "name": "datadir",
114
- "mountPath": "/cockroach/cockroach-data"
115
- }
116
- ]
117
- }
118
- ]'
119
80
spec :
81
+ # Init containers are run only once in the lifetime of a pod, before
82
+ # it's started up for the first time. It has to exit successfully
83
+ # before the pod's main containers are allowed to start.
84
+ # This particular init container does a DNS lookup for other pods in
85
+ # the set to help determine whether or not a cluster already exists.
86
+ # If any other pods exist, it creates a file in the cockroach-data
87
+ # directory to pass that information along to the primary container that
88
+ # has to decide what command-line flags to use when starting CockroachDB.
89
+ # This only matters when a pod's persistent volume is empty - if it has
90
+ # data from a previous execution, that data will always be used.
91
+ initContainers :
92
+ - name : bootstrap
93
+ image : cockroachdb/cockroach-k8s-init:0.1
94
+ imagePullPolicy : IfNotPresent
95
+ args :
96
+ - " -on-start=/on-start.sh"
97
+ - " -service=cockroachdb"
98
+ env :
99
+ - name : POD_NAMESPACE
100
+ valueFrom :
101
+ fieldRef :
102
+ apiVersion : v1
103
+ fieldPath : metadata.namespace
104
+ volumeMounts :
105
+ - name : datadir
106
+ mountPath : " /cockroach/cockroach-data"
120
107
affinity :
121
108
podAntiAffinity :
122
109
preferredDuringSchedulingIgnoredDuringExecution :
0 commit comments