[bitnami/cassandra] fix: 🐛 🔒 Do not expose tls internode port unless encryption is set (#25045)

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
Javier J. Salmerón-García
2024-04-09 10:08:46 +02:00
committed by GitHub
parent e35f1d65e2
commit 464738be5c
3 changed files with 6 additions and 1 deletions

View File

@@ -32,4 +32,4 @@ maintainers:
name: cassandra
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/cassandra
version: 11.0.2
version: 11.0.3

View File

@@ -42,13 +42,16 @@ spec:
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- if .Values.metrics.enabled }}
- name: metrics
port: {{ .Values.service.ports.metrics }}
targetPort: metrics
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.metrics)) }}
nodePort: {{ .Values.service.nodePorts.metrics }}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- end }}
{{- if .Values.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
{{- end }}

View File

@@ -423,6 +423,7 @@ spec:
{{- else if .Values.hostPorts.intra }}
hostPort: {{ .Values.hostPorts.intra }}
{{- end }}
{{- if (ne (include "cassandra.internode.tlsEncryption" .) "none") }}
- name: tls
containerPort: {{ .Values.containerPorts.tls | default "7001" }}
{{- if .Values.hostNetwork }}
@@ -430,6 +431,7 @@ spec:
{{- else if .Values.hostPorts.tls }}
hostPort: {{ .Values.hostPorts.tls }}
{{- end }}
{{- end }}
- name: jmx
containerPort: {{ .Values.containerPorts.jmx | default "7199" }}
{{- if .Values.hostNetwork }}