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

fix: support private ecr registry validation with a per rule aws env vars #268

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

ahmad-ibra
Copy link
Contributor

Issue

N/A

Description

Previously, if different aws creds were required to validate different registry rules, we would set the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN for each rule. This would cause the latest env vars set to be used while validating all rules.

Now, we set the env vars on a per rule basis

@ahmad-ibra ahmad-ibra changed the title fix: support private ecr registry validation with a per rule aws env … fix: support private ecr registry validation with a per rule aws env vars Aug 16, 2024
@ahmad-ibra ahmad-ibra marked this pull request as ready for review August 16, 2024 18:09
@ahmad-ibra ahmad-ibra requested a review from a team as a code owner August 16, 2024 18:09
@ahmad-ibra ahmad-ibra requested a review from mattwelke August 16, 2024 18:09
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Aug 16, 2024
Copy link
Member

@TylerGillson TylerGillson left a comment

Choose a reason for hiding this comment

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

Good catch!

pkg/validate/validate.go Outdated Show resolved Hide resolved
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 16, 2024
Copy link

codecov bot commented Aug 16, 2024

Codecov Report

Attention: Patch coverage is 55.55556% with 8 lines in your changes missing coverage. Please review.

Files Patch % Lines
pkg/validate/validate.go 55.55% 4 Missing and 4 partials ⚠️
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
- Coverage   63.22%   62.79%   -0.43%     
==========================================
  Files           8        8              
  Lines         503      508       +5     
==========================================
+ Hits          318      319       +1     
- Misses        151      153       +2     
- Partials       34       36       +2     
Files Coverage Δ
internal/controller/ocivalidator_controller.go 64.44% <ø> (+1.33%) ⬆️
pkg/validate/validate.go 76.74% <55.55%> (-23.26%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5fc455...1aacdda. Read the comment docs.

@ahmad-ibra ahmad-ibra merged commit 42a5610 into main Aug 16, 2024
7 of 8 checks passed
@ahmad-ibra ahmad-ibra deleted the fix/support-multiple-private-ecr-registries branch August 16, 2024 18:45
ahmad-ibra pushed a commit that referenced this pull request Aug 16, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.2.1](v0.2.0...v0.2.1)
(2024-08-16)


### Bug Fixes

* support private ecr registry validation with a per rule aws env vars
([#268](#268))
([42a5610](42a5610))


### Other

* only add auth and pubkeys when they're not empty
([#260](#260))
([5b21888](5b21888))


### Dependency Updates

* **deps:** update
github.com/awslabs/amazon-ecr-credential-helper/ecr-login digest to
d4ae6cf
([#265](#265))
([1c4f7f2](1c4f7f2))
* **deps:** update module github.com/validator-labs/validator to v0.1.3
([#258](#258))
([4161664](4161664))
* **deps:** update module github.com/validator-labs/validator to v0.1.5
([#263](#263))
([a5fc455](a5fc455))
* **deps:** update module sigs.k8s.io/cluster-api to v1.8.0
([#261](#261))
([9847a0a](9847a0a))
* **deps:** update module sigs.k8s.io/controller-runtime to v0.18.5
([#262](#262))
([e2f73a2](e2f73a2))
* **deps:** update module sigs.k8s.io/controller-runtime to v0.19.0
([#267](#267))
([eaa40aa](eaa40aa))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants