@@ -142,6 +142,75 @@ spec:
142142 {{- if .Values.store.extraVolumeMounts }}
143143 {{- include "common.tplvalues.render" (dict "value" .Values.store.extraVolumeMounts "context" $) | nindent 12 }}
144144 {{- end }}
145+ {{- if .Values.portal.enabled }}
146+ - name : gs-coordinator
147+ image : {{ include "graphscope-store.portal.coordinator.image" . }}
148+ imagePullPolicy : {{ .Values.image.pullPolicy | quote }}
149+ {{- if .Values.containerSecurityContext.enabled }}
150+ securityContext : {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
151+ {{- end }}
152+ command :
153+ - /etc/coordinator/setup.sh
154+ env :
155+ - name : CLUSTER_TYPE
156+ value : " KUBERNETES"
157+ - name : VERSION
158+ value : {{ .Chart.Version | quote }}
159+ - name : GROOT_USERNAME
160+ value : {{ .Values.auth.username | quote }}
161+ - name : GROOT_PASSWORD
162+ value : {{ .Values.auth.password | b64enc | quote }}
163+ - name : GROOT_GRPC_PORT
164+ value : {{ .Values.frontend.service.servicePort | quote }}
165+ - name : GROOT_GREMLIN_PORT
166+ value : {{ .Values.frontend.service.gremlinPort | quote }}
167+ - name : GROOT_CYPHER_PORT
168+ value : {{ .Values.frontend.service.cypherPort | quote }}
169+ {{- if not .Values.distributed.enabled }}
170+ - name : GROOT_FRONTEND_POD_SUFFIX
171+ value : {{ printf "%s-store" (include "graphscope-store.name" .) }}
172+ {{- end }}
173+ - name : INSTANCE_NAME
174+ value : {{ .Release.Name | quote }}
175+ - name : NAMESPACE
176+ value : {{ .Release.Namespace | quote }}
177+ - name : SERVICE_PORT
178+ value : {{ .Values.portal.service.servicePort | quote }}
179+ - name : WORKSPACE
180+ value : {{ .Values.portal.runtimePath | quote }}
181+ - name : STUDIO_WRAPPER_ENDPOINT
182+ value : {{ .Values.portal.studioWrapperEndpoint | quote }}
183+ - name : BASEID
184+ value : {{ .Values.portal.baseId | quote }}
185+ - name : SOLUTION
186+ value : " GRAPHSCOPE_INSIGHT"
187+ {{- range $key, $value := .Values.env }}
188+ - name : {{ $key }}
189+ value : {{ $value | quote }}
190+ {{- end }}
191+ ports :
192+ - name : http
193+ containerPort : {{ .Values.portal.service.servicePort }}
194+ {{- if .Values.portal.resources }}
195+ resources : {{- toYaml .Values.portal.resources | nindent 12 }}
196+ {{- end }}
197+ {{- if .Values.livenessProbe.enabled }}
198+ livenessProbe : {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }}
199+ tcpSocket :
200+ port : http
201+ {{- end }}
202+ {{- if .Values.readinessProbe.enabled }}
203+ readinessProbe : {{- include "common.tplvalues.render" (dict "value" (omit .Values.readinessProbe "enabled") "context" $) | nindent 12 }}
204+ tcpSocket :
205+ port : http
206+ {{- end }}
207+ volumeMounts :
208+ - name : runtime
209+ mountPath : {{ .Values.portal.runtimePath | quote }}
210+ - name : config
211+ mountPath : /etc/coordinator/setup.sh
212+ subPath : portal_setup.sh
213+ {{- end }}
145214 volumes :
146215 - name : config
147216 configMap :
@@ -166,6 +235,14 @@ spec:
166235 persistentVolumeClaim :
167236 claimName : {{ printf "%s" (tpl .Values.logPersistence.existingClaim .) }}
168237 {{- end }}
238+ {{- if and .Values.portal.enabled .Values.portal.persistence.enabled .Values.portal.persistence.existingClaim }}
239+ - name : runtime
240+ persistentVolumeClaim :
241+ claimName : {{ printf "%s" (tpl .Values.portal.persistence.existingClaim .) }}
242+ {{- else if and .Values.portal.enabled (not .Values.portal.persistence.enabled) }}
243+ - name : runtime
244+ emptyDir : {}
245+ {{- end }}
169246 volumeClaimTemplates :
170247 {{- if and .Values.store.persistence.enabled (not .Values.store.persistence.existingClaim) }}
171248 - metadata :
@@ -211,4 +288,26 @@ spec:
211288 selector : {{- include "graphscope-store.tplvalues.render" (dict "value" .Values.logPersistence.selector "context" $) | nindent 10 }}
212289 {{- end -}}
213290 {{- end }}
291+ {{- if and .Values.portal.enabled .Values.portal.persistence.enabled (not .Values.portal.persistence.existingClaim) }}
292+ - metadata :
293+ name : runtime
294+ {{- if .Values.persistence.annotations }}
295+ annotations : {{- include "common.tplvalues.render" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }}
296+ {{- end }}
297+ {{- if .Values.persistence.labels }}
298+ labels : {{- include "common.tplvalues.render" (dict "value" .Values.persistence.labels "context" $) | nindent 10 }}
299+ {{- end }}
300+ spec :
301+ accessModes :
302+ {{- range .Values.persistence.accessModes }}
303+ - {{ . | quote }}
304+ {{- end }}
305+ resources :
306+ requests :
307+ storage : {{ .Values.portal.persistence.size | quote }}
308+ {{ include "graphscope-store.storageClass" . | nindent 8 }}
309+ {{- if .Values.portal.persistence.selector }}
310+ selector : {{- include "graphscope-store.tplvalues.render" (dict "value" .Values.portal.persistence.selector "context" $) | nindent 10 }}
311+ {{- end -}}
312+ {{- end }}
214313{{- end }}
0 commit comments