Skip to content

Commit b1dbb7d

Browse files
authored
Merge pull request #68 from utilitywarehouse/proposal-for-host-from-config
Changed host to match the one from cockroach ConfigMap
2 parents 7100a5a + a0a9f43 commit b1dbb7d

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

base/statefulset.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ spec:
5050
--host=127.0.0.1
5151
--host=$(hostname -f)
5252
--host=$(hostname -f|cut -f 1-2 -d '.')
53-
--host=cockroachdb-proxy
54-
--host=cockroachdb-proxy.$(hostname -f|cut -f 3- -d '.')
53+
--host=$(COCKROACH_HOST)
54+
--host=$(COCKROACH_HOST).$(hostname -f|cut -f 3- -d '.')
5555
env:
5656
- name: CERTIFICATE_TYPE
5757
value: "node"
@@ -72,6 +72,11 @@ spec:
7272
secretKeyRef:
7373
name: ca.auth
7474
key: key
75+
- name: COCKROACH_HOST
76+
valueFrom:
77+
configMapKeyRef:
78+
name: cockroach
79+
key: cockroach.host
7580
volumeMounts:
7681
- name: certs
7782
mountPath: /cockroach-certs
@@ -134,8 +139,8 @@ spec:
134139
--host=127.0.0.1
135140
--host=$(hostname -f)
136141
--host=$(hostname -f|cut -f 1-2 -d '.')
137-
--host=cockroachdb-proxy
138-
--host=cockroachdb-proxy.$(hostname -f|cut -f 3- -d '.')
142+
--host=$(COCKROACH_HOST)
143+
--host=$(COCKROACH_HOST).$(hostname -f|cut -f 3- -d '.')
139144
refresh-and-forward
140145
env:
141146
- name: HTTP_PORT
@@ -165,6 +170,11 @@ spec:
165170
secretKeyRef:
166171
name: ca.auth
167172
key: key
173+
- name: COCKROACH_HOST
174+
valueFrom:
175+
configMapKeyRef:
176+
name: cockroach
177+
key: cockroach.host
168178
volumeMounts:
169179
- name: certs
170180
mountPath: /cockroach-certs

0 commit comments

Comments
 (0)