swarm
This commit is contained in:
43
helm/elasticsearch/templates/secrets.yaml
Normal file
43
helm/elasticsearch/templates/secrets.yaml
Normal file
@ -0,0 +1,43 @@
|
||||
{{- if (include "elasticsearch.createSecret" . ) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
elasticsearch-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "elasticsearch-password" "length" 16 "providedValues" (list "security.elasticPassword") "context" $) }}
|
||||
{{- end }}
|
||||
{{- if (include "elasticsearch.createTlsPasswordsSecret" . ) }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%s-tls-pass" (include "common.names.fullname" .) }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if .Values.security.tls.keystorePassword }}
|
||||
keystore-password: {{ default "" .Values.security.tls.keystorePassword | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.security.tls.truststorePassword }}
|
||||
truststore-password: {{ default "" .Values.security.tls.truststorePassword | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.security.tls.keyPassword }}
|
||||
key-password: {{ default "" .Values.security.tls.keyPassword | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
Reference in New Issue
Block a user