mirror of
https://github.com/bitnami/charts.git
synced 2026-03-15 14:57:16 +08:00
[bitnami/cassandra] Adjust the naming style for resources (#12207)
* adjust the naming style for resources name to make them not pass the length limit Signed-off-by: Gang Liu <gang.liu@daocloud.io> * fix conflict Signed-off-by: Gang Liu <gang.liu@daocloud.io> Signed-off-by: Gang Liu <gang.liu@daocloud.io>
This commit is contained in:
@@ -23,4 +23,4 @@ name: cassandra
|
||||
sources:
|
||||
- https://github.com/bitnami/containers/tree/main/bitnami/cassandra
|
||||
- http://cassandra.apache.org
|
||||
version: 9.4.1
|
||||
version: 9.4.2
|
||||
|
||||
@@ -155,7 +155,7 @@ Return the Cassandra TLS credentials secret
|
||||
{{- if $secretName -}}
|
||||
{{- printf "%s" (tpl $secretName $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-crt" (include "common.names.fullname" .) -}}
|
||||
{{- printf "%s-crt" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -176,7 +176,7 @@ Return true if a TLS credentials secret object should be created
|
||||
{{- if $secretName -}}
|
||||
{{- printf "%s" (tpl $secretName $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-tls-pass" (include "common.names.fullname" .) -}}
|
||||
{{- printf "%s-tls-pass" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -208,7 +208,7 @@ otherwise it generates a random value.
|
||||
{{- if .Values.tls.keystorePassword }}
|
||||
{{- .Values.tls.keystorePassword }}
|
||||
{{- else }}
|
||||
{{- include "getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (printf "%s-%s" (include "common.names.fullname" .) "tls-pass") "Length" 10 "Key" "keystore-password") -}}
|
||||
{{- include "getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (printf "%s-%s" (include "common.names.fullname" .) "tls-pass" | trunc 63 | trimSuffix "-") "Length" 10 "Key" "keystore-password") -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -216,7 +216,7 @@ otherwise it generates a random value.
|
||||
{{- if .Values.tls.truststorePassword }}
|
||||
{{- .Values.tls.truststorePassword }}
|
||||
{{- else }}
|
||||
{{- include "getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (printf "%s-%s" (include "common.names.fullname" .) "tls-pass") "Length" 10 "Key" "truststore-password") -}}
|
||||
{{- include "getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (printf "%s-%s" (include "common.names.fullname" .) "tls-pass" | trunc 63 | trimSuffix "-") "Length" 10 "Key" "truststore-password") -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -230,7 +230,7 @@ otherwise it generates a new one.
|
||||
{{- $ca := "" -}}
|
||||
{{- $crt := "" -}}
|
||||
{{- $key := "" -}}
|
||||
{{- $tlsCert := (lookup "v1" "Secret" .Release.Namespace (printf "%s-%s" (include "common.names.fullname" .) "crt")).data -}}
|
||||
{{- $tlsCert := (lookup "v1" "Secret" .Release.Namespace (printf "%s-%s" (include "common.names.fullname" .) "crt" | trunc 63 | trimSuffix "-")).data -}}
|
||||
|
||||
{{- if $tlsCert }}
|
||||
{{- $ca = (get $tlsCert "ca.crt" | b64dec) -}}
|
||||
@@ -242,7 +242,7 @@ otherwise it generates a new one.
|
||||
{{- $releaseNamespace := .Release.Namespace }}
|
||||
{{- $clusterDomain := .Values.clusterDomain }}
|
||||
{{- $serviceName := include "common.names.fullname" . }}
|
||||
{{- $headlessServiceName := printf "%s-headless" (include "common.names.fullname" .) }}
|
||||
{{- $headlessServiceName := printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
{{- $altNames := list (printf "*.%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) (printf "*.%s.%s.svc.%s" $headlessServiceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $headlessServiceName $releaseNamespace $clusterDomain) "localhost" "127.0.0.1" $fullname }}
|
||||
{{- $cert := genSignedCert $fullname nil $altNames 365 $caFull }}
|
||||
{{- $ca = $caFull.Cert -}}
|
||||
|
||||
@@ -20,7 +20,7 @@ data:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}-tls-pass
|
||||
name: {{ printf "%s-tls-pass" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}-headless
|
||||
name: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
|
||||
@@ -13,7 +13,7 @@ metadata:
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
||||
serviceName: {{ include "common.names.fullname" . }}-headless
|
||||
serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
podManagementPolicy: {{ .Values.podManagementPolicy }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
updateStrategy: {{- include "common.tplvalues.render" (dict "value" .Values.updateStrategy "context" $ ) | nindent 4 }}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}-crt
|
||||
name: {{ printf "%s-crt" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
|
||||
Reference in New Issue
Block a user