forked from flyteorg/flyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added helm chart for Flyte core (flyteorg#1366)
* refactor dir structure for helm Signed-off-by: Yuvraj <[email protected]> * Rebase master Signed-off-by: Yuvraj <[email protected]> * Added sandbox value in flyte-core Signed-off-by: Yuvraj <[email protected]> * more changes Signed-off-by: Yuvraj <[email protected]> * Remove redis from flyte-core Signed-off-by: Yuvraj <[email protected]>
- Loading branch information
Showing
35 changed files
with
2,785 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
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,5 @@ | ||
apiVersion: v2 | ||
name: flyte-core | ||
description: A Helm chart for Flyte | ||
type: application | ||
version: v0.1.10 # VERSION |
Large diffs are not rendered by default.
Oops, something went wrong.
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,58 @@ | ||
{{ template "chart.header" . }} | ||
{{ template "chart.deprecationWarning" . }} | ||
|
||
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} | ||
|
||
{{ template "chart.description" . }} | ||
|
||
{{ template "chart.homepageLine" . }} | ||
|
||
{{ template "chart.maintainersSection" . }} | ||
|
||
{{ template "chart.sourcesSection" . }} | ||
|
||
{{ template "chart.requirementsSection" . }} | ||
|
||
### Flyte INSTALLATION: | ||
- [Install helm 3](https://helm.sh/docs/intro/install/) | ||
- Fetch chart dependencies `` | ||
- Install Flyte: | ||
|
||
```bash | ||
helm repo add flyte https://flyteorg.github.io/flyte | ||
helm install -n flyte -f values-eks.yaml --create-namespace flyte flyte/flyte-core | ||
``` | ||
|
||
Customize your installation by changing settings in `values-eks.yaml`. | ||
You can use the helm diff plugin to review any value changes you've made to your values: | ||
|
||
```bash | ||
helm plugin install https://github.com/databus23/helm-diff | ||
helm diff upgrade -f values-eks.yaml flyte flyte/flyte-core | ||
``` | ||
|
||
Then apply your changes: | ||
```bash | ||
helm upgrade -f values-eks.yaml flyte flyte/flyte-core | ||
``` | ||
|
||
Install ingress controller (By default Flyte helm chart have contour ingress resource) | ||
```bash | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm install gateway bitnami/contour -n flyte | ||
``` | ||
|
||
#### Alternative: Generate raw kubernetes yaml with helm template | ||
- `helm template --name-template=flyte-eks . -n flyte -f values-eks.yaml > flyte_generated_eks.yaml` | ||
- Deploy the manifest `kubectl apply -f flyte_generated_eks.yaml` | ||
|
||
|
||
- When all pods are running - run end2end tests: `kubectl apply -f ../end2end/tests/endtoend.yaml` | ||
- Get flyte host `minikube service contour -n heptio-contour --url`. And then visit `http://<HOST>/console` | ||
|
||
### CONFIGURATION NOTES: | ||
- The docker images, their tags and other default parameters are configured in `values.yaml` file. | ||
- Each Flyte installation type should have separate `values-*.yaml` file: for sandbox, EKS and etc. The configuration in `values.yaml` and the choosen config `values-*.yaml` are merged when generating the deployment manifest. | ||
- The configuration in `values-sandbox.yaml` is ready for installation in minikube. But `values-eks.yaml` should be edited before installation: s3 bucket, RDS hosts, iam roles, secrets and etc need to be modified. | ||
|
||
{{ template "chart.valuesSection" . }} |
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,149 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{- define "flyte.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "flyte.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "flyte.namespace" -}} | ||
{{- default .Release.Namespace .Values.forceNamespace | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
|
||
{{- define "flyteadmin.name" -}} | ||
flyteadmin | ||
{{- end -}} | ||
|
||
{{- define "flyteadmin.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ template "flyteadmin.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end -}} | ||
|
||
{{- define "flyteadmin.labels" -}} | ||
{{ include "flyteadmin.selectorLabels" . }} | ||
helm.sh/chart: {{ include "flyte.chart" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end -}} | ||
|
||
|
||
{{- define "datacatalog.name" -}} | ||
datacatalog | ||
{{- end -}} | ||
|
||
{{- define "datacatalog.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ template "datacatalog.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end -}} | ||
|
||
{{- define "datacatalog.labels" -}} | ||
{{ include "datacatalog.selectorLabels" . }} | ||
helm.sh/chart: {{ include "flyte.chart" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end -}} | ||
|
||
|
||
{{- define "flytepropeller.name" -}} | ||
flytepropeller | ||
{{- end -}} | ||
|
||
{{- define "flytepropeller.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ template "flytepropeller.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end -}} | ||
|
||
{{- define "flytepropeller.labels" -}} | ||
{{ include "flytepropeller.selectorLabels" . }} | ||
helm.sh/chart: {{ include "flyte.chart" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end -}} | ||
|
||
{{- define "flyte-pod-webhook.name" -}} | ||
flyte-pod-webhook | ||
{{- end -}} | ||
|
||
|
||
{{- define "flyteconsole.name" -}} | ||
flyteconsole | ||
{{- end -}} | ||
|
||
{{- define "flyteconsole.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ template "flyteconsole.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end -}} | ||
|
||
{{- define "flyteconsole.labels" -}} | ||
{{ include "flyteconsole.selectorLabels" . }} | ||
helm.sh/chart: {{ include "flyte.chart" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end -}} | ||
|
||
# Optional blocks for secret mount | ||
|
||
{{- define "databaseSecret.volume" -}} | ||
{{- with .Values.common.databaseSecret.name -}} | ||
- name: {{ . }} | ||
secret: | ||
secretName: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "databaseSecret.volumeMount" -}} | ||
{{- with .Values.common.databaseSecret.name -}} | ||
- mountPath: /etc/db | ||
name: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "storage.base" -}} | ||
storage: | ||
{{- if eq .Values.storage.type "s3" }} | ||
type: s3 | ||
container: {{ .Values.storage.bucketName | quote }} | ||
connection: | ||
auth-type: iam | ||
region: {{ .Values.storage.s3.region }} | ||
{{- else if eq .Values.storage.type "gcs" }} | ||
type: stow | ||
stow: | ||
kind: google | ||
config: | ||
json: "" | ||
project_id: {{ .Values.storage.gcs.projectId }} | ||
scopes: https://www.googleapis.com/auth/devstorage.read_write | ||
container: {{ .Values.storage.bucketName | quote }} | ||
{{- else if eq .Values.storage.type "sandbox" }} | ||
type: minio | ||
container: {{ .Values.storage.bucketName | quote }} | ||
connection: | ||
access-key: minio | ||
auth-type: accesskey | ||
secret-key: miniostorage | ||
disable-ssl: true | ||
endpoint: http://minio.{{ .Release.Namespace }}.svc.cluster.local:9000 | ||
region: us-east-1 | ||
{{- else if eq .Values.storage.type "custom" }} | ||
{{- with .Values.storage.custom -}} | ||
{{ toYaml . | nindent 2 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "storage" -}} | ||
{{ include "storage.base" .}} | ||
limits: | ||
maxDownloadMBs: 10 | ||
{{- end }} | ||
|
||
{{- define "copilot.config" -}} | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: flyte-data-config | ||
namespace: {{`{{ namespace }}`}} | ||
data: | ||
config.yaml: | {{ tpl (include "storage.base" .) $ | nindent 4 }} | ||
enable-multicontainer: true | ||
{{- end }} |
13 changes: 13 additions & 0 deletions
13
charts/flyte-core/templates/admin/cluster_resource_configmap.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,13 @@ | ||
{{- if .Values.cluster_resource_manager.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: clusterresource-template | ||
namespace: {{ template "flyte.namespace" . }} | ||
labels: {{ include "flyteadmin.labels" . | nindent 4 }} | ||
data: | ||
{{- range .Values.cluster_resource_manager.templates }} | ||
{{ .key }}.yaml: | {{ .value | nindent 4 }} | ||
{{- end }} | ||
zz_copilot_config.yaml: | {{ include "copilot.config" . | nindent 4 }} | ||
{{- end }} |
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,41 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: flyte-admin-config | ||
namespace: {{ template "flyte.namespace" . }} | ||
labels: {{ include "flyteadmin.labels" . | nindent 4 }} | ||
data: | ||
{{- with .Values.db }} | ||
db.yaml: | {{ tpl (toYaml .) $ | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.configmap.domain }} | ||
domain.yaml: | {{ toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.configmap.logger }} | ||
logger.yaml: | {{ toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.configmap.adminServer }} | ||
server.yaml: | {{ toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.configmap.remoteData }} | ||
remoteData.yaml: | {{ toYaml . | nindent 4 }} | ||
{{- end }} | ||
storage.yaml: | {{ tpl (include "storage" .) $ | nindent 4 }} | ||
{{- with .Values.configmap.task_resource_defaults }} | ||
task_resource_defaults.yaml: | {{ toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.workflow_notifications.enabled }} | ||
{{- with .Values.workflow_notifications.config }} | ||
notifications.yaml: | {{ tpl (toYaml .) $ | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.cluster_resource_manager.enabled }} | ||
{{- with .Values.cluster_resource_manager.config }} | ||
cluster_resources.yaml: | {{ tpl (toYaml .) $ | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.workflow_scheduler.enabled }} | ||
{{- with .Values.workflow_scheduler.config }} | ||
scheduler.yaml: | {{ tpl (toYaml .) $ | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
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,42 @@ | ||
{{- if .Values.cluster_resource_manager.enabled }} | ||
apiVersion: batch/v1beta1 | ||
kind: CronJob | ||
metadata: | ||
name: syncresources | ||
namespace: {{ template "flyte.namespace" . }} | ||
labels: {{ include "flyteadmin.labels" . | nindent 4 }} | ||
spec: | ||
schedule: '*/1 * * * *' | ||
jobTemplate: | ||
spec: | ||
template: | ||
{{- with .Values.flyteadmin.podAnnotations }} | ||
metadata: | ||
annotations: {{ toYaml . | nindent 12 }} | ||
{{- end }} | ||
spec: | ||
containers: | ||
- command: | ||
- 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 12 }} | ||
- mountPath: /etc/flyte/clusterresource/templates | ||
name: resource-templates | ||
- mountPath: /etc/flyte/config | ||
name: config-volume | ||
restartPolicy: OnFailure | ||
serviceAccountName: flyteadmin | ||
volumes: {{- include "databaseSecret.volume" . | nindent 10 }} | ||
- configMap: | ||
name: clusterresource-template | ||
name: resource-templates | ||
- configMap: | ||
name: flyte-admin-config | ||
name: config-volume | ||
{{- end }} |
Oops, something went wrong.