Documentation ¶
Overview ¶
Package credentialprovider includes Functions copied from https://github.com/kubernetes/kubernetes/blob/v1.26.1/pkg/credentialprovider/keyring.go#L160-L233. These functions have been copied over so as not to add k8s.io/kubernetes as a module dependency.
Index ¶
- func ParseSchemelessURL(schemelessURL string) (*url.URL, error)
- func SplitURL(u *url.URL) (parts []string, port string)
- func URLMatchesACR(target string) (bool, error)
- func URLMatchesECR(target string) (bool, error)
- func URLMatchesGCR(target string) (bool, error)
- func URLMatchesKnownRegistryProvider(target string) (bool, error)
- func URLMatchesOneOfGlobs(globs []string, target string) (bool, error)
- func URLsMatch(globURL, targetURL *url.URL) (bool, error)
- func URLsMatchStr(glob, target string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseSchemelessURL ¶
ParseSchemelessURL parses a schemeless url and returns a url.URL url.Parse require a scheme, but ours don't have schemes. Adding a scheme to make url.Parse happy, then clear out the resulting scheme.
func URLMatchesACR ¶
func URLMatchesECR ¶
func URLMatchesGCR ¶
func URLsMatch ¶
URLsMatch checks whether the given target url matches the glob url, which may have glob wild cards in the host name.
Examples:
globURL=*.docker.io, targetURL=blah.docker.io => match globURL=*.docker.io, targetURL=not.right.io => no match
Note that we don't support wildcards in ports and paths yet.
func URLsMatchStr ¶
URLsMatchStr is wrapper for URLsMatch, operating on strings instead of URLs.
Types ¶
This section is empty.