From 090bd756adcd2cf490c08b4fcfc1d87b576e323b Mon Sep 17 00:00:00 2001 From: Michael Barrientos Date: Thu, 11 Apr 2024 13:20:06 -0500 Subject: [PATCH] Control contents of plugins.yaml (#198) --- charts/flyte-core/README.md | 2 ++ charts/flyte-core/templates/propeller/configmap.yaml | 5 +++++ charts/flyte-core/values.yaml | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/charts/flyte-core/README.md b/charts/flyte-core/README.md index c61c159df2..e5b643db48 100644 --- a/charts/flyte-core/README.md +++ b/charts/flyte-core/README.md @@ -107,6 +107,8 @@ helm install gateway bitnami/contour -n flyte | configmap.enabled_plugins.tasks.task-plugins.enabled-plugins | list | `["container","sidecar","k8s-array"]` | [Enabled Plugins](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/config#Config). Enable sagemaker*, athena if you install the backend plugins | | configmap.k8s | object | `{"plugins":{"k8s":{"default-cpus":"100m","default-env-vars":[],"default-memory":"100Mi"}}}` | Kubernetes specific Flyte configuration | | configmap.k8s.plugins.k8s | object | `{"default-cpus":"100m","default-env-vars":[],"default-memory":"100Mi"}` | Configuration section for all K8s specific plugins [Configuration structure](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/pluginmachinery/flytek8s/config) | +| configmap.plugins | object | `{}` | General plugins config. You should prefer other config files if possible. | +| configmap.plugins_yaml_enabled | bool | `false` | Control the contents of plugins.yaml if true | | configmap.remoteData.remoteData.region | string | `"us-east-1"` | | | configmap.remoteData.remoteData.scheme | string | `"local"` | | | configmap.remoteData.remoteData.signedUrls.durationMinutes | int | `3` | | diff --git a/charts/flyte-core/templates/propeller/configmap.yaml b/charts/flyte-core/templates/propeller/configmap.yaml index cceb748274..a25a73e6b6 100644 --- a/charts/flyte-core/templates/propeller/configmap.yaml +++ b/charts/flyte-core/templates/propeller/configmap.yaml @@ -56,3 +56,8 @@ data: agent_service.yaml: | {{ tpl (toYaml .) $ | nindent 4 }} {{- end }} {{- end }} +{{- if .Values.configmap.plugins_yaml_enabled }} +{{- /* Intentionally not using with .Values.configmap.plugins since + we want to be able to render empty plugins.yaml */}} + plugins.yaml: | {{ tpl (toYaml .Values.configmap.plugins) $ | nindent 4 }} +{{- end }} diff --git a/charts/flyte-core/values.yaml b/charts/flyte-core/values.yaml index abe864ea44..c18082bdea 100755 --- a/charts/flyte-core/values.yaml +++ b/charts/flyte-core/values.yaml @@ -836,6 +836,12 @@ configmap: # -- One option is to enable cloudwatch logging for EKS, update the region and log group accordingly cloudwatch-enabled: false + # Hack to force overwriting of plugins.yaml if true + # -- Control the contents of plugins.yaml if true + plugins_yaml_enabled: false + # -- General plugins config. You should prefer other config files if possible. + plugins: {} + # ---------------------------------------------------------------- # Optional Modules # Flyte built extensions that enable various additional features in Flyte.