Skip to content

Commit

Permalink
Adds helm config capability to add custom admin password via txt file
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Dec 7, 2023
1 parent a781c6a commit abbb25e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions charts/opensearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ spec:
- name: keystore-{{ .secretName }}
secret: {{ toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.initialAdminPasswordTxtFile.enabled }}
- name: initialAdminPasswordTxt
hostPath:
path: {{ .Values.initialAdminPasswordTxtFile.mountPath }}
{{- end}}
{{ end }}
{{- if .Values.extraVolumes }}
# Currently some extra blocks accept strings
Expand Down Expand Up @@ -467,6 +472,10 @@ spec:
mountPath: {{ $.Values.opensearchHome }}/config/{{ $path }}
subPath: {{ $path }}
{{- end -}}
{{- if .Values.initialAdminPasswordTxtFile.enabled }}
- name: initialAdminPasswordTxt
mountPath: {{ $.Values.opensearchHome }}/config/initialAdminPassword.txt
{{- end }}
{{- if .Values.extraVolumeMounts }}
# Currently some extra blocks accept strings
# to continue with backwards compatibility this is being kept
Expand Down
4 changes: 4 additions & 0 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ image:
# Cluster will not spin-up without this unless demo config install is disabled.
adminPassword: ""

initialAdminPasswordTxtFile:
enabled: false
mountPath: /path/to/your/initialAdminPassword.txt

podAnnotations: {}
# iam.amazonaws.com/role: es-cluster

Expand Down

0 comments on commit abbb25e

Please sign in to comment.