aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/cassandra
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-02-01 15:05:48 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-02-10 10:43:26 +0100
commit09c55c801374ba8548789e143ab23f9cfbaec730 (patch)
treec1ab2c158fef930dc2b3ed4bfe645bdef0e0d576 /kubernetes/common/cassandra
parent6212bb27ae5202b9071b8a8493afcaecaa1b9249 (diff)
[COMMON][CASSANDRA] Service mesh compatible deploy
In order to make cassandra behaving smoothly on service mesh, we must make it listen to 127.0.0.1 but broadcasting the real IP address. This patch does it. Issue-ID: OOM-2252 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I2c494a987a7d2d72ddce84ac7fab15bcadbc8cf4
Diffstat (limited to 'kubernetes/common/cassandra')
-rw-r--r--kubernetes/common/cassandra/templates/statefulset.yaml8
1 files changed, 8 insertions, 0 deletions
diff --git a/kubernetes/common/cassandra/templates/statefulset.yaml b/kubernetes/common/cassandra/templates/statefulset.yaml
index 471f88f735..953c89d24d 100644
--- a/kubernetes/common/cassandra/templates/statefulset.yaml
+++ b/kubernetes/common/cassandra/templates/statefulset.yaml
@@ -100,6 +100,14 @@ spec:
value: {{ default "GossipingPropertyFileSnitch" .Values.config.endpoint_snitch | quote }}
- name: CASSANDRA_AUTHENTICATOR
value: {{ default "PasswordAuthenticator" .Values.config.authenticator | quote }}
+ {{- if include "common.onServiceMesh" . }}
+ - name: CASSANDRA_LISTEN_ADDRESS
+ value: "127.0.0.1"
+ - name: CASSANDRA_BROADCAST_ADDRESS
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ {{- end }}
- name: POD_IP
valueFrom:
fieldRef: