From 66f839c0f1ecaa737582c7e47d2d7b73f81c341f Mon Sep 17 00:00:00 2001 From: marrrcin Date: Wed, 6 Nov 2024 16:41:32 +0100 Subject: [PATCH] Add option to install CRD as a part of chart install in flyte-binary Signed-off-by: marrrcin --- charts/flyte-binary/templates/configmap.yaml | 2 +- .../templates/crds/flyteworkflow.yaml | 32 +++++++++++++++++++ charts/flyte-binary/values.yaml | 7 ++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 charts/flyte-binary/templates/crds/flyteworkflow.yaml diff --git a/charts/flyte-binary/templates/configmap.yaml b/charts/flyte-binary/templates/configmap.yaml index 255da9fdf3..21e3eb4169 100644 --- a/charts/flyte-binary/templates/configmap.yaml +++ b/charts/flyte-binary/templates/configmap.yaml @@ -40,7 +40,7 @@ data: show-source: true level: {{ default 1 .Values.configuration.logging.level }} propeller: - create-flyteworkflow-crd: true + create-flyteworkflow-crd: {{ .Values.configuration.propeller.createCrd }} webhook: certDir: /var/run/flyte/certs localCert: true diff --git a/charts/flyte-binary/templates/crds/flyteworkflow.yaml b/charts/flyte-binary/templates/crds/flyteworkflow.yaml new file mode 100644 index 0000000000..cb435af683 --- /dev/null +++ b/charts/flyte-binary/templates/crds/flyteworkflow.yaml @@ -0,0 +1,32 @@ +{{- if .Values.crds.create }} +{{- if $.Capabilities.APIVersions.Has "apiextensions.k8s.io/v1/CustomResourceDefinition" }} +apiVersion: apiextensions.k8s.io/v1 +{{- else }} +apiVersion: apiextensions.k8s.io/v1beta1 +{{- end }} +kind: CustomResourceDefinition +metadata: + name: flyteworkflows.flyte.lyft.com +spec: + group: flyte.lyft.com + names: + kind: FlyteWorkflow + plural: flyteworkflows + shortNames: + - fly + singular: flyteworkflow + scope: Namespaced +{{- if $.Capabilities.APIVersions.Has "apiextensions.k8s.io/v1/CustomResourceDefinition" }} + versions: + - name: v1alpha1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + x-kubernetes-preserve-unknown-fields: true + properties: +{{- else }} + version: v1alpha1 +{{- end }} +{{- end }} diff --git a/charts/flyte-binary/values.yaml b/charts/flyte-binary/values.yaml index eee01d16c6..f1bff26874 100644 --- a/charts/flyte-binary/values.yaml +++ b/charts/flyte-binary/values.yaml @@ -176,6 +176,9 @@ configuration: timeouts: GetTask: 10s defaultTimeout: 10s + # propeller Specify configuration for Flyte Propeller + propeller: + createCrd: true # externalConfigMap Specify an existing, external ConfigMap to use as configuration for Flyte # If set, no Flyte configuration will be generated by this chart externalConfigMap: "" @@ -375,6 +378,10 @@ rbac: # extraRules Add additional rules to the ClusterRole extraRules: [] +crds: + # create Create CustomResourceDefinition resources during installation + create: false + # serviceAccount Configure Flyte ServiceAccount serviceAccount: # create Create ServiceAccount for Flyte