mirror of
https://github.com/bitnami/charts.git
synced 2026-03-16 06:47:30 +08:00
[bitnami/tomcat] Add existing secret management (#23558)
This commit is contained in:
@@ -47,6 +47,13 @@ Return the proper Docker Image Registry Secret Names
|
||||
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.volumePermissions.image .Values.metrics.jmx.image) "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Tomcat credential secret name
|
||||
*/}}
|
||||
{{- define "tomcat.secretName" -}}
|
||||
{{- coalesce .Values.existingSecret (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Check if there are rolling tags in the images
|
||||
*/}}
|
||||
|
||||
@@ -82,7 +82,7 @@ containers:
|
||||
- name: TOMCAT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
name: {{ include "tomcat.secretName" . }}
|
||||
key: tomcat-password
|
||||
- name: TOMCAT_ALLOW_REMOTE_MANAGEMENT
|
||||
value: {{ .Values.tomcatAllowRemoteManagement | quote }}
|
||||
|
||||
@@ -3,6 +3,7 @@ Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if not .Values.existingSecret }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
@@ -15,3 +16,4 @@ metadata:
|
||||
type: Opaque
|
||||
data:
|
||||
tomcat-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "tomcat-password" "providedValues" (list "tomcatPassword") "length" 10 "strong" false "context" $) }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user