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

Improve flyte-core helm chart #5362

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

Conversation

mvaalexp
Copy link

@mvaalexp mvaalexp commented May 14, 2024

Fixed flyte-core helm chart where ServiceAccounts were missing, incorrect typing, and some naming inconsistencies

Tracking issue

Closes #5361

Why are the changes needed?

Removes error messages in when running the chart

coalesce.go:286: warning: cannot overwrite table with non table for flyte-core.flyteagent.podEnv (map[])

Adds missing ServiceAccounts to services.

  • This default service account has limited permissions and is generally not recommended for use in production environments
    In our production clusters, we have governance that requires all Deployments must have an associated SA, this is currently preventing us from using the chart.

Adds the ability to override the service names.

Changed FlyteClusterResourceSync Deployment name

  • The names were hard coded
  • There existed a template already in the _helpers file
  • Labels did not match the resource names
  • This allows for consistency across the services
  • Note: Will delete and recreate the Deployment (not backwards compatible)

What changes were proposed in this pull request?

Helper methods refactored to allow nameOverride.
Service Accounts added and applied to Deployments.
values.yaml default values updated to array from map as that is what is expected

How was this patch tested?

Hand tested, I didn't see unit tests for the helm chart.

Setup process

Screenshots

Check all the applicable boxes

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

Related PRs

Docs link

Fixed flyte-core helm chart where ServiceAccounts were missing and some naming inconsistencies

Signed-off-by: mvaal <mvaal@expediagroup.com>
Signed-off-by: mvaal <mvaal@expediagroup.com>
Copy link

welcome bot commented May 14, 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).

@@ -55,7 +55,7 @@ spec:
- mountPath: /var/run/credentials
name: cluster-secrets
{{- end }}
serviceAccountName: {{ .Values.cluster_resource_manager.service_account_name }}
serviceAccountName: {{ .Values.cluster_resource_manager.serviceAccount.create | ternary (include "flyteclusterresourcesync.name" .) .Values.cluster_resource_manager.service_account_name }}
Copy link
Author

Choose a reason for hiding this comment

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

Attempted to keep backwards compatibility here.

@@ -2,7 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: syncresources
name: {{ template "flyteclusterresourcesync.name" . }}
Copy link
Author

Choose a reason for hiding this comment

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

This will technically recreate the deployment when it renames, not sure if that is an issue.

@@ -171,7 +171,7 @@ flytescheduler:
# -- Annotations for Flytescheduler pods
podAnnotations: {}
# -- Additional Flytescheduler container environment variables
podEnv: {}
podEnv: []
Copy link
Author

Choose a reason for hiding this comment

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

These are mapped to arrays, so it gives a warning when you set them in the values.yaml.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah thanks! 👍

That's my mistake and I probably missed this when I added it because we're setting podEnv values.

Signed-off-by: mvaal <mvaal@expediagroup.com>
Copy link

codecov bot commented May 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.22%. Comparing base (2f38d65) to head (0d6bcbc).
Report is 27 commits behind head on master.

Current head 0d6bcbc differs from pull request most recent head 35494d7

Please upload reports for the commit 35494d7 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5362      +/-   ##
==========================================
- Coverage   61.09%   60.22%   -0.88%     
==========================================
  Files         794      646     -148     
  Lines       51213    45664    -5549     
==========================================
- Hits        31288    27499    -3789     
+ Misses      17044    15575    -1469     
+ Partials     2881     2590     -291     
Flag Coverage Δ
unittests-datacatalog 69.31% <ø> (ø)
unittests-flyteadmin 58.86% <ø> (ø)
unittests-flytecopilot 17.79% <ø> (ø)
unittests-flytectl ?
unittests-flyteidl 79.30% <ø> (ø)
unittests-flyteplugins 61.94% <ø> (ø)
unittests-flytepropeller 57.32% <ø> (ø)
unittests-flytestdlib 65.75% <ø> (+0.02%) ⬆️

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.

Signed-off-by: mvaal <mvaal@expediagroup.com>
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.

[BUG] flyte-core helm chart missing ServiceAccounts and chart has warning messages
2 participants