Files
cozystack/packages/apps/opensearch/templates/users.yaml
T
MatthieuandClaude Opus 4.5 25ff583f34 [apps] Add managed OpenSearch service
Add OpenSearch application with operator and resource definition:
- App chart with multi-version support (v1/v2/v3), TLS, auth, dashboards
- OpenSearch operator wrapper (opster v2.8.0) with sysctl daemonset
- ApplicationDefinition for Cozystack platform integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Matthieu <matthieu@hidora.com>
2026-02-16 22:54:41 +01:00

22 lines
759 B
YAML

{{- range $username, $user := .Values.users }}
{{- $existingSecret := lookup "v1" "Secret" $.Release.Namespace (printf "%s-user-%s" $.Release.Name $username) }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $.Release.Name }}-user-{{ $username }}
labels:
opensearch.opster.io/credentials: "true"
type: kubernetes.io/basic-auth
stringData:
username: {{ $username | quote }}
{{- if $user.password }}
password: {{ $user.password | quote }}
{{- else if and $existingSecret (hasKey $existingSecret.data "password") }}
password: {{ index $existingSecret.data "password" | b64dec | quote }}
{{- else }}
password: {{ randAlphaNum 16 | quote }}
{{- end }}
roles: {{ $user.roles | default (list "readall") | join "," | quote }}
{{- end }}