Skip to content

Commit

Permalink
feat: Default User Credentials (#321)
Browse files Browse the repository at this point in the history
Co-authored-by: david-leifker <114954101+david-leifker@users.noreply.github.com>
  • Loading branch information
Seokyun-Ha and david-leifker authored Jun 15, 2023
1 parent 9746aa2 commit 40ec8f8
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/datahub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart for LinkedIn DataHub
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.2.173
version: 0.2.174
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 0.10.4
Expand Down
6 changes: 6 additions & 0 deletions charts/datahub/quickstart-values-with-neo4j.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ datahub-frontend:
# Set up ingress to expose react front-end
ingress:
enabled: false
defaultUserCredentials: {}
# randomAdminPassword: true
# # You can also set specific passwords for default users
# # manualValues: |
# # datahub:manualPassword
# # initialViewer:manualPassword

acryl-datahub-actions:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ spec:
defaultMode: 0444
secretName: {{ .name }}
{{- end }}
{{- if .Values.defaultUserCredentials }}
- name: datahub-default-users
secret:
defaultMode: 0444
secretName: {{ printf "%s-user-secret" .Release.Name }}
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -217,6 +223,11 @@ spec:
- name: datahub-certs-dir
mountPath: {{ .path | default "/mnt/certs" }}
{{- end }}
{{- if .Values.defaultUserCredentials }}
- name: datahub-default-users
mountPath: /datahub-frontend/conf/user.props
subPath: user.props
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.defaultUserCredentials }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-user-secret" .Release.Name }}
labels:
{{- include "datahub-frontend.labels" . | nindent 4 }}
type: Opaque
data:
user.props:
{{- if .Values.defaultUserCredentials.randomAdminPassword }}
{{ printf "datahub:%s" (randAlphaNum 32) | b64enc | quote }}
{{- else if .Values.defaultUserCredentials.manualValues }}
{{ .Values.defaultUserCredentials.manualValues | b64enc | quote }}
{{- end }}
{{- end -}}
6 changes: 6 additions & 0 deletions charts/datahub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ datahub-frontend:
# Set up ingress to expose react front-end
ingress:
enabled: false
defaultUserCredentials: {}
# randomAdminPassword: true
# # You can also set specific passwords for default users
# # manualValues: |
# # datahub:manualPassword
# # initialViewer:manualPassword

acryl-datahub-actions:
enabled: true
Expand Down

0 comments on commit 40ec8f8

Please sign in to comment.