-
Notifications
You must be signed in to change notification settings - Fork 4
/
configmap-studio.yaml
133 lines (117 loc) Β· 6.27 KB
/
configmap-studio.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{{$webhookHost := .Values.global.scmProviders.webhookHost | default .Values.global.host }}
apiVersion: v1
kind: ConfigMap
metadata:
name: studio
data:
{{- with .Values.global.envVars}}
{{- toYaml . | nindent 2 }}
{{- end }}
ALLOWED_HOSTS: "*"
API_URL: "{{include "ingress.protocol" . }}://{{.Values.global.host }}{{- if and .Values.global.basePath (not (eq .Values.global.basePath "/")) }}/{{ include "studio.basePath" . }}{{- end }}/api"
UI_URL: "{{include "ingress.protocol" . }}://{{.Values.global.host }}/{{- if and .Values.global.basePath (not (eq .Values.global.basePath "/")) }}{{ include "studio.basePath" . }}{{- end }}"
{{- if and .Values.global.basePath (not (eq .Values.global.basePath "/")) }}
BASE_PATH: /{{ include "studio.basePath" . }}
{{- end }}
{{- if .Values.global.scmProviders.bitbucket.url }}
BITBUCKET_URL: {{.Values.global.scmProviders.bitbucket.url | quote }}
{{- end }}
{{- if .Values.global.scmProviders.bitbucket.apiUrl }}
BITBUCKET_API_URL: {{ .Values.global.scmProviders.bitbucket.apiUrl | quote}}
{{- end }}
{{- if and .Values.global.scmProviders.bitbucket.enabled $webhookHost }}
BITBUCKET_WEBHOOK_URL: "{{include "ingress.protocol" . }}://{{ $webhookHost }}/webhook/bitbucket/"
{{- end }}
ENABLE_BLOBVAULT: "True"
{{- if .Values.global.blobvault.bucket }}
BLOBVAULT_BUCKET: {{ .Values.global.blobvault.bucket | quote }}
{{- if .Values.global.blobvault.regionName }}
BLOBVAULT_AWS_REGION: {{ .Values.global.blobvault.regionName }}
{{- end }}
{{- if .Values.global.blobvault.endpointUrl }}
BLOBVAULT_ENDPOINT_URL: {{ .Values.global.blobvault.endpointUrl }}
BLOBVAULT_ENDPOINT_URL_FE: {{ .Values.global.blobvault.endpointUrl }}
{{- end }}
{{- else }}
BLOBVAULT_LOCAL_ENABLED: "True"
BLOBVAULT_LOCAL_PATH: "/blobvault"
BLOBVAULT_ENDPOINT_URL: "{{include "ingress.protocol" . }}://{{.Values.global.host }}{{- if and .Values.global.basePath (not (eq .Values.global.basePath "/")) }}/{{ include "studio.basePath" . }}{{- end }}/blobvault"
BLOBVAULT_ENDPOINT_URL_FE: "{{include "ingress.protocol" . }}://{{.Values.global.host }}{{- if and .Values.global.basePath (not (eq .Values.global.basePath "/")) }}/{{ include "studio.basePath" . }}{{- end }}/blobvault"
{{- end }}
{{- if .Values.global.celery.brokerUrl }}
CELERY_BROKER_URL: {{ .Values.global.celery.brokerUrl }}
{{- else }}
CELERY_BROKER_URL: "redis://{{ .Values.redis.fullnameOverride }}-master.{{ .Release.Namespace }}.svc.cluster.local:6379"
{{- end }}
{{- if .Values.global.celery.resultBackend }}
CELERY_RESULT_BACKEND: {{ .Values.global.celery.resultBackend }}
{{- else }}
CELERY_RESULT_BACKEND: "redis://{{ .Values.redis.fullnameOverride }}-master.{{ .Release.Namespace }}.svc.cluster.local:6379"
{{- end }}
{{- if .Values.global.celery.resultBackend }}
REDIS_URL: {{ .Values.global.celery.resultBackend }}
{{- else }}
REDIS_URL: "redis://{{ .Values.redis.fullnameOverride }}-master.{{ .Release.Namespace }}.svc.cluster.local:6379"
{{- end }}
{{- if .Values.global.scmProviders.github.apiUrl }}
GITHUB_API_URL: {{ .Values.global.scmProviders.github.apiUrl | quote }}
{{- end }}
{{- if .Values.global.scmProviders.github.url }}
GITHUB_URL: {{ .Values.global.scmProviders.github.url | quote }}
{{- end }}
{{- if and .Values.global.scmProviders.github.enabled $webhookHost }}
GITHUB_WEBHOOK_URL: "{{include "ingress.protocol" . }}://{{ $webhookHost }}/webhook/github/"
{{- end }}
{{- if .Values.global.scmProviders.github.clientId }}
GITHUB_APP_CLIENT_ID: {{ .Values.global.scmProviders.github.clientId | quote }}
{{- end }}
{{- if .Values.global.scmProviders.github.appId }}
GITHUB_APP_ID: {{ .Values.global.scmProviders.github.appId | quote }}
{{- end }}
{{- if .Values.global.scmProviders.github.appName }}
GITHUB_APP_NAME: {{ .Values.global.scmProviders.github.appName | quote }}
{{- end }}
{{- if .Values.global.scmProviders.gitlab.url }}
GITLAB_URL: {{ .Values.global.scmProviders.gitlab.url | quote}}
{{- end }}
{{- if and .Values.global.scmProviders.gitlab.enabled $webhookHost }}
GITLAB_WEBHOOK_URL: "{{include "ingress.protocol" . }}://{{ $webhookHost }}/webhook/gitlab/"
{{- end }}
{{- if .Values.global.maxViews }}
MAX_VIEWS: {{ .Values.global.maxViews | quote }}
{{- end }}
{{- if .Values.global.maxTeams }}
MAX_TEAMS: {{ .Values.global.maxTeams | quote }}
{{- end }}
{{- $scmProviders := list }}
{{- if .Values.global.scmProviders.gitlab.enabled }}
{{- $scmProviders = append $scmProviders "gitlab" }}
{{- end }}
{{- if .Values.global.scmProviders.github.enabled }}
{{- $scmProviders = append $scmProviders "github" }}
{{- end }}
{{- if .Values.global.scmProviders.bitbucket.enabled }}
{{- $scmProviders = append $scmProviders "bitbucket" }}
{{- end }}
SCM_PROVIDERS: {{ $scmProviders | join "," | quote }}
SOCIAL_AUTH_REDIRECT_IS_HTTPS: "False"
{{- if .Values.global.ingress.enabled }}
SOCIAL_AUTH_ALLOWED_REDIRECT_HOSTS: "studio-ui.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.studioUi.service.port }},studio-backend.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.studioBackend.service.port }},{{ .Values.global.host }}"
{{- else }}
SOCIAL_AUTH_ALLOWED_REDIRECT_HOSTS: "studio-ui.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.studioUi.service.port }},studio-backend.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.studioBackend.service.port }}"
{{- end }}
{{- $dvcx := .Values.global.dvcx | default dict }}
{{- $dvcxClickhouse := $dvcx.clickHouse | default dict }}
DQL_ENABLED: {{ $dvcx.enabled | default "False" | quote }}
DQL_UDF_ENABLED: {{ $dvcx.udfEnabled | default "False" | quote }}
DVCX_ENABLED: {{ $dvcx.enabled | default "False" | quote }}
DVCX_UDF_ENABLED: {{ $dvcx.udfEnabled | default "False" | quote }}
{{- if ((.Values.ray).enabled) }}
DVCX_RAY_URL: "http://{{ .Release.Name }}-ray-head-svc.{{ .Release.Namespace }}.svc.cluster.local:8265"
{{- end }}
DQL_ROOT_DIR: {{ $dvcx.rootDir | default "/tmp" | quote }}
DQL_CH_HOST: {{ $dvcxClickhouse.host | default "" | quote }}
DQL_CH_DATABASE: {{ $dvcxClickhouse.database | default "" | quote }}
DVCX_ROOT_DIR: {{ $dvcx.rootDir | default "/tmp" | quote }}
DVCX_CH_HOST: {{ $dvcxClickhouse.host | default "" | quote }}
DVCX_CH_DATABASE: {{ $dvcxClickhouse.database | default "" | quote }}