-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor the coordinator to support Groot under the unified sch…
…ema architecture (#4087) - Refactor the coordinator to support Groot under the unified schema architecture - Add `flex-api-test` CI test workflow - Integrate coordinator into Groot's charts
- Loading branch information
1 parent
f2215cf
commit 7f09bb4
Showing
77 changed files
with
6,266 additions
and
1,138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
173 changes: 173 additions & 0 deletions
173
charts/graphscope-store/templates/portal/statefulset.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
{{- if .Values.portal.enabled }} | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: {{ include "graphscope-store.portal.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
app.kubernetes.io/component: portal | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
podManagementPolicy: {{ .Values.podManagementPolicy }} | ||
replicas: {{ .Values.portal.replicaCount }} | ||
selector: | ||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} | ||
app.kubernetes.io/component: portal | ||
serviceName: {{ printf "%s-portal-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} | ||
updateStrategy: {{- include "common.tplvalues.render" (dict "value" .Values.updateStrategy "context" $ ) | nindent 4 }} | ||
template: | ||
metadata: | ||
labels: {{- include "common.labels.standard" . | nindent 8 }} | ||
app.kubernetes.io/component: portal | ||
{{- if .Values.portal.podLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.portal.podLabels "context" $) | nindent 8 }} | ||
{{- end }} | ||
annotations: | ||
{{- if (include "graphscope-store.createConfigmap" .) }} | ||
checksum/configuration: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} | ||
{{- end }} | ||
{{- if .Values.portal.podAnnotations }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.portal.podAnnotations "context" $) | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- include "graphscope-store.imagePullSecrets" . | nindent 6 }} | ||
{{- if .Values.portal.hostAliases }} | ||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.portal.hostAliases "context" $) | nindent 8 }} | ||
{{- end }} | ||
hostNetwork: {{ .Values.portal.hostNetwork }} | ||
hostIPC: {{ .Values.portal.hostIPC }} | ||
{{- if .Values.portal.schedulerName }} | ||
schedulerName: {{ .Values.portal.schedulerName | quote }} | ||
{{- end }} | ||
{{- if .Values.nodeSelector }} | ||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.dnsPolicy }} | ||
dnsPolicy: {{ .Values.dnsPolicy | quote }} | ||
{{- end }} | ||
{{- if .Values.dnsConfig }} | ||
dnsConfig: {{- include "common.tplvalues.render" (dict "value" .Values.dnsConfig "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.tolerations }} | ||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.topologySpreadConstraints }} | ||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.terminationGracePeriodSeconds }} | ||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} | ||
{{- end }} | ||
{{- if .Values.priorityClassName }} | ||
priorityClassName: {{ .Values.priorityClassName }} | ||
{{- end }} | ||
{{- if .Values.podSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "graphscope-store.serviceAccountName" . }} | ||
{{- if .Values.initContainers }} | ||
initContainers: | ||
{{- if .Values.initContainers }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.initContainers "context" $ ) | nindent 8 }} | ||
{{- end }} | ||
{{- end }} | ||
containers: | ||
- name: coordinator | ||
image: {{ include "graphscope-store.portal.coordinator.image" . }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} | ||
{{- if .Values.containerSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }} | ||
{{- end }} | ||
command: | ||
- /etc/coordinator/setup.sh | ||
env: | ||
- name: CLUSTER_TYPE | ||
value: "KUBERNETES" | ||
- name: VERSION | ||
value: {{ .Chart.Version | quote }} | ||
- name: GROOT_USERNAME | ||
value: {{ .Values.auth.username | quote }} | ||
- name: GROOT_PASSWORD | ||
value: {{ .Values.auth.password | b64enc | quote }} | ||
- name: GROOT_GRPC_PORT | ||
value: {{ .Values.frontend.service.servicePort | quote }} | ||
- name: GROOT_GREMLIN_PORT | ||
value: {{ .Values.frontend.service.gremlinPort | quote }} | ||
- name: INSTANCE_NAME | ||
value: {{ .Release.Name | quote }} | ||
- name: NAMESPACE | ||
value: {{ .Release.Namespace | quote }} | ||
- name: SERVICE_PORT | ||
value: {{ .Values.portal.service.servicePort | quote }} | ||
- name: WORKSPACE | ||
value: {{ .Values.portal.runtimePath | quote }} | ||
- name: STUDIO_WRAPPER_ENDPOINT | ||
value: {{ .Values.portal.studioWrapperEndpoint | quote }} | ||
- name: SOLUTION | ||
value: "GRAPHSCOPE_INSIGHT" | ||
{{- range $key, $value := .Values.env }} | ||
- name: {{ $key }} | ||
value: {{ $value | quote }} | ||
{{- end }} | ||
ports: | ||
- name: http | ||
containerPort: {{ .Values.portal.service.servicePort }} | ||
{{- if .Values.portal.resources }} | ||
resources: {{- toYaml .Values.portal.resources | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.livenessProbe.enabled }} | ||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }} | ||
tcpSocket: | ||
port: http | ||
{{- end }} | ||
{{- if .Values.readinessProbe.enabled }} | ||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readinessProbe "enabled") "context" $) | nindent 12 }} | ||
tcpSocket: | ||
port: http | ||
{{- end }} | ||
volumeMounts: | ||
- name: runtime | ||
mountPath: {{ .Values.portal.runtimePath | quote }} | ||
- name: config | ||
mountPath: /etc/coordinator/setup.sh | ||
subPath: portal_setup.sh | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: {{ include "graphscope-store.configmapName" . }} | ||
defaultMode: 0755 | ||
{{- if and .Values.portal.persistence.enabled .Values.portal.persistence.existingClaim }} | ||
- name: runtime | ||
persistentVolumeClaim: | ||
claimName: {{ printf "%s" (tpl .Values.portal.persistence.existingClaim .) }} | ||
{{- else if not .Values.portal.persistence.enabled }} | ||
- name: runtime | ||
emptyDir: {} | ||
{{- else if and .Values.portal.persistence.enabled (not .Values.portal.persistence.existingClaim) }} | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: runtime | ||
{{- if .Values.persistence.annotations }} | ||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }} | ||
{{- end }} | ||
{{- if .Values.persistence.labels }} | ||
labels: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.labels "context" $) | nindent 10 }} | ||
{{- end }} | ||
spec: | ||
accessModes: | ||
{{- range .Values.persistence.accessModes }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
resources: | ||
requests: | ||
storage: {{ .Values.portal.persistence.size | quote }} | ||
{{ include "graphscope-store.storageClass" . | nindent 8 }} | ||
{{- if .Values.portal.persistence.selector }} | ||
selector: {{- include "graphscope-store.tplvalues.render" (dict "value" .Values.portal.persistence.selector "context" $) | nindent 10 }} | ||
{{- end -}} | ||
{{- end }} | ||
{{- end }} |
26 changes: 26 additions & 0 deletions
26
charts/graphscope-store/templates/portal/svc-headless.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{- if .Values.portal.enabled -}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ printf "%s-portal-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: {{- include "common.labels.standard" . | nindent 4 }} | ||
app.kubernetes.io/component: portal | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
{{- if .Values.commonAnnotations }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: ClusterIP | ||
clusterIP: None | ||
publishNotReadyAddresses: true | ||
ports: | ||
- name: http | ||
port: {{ .Values.portal.service.servicePort }} | ||
targetPort: http | ||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }} | ||
app.kubernetes.io/component: portal | ||
{{- end -}} |
Oops, something went wrong.