Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added flyte scheduler in helm #1374

Merged
merged 26 commits into from
Sep 25, 2021
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions charts/flyte-core/README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions charts/flyte-core/templates/admin/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ metadata:
namespace: {{ template "flyte.namespace" . }}
labels: {{ include "flyteadmin.labels" . | nindent 4 }}
data:
{{- with .Values.configmap.admin }}
admin.yaml: | {{ toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.db.admin }}
db.yaml: | {{ tpl (toYaml .) $ | nindent 4 }}
{{- end }}
Expand Down
142 changes: 71 additions & 71 deletions charts/flyte-core/templates/admin/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,54 +22,54 @@ spec:
- name: check-db-ready
image: postgres:10.16-alpine
command:
- sh
- -c
- until pg_isready -h {{ tpl .Values.db.admin.database.host $ }} -p {{ .Values.db.admin.database.port }}; do echo waiting for database; sleep 2; done;
- sh
- -c
- until pg_isready -h {{ tpl .Values.db.admin.database.host $ }} -p {{ .Values.db.admin.database.port }}; do echo waiting for database; sleep 2; done;
{{- end }}
- command:
- flyteadmin
- --config
- {{ .Values.flyteadmin.configPath }}
- migrate
- run
- flyteadmin
- --config
- {{ .Values.flyteadmin.configPath }}
- migrate
- run
image: "{{ .Values.flyteadmin.image.repository }}:{{ .Values.flyteadmin.image.tag }}"
imagePullPolicy: "{{ .Values.flyteadmin.image.pullPolicy }}"
name: run-migrations
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 10 }}
- mountPath: /etc/flyte/config
name: config-volume
- mountPath: /etc/flyte/config
name: config-volume
{{- if .Values.flyteadmin.initialProjects }}
- command:
- flyteadmin
- --config
- {{ .Values.flyteadmin.configPath }}
- migrate
- seed-projects
- flyteadmin
- --config
- {{ .Values.flyteadmin.configPath }}
- migrate
- seed-projects
{{- range .Values.flyteadmin.initialProjects }}
- {{ . }}
{{- end }}
image: "{{ .Values.flyteadmin.image.repository }}:{{ .Values.flyteadmin.image.tag }}"
imagePullPolicy: "{{ .Values.flyteadmin.image.pullPolicy }}"
name: seed-projects
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 10 }}
- mountPath: /etc/flyte/config
name: config-volume
- mountPath: /etc/flyte/config
name: config-volume
{{- end }}
{{- if .Values.cluster_resource_manager.enabled }}
- command:
- flyteadmin
- --config
- {{ .Values.flyteadmin.configPath }}
- clusterresource
- sync
- flyteadmin
- --config
- {{ .Values.flyteadmin.configPath }}
- clusterresource
- sync
image: "{{ .Values.flyteadmin.image.repository }}:{{ .Values.flyteadmin.image.tag }}"
imagePullPolicy: "{{ .Values.flyteadmin.image.pullPolicy }}"
name: sync-cluster-resources
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 10 }}
- mountPath: /etc/flyte/clusterresource/templates
name: resource-templates
- mountPath: /etc/flyte/config
name: config-volume
- mountPath: /etc/flyte/clusterresource/templates
name: resource-templates
- mountPath: /etc/flyte/config
name: config-volume
{{- end }}
- name: generate-secrets
image: "{{ .Values.flyteadmin.image.repository }}:{{ .Values.flyteadmin.image.tag }}"
Expand All @@ -88,51 +88,51 @@ spec:
fieldRef:
fieldPath: metadata.namespace
containers:
- command:
- flyteadmin
- --config
- {{ .Values.flyteadmin.configPath }}
{{- with .Values.flyteadmin.extraArgs }}
{{- toYaml . | nindent 8 }}
{{- end }}
- serve
image: "{{ .Values.flyteadmin.image.repository }}:{{ .Values.flyteadmin.image.tag }}"
imagePullPolicy: "{{ .Values.flyteadmin.image.pullPolicy }}"
name: flyteadmin
ports:
- containerPort: 8088
- containerPort: 8089
resources: {{ toYaml .Values.flyteadmin.resources | nindent 10 }}
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 8 }}
- mountPath: /srv/flyte
name: shared-data
- mountPath: /etc/flyte/config
name: config-volume
- name: auth
mountPath: /etc/secrets/
{{- with .Values.flyteadmin.additionalVolumeMounts -}}
{{ toYaml . | nindent 8 }}
{{- end }}
- command:
- sh
- -c
- ln -s /usr/share/nginx/html /usr/share/nginx/html/openapi && sh /usr/local/bin/docker-run.sh
env:
- name: PAGE_TITLE
value: Flyte Admin OpenAPI
- name: SPEC_URL
value: /api/v1/openapi
- name: PORT
value: "8087"
image: docker.io/redocly/redoc
imagePullPolicy: IfNotPresent
name: redoc
ports:
- containerPort: 8087
resources:
limits:
cpu: "0.1"
memory: 200Mi
- command:
yindia marked this conversation as resolved.
Show resolved Hide resolved
- flyteadmin
- --config
- {{ .Values.flyteadmin.configPath }}
{{- with .Values.flyteadmin.extraArgs }}
{{- toYaml . | nindent 8 }}
{{- end }}
- serve
image: "{{ .Values.flyteadmin.image.repository }}:{{ .Values.flyteadmin.image.tag }}"
imagePullPolicy: "{{ .Values.flyteadmin.image.pullPolicy }}"
name: flyteadmin
ports:
- containerPort: 8088
- containerPort: 8089
resources: {{ toYaml .Values.flyteadmin.resources | nindent 10 }}
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 8 }}
- mountPath: /srv/flyte
name: shared-data
- mountPath: /etc/flyte/config
name: config-volume
- name: auth
mountPath: /etc/secrets/
{{- with .Values.flyteadmin.additionalVolumeMounts -}}
{{ toYaml . | nindent 8 }}
{{- end }}
- command:
- sh
- -c
- ln -s /usr/share/nginx/html /usr/share/nginx/html/openapi && sh /usr/local/bin/docker-run.sh
env:
- name: PAGE_TITLE
value: Flyte Admin OpenAPI
- name: SPEC_URL
value: /api/v1/openapi
- name: PORT
value: "8087"
image: docker.io/redocly/redoc
imagePullPolicy: IfNotPresent
name: redoc
ports:
- containerPort: 8087
resources:
limits:
cpu: "0.1"
memory: 200Mi
serviceAccountName: {{ template "flyteadmin.name" . }}
volumes: {{- include "databaseSecret.volume" . | nindent 8 }}
- emptyDir: {}
Expand Down
86 changes: 43 additions & 43 deletions charts/flyte-core/templates/datacatalog/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,52 +18,52 @@ spec:
labels: {{ include "datacatalog.labels" . | nindent 8 }}
spec:
initContainers:
{{- if .Values.postgres.enabled }}
- name: check-db-ready
image: postgres:10.16-alpine
command:
- sh
- -c
- until pg_isready -h {{ tpl .Values.db.datacatalog.database.host $ }} -p {{ .Values.db.datacatalog.database.port }}; do echo waiting for database; sleep 2; done;
{{- end }}
- command:
- datacatalog
- --config
- {{ .Values.datacatalog.configPath }}
- migrate
- run
image: "{{ .Values.datacatalog.image.repository }}:{{ .Values.datacatalog.image.tag }}"
imagePullPolicy: "{{ .Values.datacatalog.image.pullPolicy }}"
name: run-migrations
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 8 }}
- mountPath: /etc/datacatalog/config
name: config-volume
{{- if .Values.postgres.enabled }}
- name: check-db-ready
image: postgres:10.16-alpine
command:
- sh
- -c
- until pg_isready -h {{ tpl .Values.db.datacatalog.database.host $ }} -p {{ .Values.db.datacatalog.database.port }}; do echo waiting for database; sleep 2; done;
{{- end }}
- command:
- datacatalog
- --config
- {{ .Values.datacatalog.configPath }}
- migrate
- run
image: "{{ .Values.datacatalog.image.repository }}:{{ .Values.datacatalog.image.tag }}"
imagePullPolicy: "{{ .Values.datacatalog.image.pullPolicy }}"
name: run-migrations
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 8 }}
- mountPath: /etc/datacatalog/config
name: config-volume
containers:
- command:
- datacatalog
- --config
- {{ .Values.datacatalog.configPath }}
{{- with .Values.datacatalog.extraArgs }}
{{- toYaml . | nindent 8 }}
{{- end }}
- serve
image: "{{ .Values.datacatalog.image.repository }}:{{ .Values.datacatalog.image.tag }}"
imagePullPolicy: "{{ .Values.datacatalog.image.pullPolicy }}"
name: datacatalog
ports:
- containerPort: 8088
- containerPort: 8089
resources: {{ toYaml .Values.datacatalog.resources | nindent 10 }}
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 8 }}
- mountPath: /etc/datacatalog/config
name: config-volume
- command:
- datacatalog
- --config
- {{ .Values.datacatalog.configPath }}
{{- with .Values.datacatalog.extraArgs }}
{{- toYaml . | nindent 8 }}
{{- end }}
- serve
image: "{{ .Values.datacatalog.image.repository }}:{{ .Values.datacatalog.image.tag }}"
imagePullPolicy: "{{ .Values.datacatalog.image.pullPolicy }}"
name: datacatalog
ports:
- containerPort: 8088
- containerPort: 8089
resources: {{ toYaml .Values.datacatalog.resources | nindent 10 }}
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 8 }}
- mountPath: /etc/datacatalog/config
name: config-volume
serviceAccountName: {{ template "datacatalog.name" . }}
volumes: {{- include "databaseSecret.volume" . | nindent 6 }}
- emptyDir: {}
name: shared-data
- configMap:
name: datacatalog-config
name: config-volume
- emptyDir: {}
name: shared-data
- configMap:
name: datacatalog-config
name: config-volume
{{- with .Values.datacatalog.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 8 }}
{{- end }}
Expand Down
28 changes: 28 additions & 0 deletions charts/flyte-core/templates/flytescheduler/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- if .Values.workflow_scheduler.enabled}}
{{- if eq .Values.workflow_scheduler.type "native" }}
apiVersion: v1
kind: ConfigMap
metadata:
name: flyte-scheduler-admin-config
yindia marked this conversation as resolved.
Show resolved Hide resolved
namespace: {{ template "flyte.namespace" . }}
labels: {{ include "flytescheduler.labels" . | nindent 4 }}
data:
{{- with .Values.configmap.admin }}
admin.yaml: | {{ toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.db.admin }}
db.yaml: | {{ tpl (toYaml .) $ | nindent 4 }}
{{- end }}
{{- with .Values.configmap.logger }}
logger.yaml: | {{ toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.configmap.adminServer }}
server.yaml: | {{ toYaml . | nindent 4 }}
{{- end }}
storage.yaml: | {{ tpl (include "storage" .) $ | nindent 4 }}
{{- if .Values.workflow_scheduler.enabled }}
{{- with .Values.workflow_scheduler.config }}
scheduler.yaml: | {{ tpl (toYaml .) $ | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
64 changes: 64 additions & 0 deletions charts/flyte-core/templates/flytescheduler/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{{- if .Values.workflow_scheduler.enabled}}
{{- if eq .Values.workflow_scheduler.type "native" }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "flytescheduler.name" . }}
namespace: {{ template "flyte.namespace" . }}
labels: {{ include "flytescheduler.labels" . | nindent 4 }}
spec:
replicas: 1
EngHabu marked this conversation as resolved.
Show resolved Hide resolved
selector:
matchLabels: {{ include "flytescheduler.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
configChecksum: {{ include (print .Template.BasePath "/admin/configmap.yaml") . | sha256sum | trunc 63 | quote }}
{{- with .Values.flytescheduler.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels: {{ include "flytescheduler.labels" . | nindent 8 }}
spec:
initContainers:
- command:
- flytescheduler
- precheck
- --config
- {{ .Values.flytescheduler.configPath }}
image: "{{ .Values.flytescheduler.image.repository }}:{{ .Values.flytescheduler.image.tag }}"
imagePullPolicy: "{{ .Values.flytescheduler.image.pullPolicy }}"
name: flytescheduler-check
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 10 }}
- mountPath: /etc/flyte/config
name: config-volume
containers:
- command:
- flytescheduler
- run
- --config
- {{ .Values.flytescheduler.configPath }}
image: "{{ .Values.flytescheduler.image.repository }}:{{ .Values.flytescheduler.image.tag }}"
imagePullPolicy: "{{ .Values.flytescheduler.image.pullPolicy }}"
name: flytescheduler
resources: {{ toYaml .Values.flytescheduler.resources | nindent 10 }}
volumeMounts: {{- include "databaseSecret.volumeMount" . | nindent 10 }}
- mountPath: /etc/flyte/config
name: config-volume
serviceAccountName: {{ template "flyteadmin.name" . }}
volumes: {{- include "databaseSecret.volume" . | nindent 8 }}
- emptyDir: {}
name: shared-data
- configMap:
name: flytescheduler-admin-config
name: config-volume
{{- with .Values.flytescheduler.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.flytescheduler.affinity }}
affinity: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.flytescheduler.tolerations }}
tolerations: {{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
Loading