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

Add option to install CRD as a part of chart install in flyte-binary #5967

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion charts/flyte-binary/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.createCRDs }}
webhook:
certDir: /var/run/flyte/certs
localCert: true
Expand Down
32 changes: 32 additions & 0 deletions charts/flyte-binary/templates/crds/flyteworkflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{- if not .Values.configuration.propeller.createCRDs }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{- if not .Values.configuration.propeller.createCRDs }}
{{- if .Values.configuration.propeller.createCRDs }}

I think this should be the logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the logic is correct. If propeller is set to create CRDs at runtime, then we don't want to install them as a part of helm chart installation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. Thanks for your patience, this helped me understand better how the CRD install operation works.

{{- 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 }}
4 changes: 4 additions & 0 deletions charts/flyte-binary/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ configuration:
timeouts:
GetTask: 10s
defaultTimeout: 10s
# propeller Specify configuration for Flyte Propeller
propeller:
# 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: ""
Expand Down
Loading