You've already forked DataMate
@@ -22,3 +22,23 @@ version: 0.0.1
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "0.0.1"
|
||||
|
||||
dependencies:
|
||||
- name: backend
|
||||
version: 0.0.1
|
||||
- name: frontend
|
||||
version: 0.0.1
|
||||
- name: database
|
||||
version: 0.0.1
|
||||
- name: backend-python
|
||||
version: 0.0.1
|
||||
- name: kuberay-operator
|
||||
version: 1.4.2
|
||||
condition: ray-cluster.enabled
|
||||
- name: ray-cluster
|
||||
version: 1.4.2
|
||||
condition: ray-cluster.enabled
|
||||
- name: runtime
|
||||
version: 0.0.1
|
||||
condition: runtime.enabled
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ Common labels
|
||||
*/}}
|
||||
{{- define "backend.labels" -}}
|
||||
helm.sh/chart: {{ include "backend.chart" . }}
|
||||
app: {{ .Release.Name }}
|
||||
{{ include "backend.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
|
||||
23
deployment/helm/datamate/charts/runtime/.helmignore
Normal file
23
deployment/helm/datamate/charts/runtime/.helmignore
Normal file
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
29
deployment/helm/datamate/charts/runtime/Chart.yaml
Normal file
29
deployment/helm/datamate/charts/runtime/Chart.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
apiVersion: v2
|
||||
name: runtime
|
||||
description: A Helm chart for Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
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.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.0.1
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "0.0.1"
|
||||
|
||||
dependencies:
|
||||
- name: database
|
||||
repository: file://../database
|
||||
version: 0.0.1
|
||||
@@ -0,0 +1,76 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "runtime.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "runtime.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "runtime.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "runtime.labels" -}}
|
||||
helm.sh/chart: {{ include "runtime.chart" . }}
|
||||
app: {{ .Release.Name }}
|
||||
{{ include "runtime.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "runtime.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "runtime.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "runtime.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "runtime.fullname" .) .Values.serviceAccount.name -}}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Name of image
|
||||
*/}}
|
||||
{{- define "runtime.image" -}}
|
||||
{{- $name := default .Values.image.repository .Values.global.image.runtime.name }}
|
||||
{{- $tag := default .Values.image.tag .Values.global.image.runtime.tag }}
|
||||
{{- if .Values.global.image.repository }}
|
||||
{{- .Values.global.image.repository | trimSuffix "/" }}/{{ $name }}:{{ $tag }}
|
||||
{{- else }}
|
||||
{{- $name }}:{{ $tag }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,86 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "runtime.fullname" . }}
|
||||
labels:
|
||||
{{- include "runtime.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "runtime.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "runtime.labels" . | nindent 8 }}
|
||||
{{- with .Values.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "runtime.serviceAccountName" . }}
|
||||
{{- with .Values.podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
{{- with .Values.args }}
|
||||
args:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: "{{ include "runtime.image" . }}"
|
||||
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.global.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
{{- with .Values.livenessProbe }}
|
||||
livenessProbe:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.readinessProbe }}
|
||||
readinessProbe:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.env }}
|
||||
env:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.volumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.volumes }}
|
||||
volumes:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "runtime.fullname" . }}
|
||||
labels:
|
||||
{{- include "runtime.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
name: {{ .Chart.Name }}
|
||||
selector:
|
||||
{{- include "runtime.selectorLabels" . | nindent 4 }}
|
||||
@@ -0,0 +1,13 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "runtime.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "runtime.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
|
||||
{{- end }}
|
||||
108
deployment/helm/datamate/charts/runtime/values.yaml
Normal file
108
deployment/helm/datamate/charts/runtime/values.yaml
Normal file
@@ -0,0 +1,108 @@
|
||||
# Default values for datamate.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
|
||||
replicaCount: 1
|
||||
|
||||
# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
|
||||
image:
|
||||
repository: "datamate-runtime"
|
||||
# This sets the pull policy for images.
|
||||
pullPolicy: "IfNotPresent"
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: "latest"
|
||||
|
||||
# This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
imagePullSecrets: []
|
||||
# This is to override the chart name.
|
||||
nameOverride: "datamate-runtime"
|
||||
fullnameOverride: "datamate-runtime"
|
||||
|
||||
env: []
|
||||
|
||||
# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Automatically mount a ServiceAccount's API credentials?
|
||||
automount: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
# This is for setting Kubernetes Annotations to a Pod.
|
||||
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
podAnnotations: {}
|
||||
# This is for setting Kubernetes Labels to a Pod.
|
||||
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
podLabels: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
|
||||
service:
|
||||
# This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
|
||||
type: ClusterIP
|
||||
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
|
||||
port: 8081
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
||||
# livenessProbe:
|
||||
# httpGet:
|
||||
# path: /
|
||||
# port: http
|
||||
# readinessProbe:
|
||||
# httpGet:
|
||||
# path: /
|
||||
# port: http
|
||||
|
||||
# This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
# Additional volumes on the output Deployment definition.
|
||||
volumes: []
|
||||
# - name: foo
|
||||
# secret:
|
||||
# secretName: mysecret
|
||||
# optional: false
|
||||
|
||||
# Additional volumeMounts on the output Deployment definition.
|
||||
volumeMounts: []
|
||||
# - name: foo
|
||||
# mountPath: "/etc/foo"
|
||||
# readOnly: true
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
@@ -112,7 +112,45 @@ frontend:
|
||||
name: datamate-nginx-conf
|
||||
subPath: backend.conf
|
||||
|
||||
runtime:
|
||||
enabled: false
|
||||
args: &runtimeArgs
|
||||
- python
|
||||
- /opt/runtime/datamate/operator_runtime.py
|
||||
- --port
|
||||
- "8081"
|
||||
env: &runtimeEnv
|
||||
- name: MYSQL_HOST
|
||||
value: "datamate-database"
|
||||
- name: MYSQL_PORT
|
||||
value: "3306"
|
||||
- name: MYSQL_USER
|
||||
value: "root"
|
||||
- name: MYSQL_PASSWORD
|
||||
value: *dbPass
|
||||
- name: MYSQL_DATABASE
|
||||
value: "datamate"
|
||||
volumes:
|
||||
- *datasetVolume
|
||||
- *flowVolume
|
||||
- *logVolume
|
||||
- *operatorVolume
|
||||
volumeMounts: &runtimeVolumeMounts
|
||||
- mountPath: /tmp/ray
|
||||
name: log-volume
|
||||
subPath: ray/head
|
||||
- mountPath: /var/log/datamate
|
||||
name: log-volume
|
||||
- mountPath: /dataset
|
||||
name: dataset-volume
|
||||
- mountPath: /flow
|
||||
name: flow-volume
|
||||
- mountPath: /opt/runtime/datamate/ops/user
|
||||
name: operator-volume
|
||||
subPath: extract
|
||||
|
||||
ray-cluster:
|
||||
enabled: true
|
||||
head:
|
||||
volumes:
|
||||
- *datasetVolume
|
||||
@@ -134,37 +172,11 @@ ray-cluster:
|
||||
- name: runtime
|
||||
image: datamate-runtime
|
||||
imagePullPolicy: IfNotPresent
|
||||
args:
|
||||
- python
|
||||
- /opt/runtime/datamate/operator_runtime.py
|
||||
- --port
|
||||
- "8081"
|
||||
env:
|
||||
- name: MYSQL_HOST
|
||||
value: "datamate-database"
|
||||
- name: MYSQL_PORT
|
||||
value: "3306"
|
||||
- name: MYSQL_USER
|
||||
value: "root"
|
||||
- name: MYSQL_PASSWORD
|
||||
value: "password"
|
||||
- name: MYSQL_DATABASE
|
||||
value: "datamate"
|
||||
args: *runtimeArgs
|
||||
env: *runtimeEnv
|
||||
ports:
|
||||
- containerPort: 8081
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/ray
|
||||
name: log-volume
|
||||
subPath: ray/head
|
||||
- mountPath: /var/log/datamate
|
||||
name: log-volume
|
||||
- mountPath: /dataset
|
||||
name: dataset-volume
|
||||
- mountPath: /flow
|
||||
name: flow-volume
|
||||
- mountPath: /opt/runtime/datamate/ops/user
|
||||
name: operator-volume
|
||||
subPath: extract
|
||||
volumeMounts: *runtimeVolumeMounts
|
||||
worker:
|
||||
volumes:
|
||||
- *datasetVolume
|
||||
|
||||
@@ -18,7 +18,7 @@ Return the proper image name
|
||||
{{- $termination = .imageRoot.digest | toString -}}
|
||||
{{- end -}}
|
||||
{{- if $registryName }}
|
||||
{{- printf "%s/%s%s%s" $registryName $repositoryName $separator $termination -}}
|
||||
{{- printf "%s/%s%s%s" ($registryName | trimSuffix "/") $repositoryName $separator $termination -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s%s%s" $repositoryName $separator $termination -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -15,7 +15,8 @@ spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
||||
strategy: {{- include "common.tplvalues.render" (dict "value" .Values.updateStrategy "context" $ ) | nindent 4 }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
||||
|
||||
@@ -72,7 +72,11 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.global.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
image: "{{ .Values.global.imageRegistry | trimSuffix "/" }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
{{- else }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.s3gateway.enabled }}
|
||||
command:
|
||||
|
||||
@@ -246,3 +246,13 @@ false
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "runtime.image" -}}
|
||||
{{- $name := default .Values.image.repository .Values.global.image.runtime.name }}
|
||||
{{- $tag := default .Values.image.tag .Values.global.image.runtime.tag }}
|
||||
{{- if .Values.global.image.repository }}
|
||||
{{- .Values.global.image.repository | trimSuffix "/" }}/{{ $name }}:{{ $tag }}
|
||||
{{- else }}
|
||||
{{- $name }}:{{ $tag }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -49,7 +49,7 @@ spec:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- "cp -r /opt/heaptrack /milvus/tools"
|
||||
image: "{{ .Values.heaptrack.image.repository }}:{{ .Values.heaptrack.image.tag }}"
|
||||
image: "{{ .Values.global.imageRegistry | trimSuffix "/" }}/{{ .Values.heaptrack.image.repository }}:{{ .Values.heaptrack.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.heaptrack.image.pullPolicy }}
|
||||
{{ if and (.Values.containerSecurityContext) (not .Values.standalone.containerSecurityContext) }}
|
||||
securityContext:
|
||||
@@ -65,7 +65,11 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: standalone
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
image: "{{ .Values.global.imageRegistry | trimSuffix "/" }}/{{ .Values.image.all.repository }}:{{ .Values.image.all.tag }}"
|
||||
{{- else }}
|
||||
image: "{{ .Values.image.all.repository }}:{{ .Values.image.all.tag }}"
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.image.all.pullPolicy }}
|
||||
{{ if and (.Values.containerSecurityContext) (not .Values.standalone.containerSecurityContext) }}
|
||||
securityContext:
|
||||
|
||||
Reference in New Issue
Block a user