-
Notifications
You must be signed in to change notification settings - Fork 545
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 pkg/authn/{amazon,azure,google} #1231
Conversation
- update pkg/authn/README - include new modules in hack/presubmit.sh
Codecov Report
@@ Coverage Diff @@
## main #1231 +/- ##
=======================================
Coverage 73.80% 73.80%
=======================================
Files 111 111
Lines 8191 8191
=======================================
Hits 6045 6045
Misses 1549 1549
Partials 597 597
Continue to review full report at Codecov.
|
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.
Honestly, I find the simplicity of this fantastic. My least favorite part is the google bit, which isn't this PR's fault.
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package google |
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.
This is so big and fat compared to the others :(
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.
I suppose putting this in its own module is a tall order given that gcrane
is a bit sprawled between pkg/
and cmd/
🤔 blah
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.
Yeah, that's more or less where I'm at too. I'd love to have it in its own module, but it's going to be a bit of work to get it there. Worth it? Maybe. Worth doing immediately? Probably not. 🤷
I'm -1 because I don't want this repo to be a dumping ground for keychain implementations. If we need one, docker-credential-magic seems like a better fit. |
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.
I think #1227 is sufficient for this to be easy to use. It doesn't seem worth the maintenance burden to make these one-liners slightly shorter.
Given that the ultimate goal of this effort (AIUI, @imjasonh correct me) is to improve the state of The contentious parts are (very impressively ✨ ) a single-line and sequestered in their own modules. |
@jonjohnsonjr would it be meaningfully different if these one-liners existed in a revamped |
Agree, that's the goal. I think Jon's point (which I see) is that having us maintain
"A single line justifying a whole module" is I think not the unambiguous win you think it is 🙃 But I'll take ✨ s wherever I can get them 🤩
Yes, maybe, I think. The question is why should users depend on our single-line adapter module instead of going straight from I'm not sure if you're proposing |
btw, here's the next step in the evolution (IF we proceed along this route): imjasonh/go-containerregistry@auth-auth-auth...imjasonh:authn-kubernetes -- it splits out edit: rebased that change onto |
I'm not, I'm more or less proposing moving the one-liners to your next PR, though I'm puzzled why that isn't killing Vincent's fork entirely, but need to look closer. |
... at the end of the day, I have zero interest in |
|
I think we've settled on a happy medium in #1234 that doesn't make us maintain one-liner modules. Dropping this PR. |
pkg/authn/amazon
is a wrapper arounddocker-credential-ecr-login
's logic, usingauthn.NewKeychainFromHelper
.pkg/authn/azure
is a wrapper arounddocker-credential-acr-env
's logic, usingauthn.NewKeychainFromHelper
.pkg/authn/google
is the auth-related functions frompkg/v1/google
pkg/v1/google.{authstuff}
is aliased topkg/authn/google
and marked asDeprecated
-- in a future release, we can remove it and makepkg/authn/google
a separate Go module.pkg/authn/README.md
to document these new wrappers.Other minor stuff:
hack/presubmit.sh
replace => ../../
stuffNotes for future-me: when we remove the deprecated
pkg/v1/google.{authstuff}
aliases, we can makepkg/authn/google
its own module, and probablypkg/gcrane
andcmd/gcrane
to avoid polluting the main module with Google-specific stuff. Or... just decide it's not worth it and keep Google stuff in the main module.