From 66f839c0f1ecaa737582c7e47d2d7b73f81c341f Mon Sep 17 00:00:00 2001 From: marrrcin Date: Wed, 6 Nov 2024 16:41:32 +0100 Subject: [PATCH 1/3] 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 From 892c96e4ddd1442fb4703a7ca472bb5e951d148b Mon Sep 17 00:00:00 2001 From: marrrcin Date: Wed, 6 Nov 2024 17:32:39 +0100 Subject: [PATCH 2/3] Add option to install CRD as a part of chart install in flyte-binary -- PR suggestions Signed-off-by: marrrcin --- charts/flyte-binary/templates/configmap.yaml | 2 +- charts/flyte-binary/templates/crds/flyteworkflow.yaml | 2 +- charts/flyte-binary/values.yaml | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/charts/flyte-binary/templates/configmap.yaml b/charts/flyte-binary/templates/configmap.yaml index 21e3eb4169..3360fdc0c4 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: {{ .Values.configuration.propeller.createCrd }} + create-flyteworkflow-crd: {{ .Values.configuration.propeller.createCRDs }} 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 index cb435af683..3e5167d6ac 100644 --- a/charts/flyte-binary/templates/crds/flyteworkflow.yaml +++ b/charts/flyte-binary/templates/crds/flyteworkflow.yaml @@ -1,4 +1,4 @@ -{{- if .Values.crds.create }} +{{- if not .Values.configuration.propeller.createCRDs }} {{- if $.Capabilities.APIVersions.Has "apiextensions.k8s.io/v1/CustomResourceDefinition" }} apiVersion: apiextensions.k8s.io/v1 {{- else }} diff --git a/charts/flyte-binary/values.yaml b/charts/flyte-binary/values.yaml index f1bff26874..97fa1fe8d3 100644 --- a/charts/flyte-binary/values.yaml +++ b/charts/flyte-binary/values.yaml @@ -178,7 +178,8 @@ configuration: defaultTimeout: 10s # propeller Specify configuration for Flyte Propeller propeller: - createCrd: true + # createCRDs If true, Propeller will install CRDs at runtime, if false, CRDs will be installed during helm install + createCRDs: 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: "" @@ -378,10 +379,6 @@ 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 From 7102cfa31aacac3b4233846a3edb8aeb3fd4ec80 Mon Sep 17 00:00:00 2001 From: marrrcin Date: Tue, 12 Nov 2024 10:41:53 +0100 Subject: [PATCH 3/3] Add option to install CRD as a part of chart install in flyte-binary -- make helm Signed-off-by: marrrcin --- charts/flyte-binary/README.md | 1 + docker/sandbox-bundled/manifests/complete-agent.yaml | 4 ++-- docker/sandbox-bundled/manifests/complete.yaml | 4 ++-- docker/sandbox-bundled/manifests/dev.yaml | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/charts/flyte-binary/README.md b/charts/flyte-binary/README.md index e7df1018db..9ab746d48d 100644 --- a/charts/flyte-binary/README.md +++ b/charts/flyte-binary/README.md @@ -63,6 +63,7 @@ Chart for basic single Flyte executable deployment | configuration.logging.plugins.kubernetes.templateUri | string | `""` | | | configuration.logging.plugins.stackdriver.enabled | bool | `false` | | | configuration.logging.plugins.stackdriver.templateUri | string | `""` | | +| configuration.propeller.createCRDs | bool | `true` | | | configuration.storage.metadataContainer | string | `"my-organization-flyte-container"` | | | configuration.storage.provider | string | `"s3"` | | | configuration.storage.providerConfig.azure.account | string | `"storage-account-name"` | | diff --git a/docker/sandbox-bundled/manifests/complete-agent.yaml b/docker/sandbox-bundled/manifests/complete-agent.yaml index 028f719e71..f0c418ad95 100644 --- a/docker/sandbox-bundled/manifests/complete-agent.yaml +++ b/docker/sandbox-bundled/manifests/complete-agent.yaml @@ -819,7 +819,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: SlI1TDFkTXBMaThuc0hlSQ== + haSharedSecret: c2Z6ZUdxTjJ1bEc1QlVaeQ== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1416,7 +1416,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: ffc8aa05a602edd8f9b1d7ef35aa1cc5e383bceb9b91307eef99e86f53e13d4e + checksum/secret: ad072a5177dfbeacda100d536f1c7d611808b1c7f79dc6d02d9dbf24b8294e3b labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/complete.yaml b/docker/sandbox-bundled/manifests/complete.yaml index c8b8e1c93a..c9464636af 100644 --- a/docker/sandbox-bundled/manifests/complete.yaml +++ b/docker/sandbox-bundled/manifests/complete.yaml @@ -801,7 +801,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: YjdMdE9yejJzZ2xXSDFBRQ== + haSharedSecret: TUpUek9Ib3BpWTlEbFRvSw== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1365,7 +1365,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 956ac1b58c049a630c94605eedaba7ba9de3fc01233701ef403ab4bf24fe2a7a + checksum/secret: 09204971564694f6090d55069cf0853843456945f781aa7842f33021d09f4f25 labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/dev.yaml b/docker/sandbox-bundled/manifests/dev.yaml index 1038da1f64..05a0924bd1 100644 --- a/docker/sandbox-bundled/manifests/dev.yaml +++ b/docker/sandbox-bundled/manifests/dev.yaml @@ -499,7 +499,7 @@ metadata: --- apiVersion: v1 data: - haSharedSecret: YUpzb25xNTM1eml3Rmpueg== + haSharedSecret: d2VkcjRnRHkyTmZrOU52cw== proxyPassword: "" proxyUsername: "" kind: Secret @@ -934,7 +934,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 2720f13bd64051a7acb512e59e426b9f6c5f6c3c7d1d9a3a423e2df4cf9bab46 + checksum/secret: 3b1376c2c63f4fff6745ad085844b7a1d7c8ad2cce13cae4e1e9c3ea495cebaa labels: app: docker-registry release: flyte-sandbox