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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marrrcin
Copy link

@marrrcin marrrcin commented Nov 6, 2024

Why are the changes needed?

Due to strict RBAC policies in some k8s clusters, it's impossible to create ClusterRole with wide set of permissions for service account used in flyte-binary deployment. A namespace-scoped Role could be used, but it requires:

  • creating own Role and RoleBinding (possible by creating a sub-chart)
  • disabling installation of FlyteWorkflow CRD at runtime, after Helm install

More context: https://flyte-org.slack.com/archives/C01P3B761A6/p1729865751682139

What changes were proposed in this pull request?

  1. Added CRD for FlyteWorkflow into flyte-binary chart
  2. Added flag in values to configure propeller to skip CRD installation
  3. Added flag in values to enable CRD installation at helm install

How was this patch tested?

  1. Created new k3d cluster
  2. Installed modified Helm chart 2 times:
    3.1. with helm install-level CRDs creation enabled and propeller-level CRDs creation disabled.
    2.2. with helm install-level CRDs creation disabled and propeller-level CRDs creation enabled.
  3. Both cases worked.

Setup process

See above.

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

N/A

Docs link

N/A

Copy link

welcome bot commented Nov 6, 2024

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

@chrisrun
Copy link

chrisrun commented Nov 6, 2024

+1

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.95%. Comparing base (96c467e) to head (7102cfa).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5967      +/-   ##
==========================================
+ Coverage   36.85%   36.95%   +0.09%     
==========================================
  Files        1310     1310              
  Lines      131227   131401     +174     
==========================================
+ Hits        48362    48555     +193     
+ Misses      78668    78632      -36     
- Partials     4197     4214      +17     
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.07% <ø> (+0.05%) ⬆️
unittests-flytecopilot 22.23% <ø> (+10.50%) ⬆️
unittests-flytectl 62.39% <ø> (ø)
unittests-flyteidl 6.95% <ø> (+0.03%) ⬆️
unittests-flyteplugins 53.84% <ø> (ø)
unittests-flytepropeller 43.08% <ø> (+0.17%) ⬆️
unittests-flytestdlib 55.30% <ø> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -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?

@davidmirror-ops
Copy link
Contributor

@marrrcin to address that generate_helm failing test, please do a make helm on your fork and push the changes

@marrrcin
Copy link
Author

@davidmirror-ops pushed! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants