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
Option to not inject defaults in objects defined in the pkg/name package #527
Comments
This is currently blocking bazelbuild/rules_docker#580 |
A couple options:
Either one of these should also apply to references of the form |
If we decide to go with 2, the v1.tarball package will need an option to use the |
I think that's reasonable default behavior, since we should be able to parse either form. |
Alright, so looking at the interface for // Reference defines the interface that consumers use when they can
// take either a tag or a digest.
type Reference interface {
fmt.Stringer
// Context accesses the Repository context of the reference.
Context() Repository
// Identifier accesses the type-specific portion of the reference.
Identifier() string
// Name is the fully-qualified reference name.
Name() string
// Scope is the scope needed to access this reference.
Scope(string) string
} It seems like |
For
Tag
andReference
created in the pkg/name package using NewTag and ParseReference, for image strings that don't specify the registry name or name the repository in a certain way, some default values defined here and here get injected into the generated objects. I would like the ability to specify an option to the Tag & Reference creator functions such that they never insert any defaults. So if an image name likefoo/bar:latest
is specified, I would prefer the Registry entry in the created object to be left blank instead of defaulting it todocker.io
. The default behavior of these functions can still be inserting these values if necessary.The text was updated successfully, but these errors were encountered: