summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/cassandra/templates/statefulset.yaml
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2019-12-18 13:15:57 +0100
committerBorislav Glozman <Borislav.Glozman@amdocs.com>2020-02-02 13:26:49 +0000
commit239bb3e18494584587ee1a6eb482f022b9e32d44 (patch)
treefe0d59e234ae5431fbad747f0ab9bd380db1c48f /kubernetes/common/cassandra/templates/statefulset.yaml
parent0256e4b2031cec54abd07e7c6745176b83815cb4 (diff)
[COMMON] Make cassandra service mesh compliant
When service mesh is enabled, cassandra needs to listen to `127.0.0.1` instead of POD_IP but must broadcast using POD_IP. Change-Id: If96acd56a092a893f524a69ee83406c9cb70b3e7 Issue-ID: OOM-2252 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Diffstat (limited to 'kubernetes/common/cassandra/templates/statefulset.yaml')
-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 b737a8f960..2f262ca149 100644
--- a/kubernetes/common/cassandra/templates/statefulset.yaml
+++ b/kubernetes/common/cassandra/templates/statefulset.yaml
@@ -115,6 +115,14 @@ spec:
value: {{ default "GossipingPropertyFileSnitch" .Values.config.endpoint_snitch | quote }}
- name: CASSANDRA_AUTHENTICATOR
value: {{ default "PasswordAuthenticator" .Values.config.authenticator | quote }}
+ {{- if (include "common.serviceMesh" .) }}
+ - name: CASSANDRA_LISTEN_ADDRESS
+ value: "127.0.0.1"
+ - name: CASSANDRA_BROADCAST_ADDRESS
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ {{- end }}
- name: POD_IP
valueFrom:
fieldRef: