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

Added ServiceAccountName to staging job #2074

Conversation

enrichman
Copy link
Member

Fix: #1926
Needs: epinio/helm-charts#349

This PR adds the STAGING_SERVICE_ACCOUNT_NAME env var to the Epinio server. This variable is provided to the staging job and can be used to set a specific serviceaccount that will be used during the execution.

It also adds a small refactor of the staging job func, reducing a bit the length of the func (this probably needs a better and more complete refactoring but I didn't want to add to much noise to the PR).

@enrichman enrichman added the kind/enhancement New feature or request label Feb 8, 2023
@enrichman enrichman added this to the AWS Integration milestone Feb 8, 2023
@enrichman enrichman requested a review from a team as a code owner February 8, 2023 17:44
@enrichman enrichman self-assigned this Feb 8, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2023

Codecov Report

Base: 51.95% // Head: 57.98% // Increases project coverage by +6.03% 🎉

Coverage data is based on head (3e18515) compared to base (558c502).
Patch coverage: 100.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2074      +/-   ##
==========================================
+ Coverage   51.95%   57.98%   +6.03%     
==========================================
  Files         181      181              
  Lines       14617    14615       -2     
==========================================
+ Hits         7594     8475     +881     
+ Misses       6042     5060     -982     
- Partials      981     1080      +99     
Flag Coverage Δ
acceptance-api 42.96% <100.00%> (+9.20%) ⬆️
acceptance-apps 37.25% <100.00%> (?)
acceptance-cli 54.73% <100.00%> (+12.42%) ⬆️
unittests 8.45% <21.42%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
internal/api/v1/application/stage.go 77.90% <100.00%> (+2.94%) ⬆️
internal/cli/server.go 88.02% <100.00%> (+0.52%) ⬆️
internal/api/v1/configuration/match.go 0.00% <0.00%> (-82.36%) ⬇️
internal/api/v1/appchart/match.go 0.00% <0.00%> (-80.65%) ⬇️
internal/api/v1/namespace/match.go 0.00% <0.00%> (-80.65%) ⬇️
internal/api/v1/configuration/replace.go 0.00% <0.00%> (-60.38%) ⬇️
internal/api/v1/configuration/create.go 34.28% <0.00%> (-37.15%) ⬇️
internal/api/v1/configurationbinding/create.go 53.06% <0.00%> (-25.52%) ⬇️
internal/api/v1/namespace/create.go 60.86% <0.00%> (-19.57%) ⬇️
...ernal/api/v1/configurationbinding/deletebinding.go 36.84% <0.00%> (-15.79%) ⬇️
... and 60 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@enrichman enrichman force-pushed the 1926-enable-access-to-aws-resources-through-irsa-iam-roles-for-service-accounts branch from 8610c19 to 4d16c3a Compare February 9, 2023 10:53
small refactor of the staging job func
@enrichman enrichman force-pushed the 1926-enable-access-to-aws-resources-through-irsa-iam-roles-for-service-accounts branch from 4d16c3a to 3e18515 Compare February 9, 2023 13:58
Copy link
Contributor

@andreas-kupries andreas-kupries left a comment

Choose a reason for hiding this comment

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

A question about a detail in the SA setup and passing to kube

internal/api/v1/application/stage.go Show resolved Hide resolved
@enrichman enrichman merged commit dd8c702 into main Feb 9, 2023
@enrichman enrichman deleted the 1926-enable-access-to-aws-resources-through-irsa-iam-roles-for-service-accounts branch February 9, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Enable access to AWS resources through IRSA (IAM Roles for Service Accounts)
3 participants