-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a per-install name for securityconfig secret (#41)
* feat: per-install name for securityconfig secret Give the securityconfig secret an autogenerated unique name to facilitate installing the chart multiple times in the same namespace. This helps with the common case of sharing the securityconfig between multiple instantiations of this chart to construct an Opensearch cluster. Signed-off-by: Scott Leggett <[email protected]> * feat: update logic to handle externally defined secrets See the comments describing how this is intended to work. Signed-off-by: Scott Leggett <[email protected]> * chore: bump opensearch chart version Signed-off-by: Scott Leggett <[email protected]> * chore: add securityConfig to README Signed-off-by: Scott Leggett <[email protected]>
- Loading branch information
Showing
5 changed files
with
37 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
{{- if and .Values.securityConfig.config.securityConfigSecret .Values.securityConfig.config.data }} | ||
{{- if .Values.securityConfig.config.data -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ .Values.securityConfig.config.securityConfigSecret }} | ||
name: {{ include "opensearch.uname" . }}-securityconfig | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ .Chart.Name }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
type: Opaque | ||
data: | ||
{{- range $key, $val := .Values.securityConfig.config.data }} | ||
{{ $key }}: {{ $val | b64enc | quote }} | ||
{{- end }} | ||
{{- end}} | ||
stringData: | ||
{{- range $key, $val := .Values.securityConfig.config.data }} | ||
{{ $key }}: | | ||
{{- $val | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters