Skip to content

Accept root credentials from existing secret #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ spec:
- secretRef:
name: {{ include "openobserve.fullname" . }}
env:
{{- if .Values.auth.existingRootUserSecret.name }}
- name: ZO_ROOT_USER_EMAIL
valueFrom:
secretKeyRef:
name: {{ .Values.auth.existingRootUserSecret.name }}
key: {{ .Values.auth.existingRootUserSecret.emailKey }}
- name: ZO_ROOT_USER_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.auth.existingRootUserSecret.name }}
key: {{ .Values.auth.existingRootUserSecret.passwordKey }}
{{- end }}
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
4 changes: 3 additions & 1 deletion charts/openobserve-standalone/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ metadata:
labels: {{- include "openobserve.labels" . | nindent 4 }}
type: Opaque
stringData:
{{- if not .Values.auth.existingRootUserSecret.name }}
ZO_ROOT_USER_EMAIL: "{{ .Values.auth.ZO_ROOT_USER_EMAIL }}"
ZO_ROOT_USER_PASSWORD: "{{ .Values.auth.ZO_ROOT_USER_PASSWORD }}"
{{- end }}
{{- if not .Values.minio.enabled }}
ZO_S3_ACCESS_KEY: "{{ .Values.auth.ZO_S3_ACCESS_KEY }}"
{{- else }}
Expand All @@ -26,4 +28,4 @@ stringData:
AZURE_STORAGE_ACCOUNT_KEY: "{{ .Values.config.AZURE_STORAGE_ACCOUNT_KEY }}"
AZURE_STORAGE_ACCOUNT_NAME: "{{ .Values.config.AZURE_STORAGE_ACCOUNT_NAME }}"
{{- end }}
{{- end }}
{{- end }}
18 changes: 16 additions & 2 deletions charts/openobserve-standalone/templates/zplane-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,23 @@ spec:
{{- toYaml .Values.zplane.resources | nindent 12 }}
env:
- name: ZPLANE_ZO_USERNAME
value: "{{ .Values.auth.ZO_ROOT_USER_EMAIL }}"
{{- if .Values.auth.existingRootUserSecret.name }}
valueFrom:
secretKeyRef:
name: {{ .Values.auth.existingRootUserSecret.name }}
key: {{ .Values.auth.existingRootUserSecret.emailKey }}
{{- else }}
value: {{ .Values.auth.ZO_ROOT_USER_EMAIL | quote }}
{{- end }}
- name: ZPLANE_ZO_PASSWORD
value: "{{ .Values.auth.ZO_ROOT_USER_PASSWORD }}"
{{- if .Values.auth.existingRootUserSecret.name }}
valueFrom:
secretKeyRef:
name: {{ .Values.auth.existingRootUserSecret.name }}
key: {{ .Values.auth.existingRootUserSecret.passwordKey }}
{{- else }}
value: {{ .Values.auth.ZO_ROOT_USER_PASSWORD | quote }}
{{- end }}
- name: ZPLANE_ZO_ENDPOINT
value: "http://{{ include "openobserve.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.service.port }}"

Expand Down
12 changes: 12 additions & 0 deletions charts/openobserve-standalone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,21 @@ headless:

# Credentials for authentication
auth:
# Either specify root user credentials here, or use an existing secret.

# OpenObserve root user email
ZO_ROOT_USER_EMAIL: "root@example.com"
# OpenObserve root user password
ZO_ROOT_USER_PASSWORD: "Complexpass#123"

existingRootUserSecret:
# Existing secret with OpenObserve root user credentials.
name: ""
# Email key to be retrieved from existing secret
emailKey: "ZO_ROOT_USER_EMAIL"
# Password key to be retrieved from existing secret
passwordKey: "ZO_ROOT_USER_PASSWORD"

# do not need to set this if enabled minio is being used. settings will be picked from minio section. Also IRSA is preferred if on EKS. Set the Service account section with the correct IAM role ARN. Refer https://zinc.dev/docs/guide/ha_deployment/#amazon-eks-s3
ZO_S3_ACCESS_KEY: ""
ZO_S3_SECRET_KEY: ""
Expand Down