Skip to content

Commit

Permalink
feat: add oauth support
Browse files Browse the repository at this point in the history
  • Loading branch information
kozubaeff committed Jun 17, 2024
1 parent b646583 commit 4a036ba
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
19 changes: 18 additions & 1 deletion ytsaurus-ui-chart/templates/config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,21 @@ data:
clusters-config.json: |
{{ .Values.ui.clusterConfig | toJson }}
common.js: |
module.exports = { odinBaseUrl: {{ .Values.settings.odinBaseUrl | quote }}, uiSettings: {directDownload: {{ .Values.settings.directDownload | toJson }} }}
module.exports = {
odinBaseUrl: {{ .Values.settings.odinBaseUrl | quote }},
uiSettings: { directDownload: {{ .Values.settings.directDownload | toJson }} },
{{- if .Values.settings.oauth.enabled }}
ytOAuthSettings: {
baseURL: {{ .Values.settings.oauth.baseURL | quote }},
authPath: {{ .Values.settings.oauth.authPath | quote }},
logoutPath: {{ .Values.settings.oauth.logoutPath | quote }},
tokenPath: {{ .Values.settings.oauth.tokenPath | quote }},
clientId: process.env.{{ .Values.settings.oauth.clientIdEnvName }},
clientSecret: process.env.{{ .Values.settings.oauth.clientSecretEnvName }},
scope: {{ .Values.settings.oauth.scope | quote }},
buttonLabel: {{ .Values.settings.oauth.buttonLabel | quote }},
},
}
{{- else -}}
}
{{- end -}}
1 change: 0 additions & 1 deletion ytsaurus-ui-chart/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ spec:
targetPort: http
protocol: TCP
name: http
nodePort: 30000
selector:
{{- include "ytsaurus-ui-chart.selectorLabels" . | nindent 4 }}
16 changes: 14 additions & 2 deletions ytsaurus-ui-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ui:
image:
repository: ytsaurus/ui
pullPolicy: IfNotPresent
tag: ""
tag: "1.27.0"

clusterConfig:
clusters: []
Expand All @@ -15,7 +15,7 @@ ui:
# name: minisaurus
# primaryMaster:
# cellTag: 1
# proxy: http-proxies-lb.testing.svc.cluster.local
# proxy: http-proxies-lb.default.svc.cluster.local
# secure: false
# theme: lavander

Expand Down Expand Up @@ -73,6 +73,18 @@ fullnameOverride: ""
settings:
odinBaseUrl: ""
directDownload: true

# see https://github.com/ytsaurus/ytsaurus-ui/blob/main/packages/ui/docs/configuration.md#oauth
oauth:
enabled: false
baseURL: ""
authPath: ""
logoutPath: ""
tokenPath: ""
clientIdEnvName: ""
clientSecretEnvName: ""
scope: ""
buttonLabel: ""

securityContext: {}

Expand Down

0 comments on commit 4a036ba

Please sign in to comment.