feat(helm): add 'ClientOptResolver' ClientOption

This is a way to make the containerd resolver configurable by third-party users.

Related #10623

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
pull/11129/head
Antonio Gamez Diaz 2 years ago
parent 001850aa4f
commit 80bc7df782
No known key found for this signature in database
GPG Key ID: 96108DED40068D35

@ -166,6 +166,13 @@ func ClientOptCredentialsFile(credentialsFile string) ClientOption {
}
}
// ClientOptResolver returns a function that sets the resolver setting on a client options set
func ClientOptResolver(resolver remotes.Resolver) ClientOption {
return func(client *Client) {
client.resolver = resolver
}
}
type (
// LoginOption allows specifying various settings on login
LoginOption func(*loginOperation)

@ -73,6 +73,7 @@ func (suite *RegistryClientTestSuite) SetupSuite() {
ClientOptEnableCache(true),
ClientOptWriter(suite.Out),
ClientOptCredentialsFile(credentialsFile),
ClientOptResolver(nil),
)
suite.Nil(err, "no error creating registry client")

Loading…
Cancel
Save