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 aws secret mamager support to env_var #6316

Conversation

thomasjpfan
Copy link
Member

@thomasjpfan thomasjpfan commented Mar 7, 2025

Tracking issue

Closes #6304

Why are the changes needed?

The env_var was not supported with the AWS secret manager.

What changes were proposed in this pull request?

This PR adds env_var support to AWS.

How was this patch tested?

Unit tests were added.

Summary by Bito

This pull request adds support for an env_var option in the AWS secret manager integration. The production code now injects an extra environment variable when a secret has a non-empty env_var value. Test files have been updated comprehensively to check for correct container configurations and volume mounts.

Unit tests added: True

Estimated effort to review (1-5, lower is better): 1

Signed-off-by: Thomas J. Fan <[email protected]>
@thomasjpfan thomasjpfan added the added Merged changes that add new functionality label Mar 7, 2025
@flyte-bot
Copy link
Collaborator

flyte-bot commented Mar 7, 2025

Code Review Agent Run #82418f

Actionable Suggestions - 1
  • flytepropeller/pkg/webhook/aws_secret_manager.go - 1
    • Consider checking mount requirement for env var · Line 107-110
Review Details
  • Files reviewed - 2 · Commit Range: 378f6e7..adecd10
    • flytepropeller/pkg/webhook/aws_secret_manager.go
    • flytepropeller/pkg/webhook/aws_secret_manager_test.go
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

AI Code Review powered by Bito Logo

@flyte-bot
Copy link
Collaborator

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
New Feature - AWS Secret Manager EnvVar Injection

aws_secret_manager.go - Introduced new logic to check for a non-empty env_var and inject an extra environment variable for AWS secrets.

Testing - Enhanced AWS Secret Manager Test Coverage

aws_secret_manager_test.go - Updated and expanded tests to verify container configurations, environment variable assignments, and volume mount integrations supporting the new env_var feature.

Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.48%. Comparing base (b779bed) to head (adecd10).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6316      +/-   ##
==========================================
- Coverage   58.49%   58.48%   -0.01%     
==========================================
  Files         937      937              
  Lines       71088    71091       +3     
==========================================
- Hits        41583    41580       -3     
- Misses      26353    26359       +6     
  Partials     3152     3152              
Flag Coverage Δ
unittests-datacatalog 59.06% <ø> (ø)
unittests-flyteadmin 56.27% <ø> (-0.03%) ⬇️
unittests-flytecopilot 30.99% <ø> (ø)
unittests-flytectl 64.70% <ø> (ø)
unittests-flyteidl 76.12% <ø> (ø)
unittests-flyteplugins 61.00% <ø> (ø)
unittests-flytepropeller 54.80% <100.00%> (+<0.01%) ⬆️
unittests-flytestdlib 64.04% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eapolinario eapolinario merged commit 5bfcf27 into flyteorg:master Mar 11, 2025
50 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added Merged changes that add new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] putting secrets into env vars doesn't work with AWS Secrets Manager
3 participants