-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
cleanup: breakup the pkg/credentials into writer and matcher #8542
base: main
Are you sure you want to change the base?
cleanup: breakup the pkg/credentials into writer and matcher #8542
Conversation
The credentials package contains the a matcher and a writer which out of which only the writer is used in cmd/entrypoint. In an effort to isolate usage and not indirectly import the corev1 api which the matcher uses for MatchingAnnotations, we are breaking up the credentials builder interface into two builders for writer and matcher. This ensures that the entrypoint only uses the writer and not the matcher, and we are only using either the writer or the matcher functionality as necessary and not importing unnecessary deps.
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start ❤️ Needs a bit more work but it's definitely going into the right direction.
@@ -33,9 +33,9 @@ import ( | |||
featureFlags "github.com/tektoncd/pipeline/pkg/apis/config" | |||
"github.com/tektoncd/pipeline/pkg/apis/pipeline" | |||
v1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" | |||
"github.com/tektoncd/pipeline/pkg/credentials" | |||
"github.com/tektoncd/pipeline/pkg/credentials/dockercreds" | |||
"github.com/tektoncd/pipeline/pkg/credentials/gitcreds" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to do the same for credentials/{dockercreds,gitcreds…
👼🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what you mean 🤔 😅
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/retest |
Changes
The credentials package contains the a matcher and a writer which out of which only the writer is used in cmd/entrypoint. In an effort to isolate usage and not indirectly import the corev1 api which the matcher uses for MatchingAnnotations, we are breaking up the credentials builder interface into two builders for writer and matcher.
This ensures that the entrypoint only uses the writer and not the matcher, and we are only using either the writer or the matcher functionality as necessary and not importing unnecessary deps.
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep/kind cleanup
Release Notes