Documentation ¶
Index ¶
- Constants
- func SecretNameFromURL(prefix, url string) string
- type Config
- type DockerRegistryConfig
- type ECRLoginCredentialsProvider
- type ErroredCredentialProvider
- type ErrorsPerSecret
- type LoginCredentialProvider
- type LoginCredentials
- type LoginCredentialsWithDetails
- type ResultingDockerConfig
- type StaticLoginCredentialProvider
Constants ¶
View Source
const ( SecretTypeBasicAuth = "kubernetes.io/dockerconfigjson" SecretTypeECRCredentials = "banzaicloud.io/aws-ecr-login-config" SecretKeyDockerConfig = ".dockerconfigjson" ECRSecretRegion = "region" ECRSecretAccountID = "accountID" ECRSecretKeyAccessKeyID = "accessKeyID" ECRSecretSecretKey = "secretKey" )
nolint:gosec
View Source
const (
SourceSecretStatus = "Ok"
)
Variables ¶
This section is empty.
Functions ¶
func SecretNameFromURL ¶
Types ¶
type Config ¶
type Config struct {
Registries map[string]LoginCredentialProvider
}
func NewConfigFromSecrets ¶
func (*Config) ECRProviderFromSecret ¶ added in v0.3.1
func (c *Config) ECRProviderFromSecret(data map[string][]byte) LoginCredentialProvider
func (Config) ResultingDockerConfig ¶ added in v0.3.1
func (c Config) ResultingDockerConfig(ctx context.Context) (*ResultingDockerConfig, error)
func (*Config) StaticProviderFromDockerConfig ¶ added in v0.3.1
func (c *Config) StaticProviderFromDockerConfig(data []byte) LoginCredentialProvider
type DockerRegistryConfig ¶
type DockerRegistryConfig struct {
Auths map[string]LoginCredentials `json:"auths"`
}
DockerRegistryConfig represents a docker compliant image pull secret json file
func NewDockerRegistryConfig ¶
func NewDockerRegistryConfig() DockerRegistryConfig
type ECRLoginCredentialsProvider ¶
type ECRLoginCredentialsProvider struct { Credentials aws.Credentials Region string AccountID string }
func NewECRLoginCredentialsProvider ¶
func NewECRLoginCredentialsProvider(accountID, region, keyID, secretAccessKey string) ECRLoginCredentialsProvider
func (ECRLoginCredentialsProvider) GetURL ¶
func (p ECRLoginCredentialsProvider) GetURL() string
func (ECRLoginCredentialsProvider) LoginCredentials ¶
func (p ECRLoginCredentialsProvider) LoginCredentials(ctx context.Context) ([]LoginCredentialsWithDetails, error)
type ErroredCredentialProvider ¶ added in v0.3.1
type ErroredCredentialProvider struct {
Error error
}
ErroredCredentialProvider can be used to store a setup error into the config object
so that at least the providers that are working correctly gets reconciled.
func NewErroredCredentialProvider ¶ added in v0.3.1
func NewErroredCredentialProvider(err error) ErroredCredentialProvider
func (ErroredCredentialProvider) LoginCredentials ¶ added in v0.3.1
func (p ErroredCredentialProvider) LoginCredentials(ctx context.Context) ([]LoginCredentialsWithDetails, error)
type ErrorsPerSecret ¶ added in v0.3.1
func NewErrorsPerSecret ¶ added in v0.3.1
func NewErrorsPerSecret() ErrorsPerSecret
func (ErrorsPerSecret) AddSecret ¶ added in v0.3.1
func (e ErrorsPerSecret) AddSecret(name string)
func (*ErrorsPerSecret) AsError ¶ added in v0.3.1
func (e *ErrorsPerSecret) AsError() error
func (ErrorsPerSecret) AsStatus ¶ added in v0.3.1
func (e ErrorsPerSecret) AsStatus() map[string]string
func (ErrorsPerSecret) FailedSecrets ¶ added in v0.3.1
func (e ErrorsPerSecret) FailedSecrets() []string
func (ErrorsPerSecret) SetSecretError ¶ added in v0.3.1
func (e ErrorsPerSecret) SetSecretError(name string, err error)
type LoginCredentialProvider ¶
type LoginCredentialProvider interface {
LoginCredentials(context.Context) ([]LoginCredentialsWithDetails, error)
}
type LoginCredentials ¶
type LoginCredentialsWithDetails ¶ added in v0.3.1
type LoginCredentialsWithDetails struct { LoginCredentials Expiration *time.Time URL string }
type ResultingDockerConfig ¶ added in v0.3.1
type ResultingDockerConfig struct { ErrorsPerSecret ConfigContents []byte Expiration *time.Time }
type StaticLoginCredentialProvider ¶
type StaticLoginCredentialProvider struct {
Credentials []LoginCredentialsWithDetails
}
func NewStaticLoginCredentialProvider ¶
func NewStaticLoginCredentialProvider(parsedDockerConfig DockerRegistryConfig) StaticLoginCredentialProvider
func (StaticLoginCredentialProvider) LoginCredentials ¶
func (p StaticLoginCredentialProvider) LoginCredentials(ctx context.Context) ([]LoginCredentialsWithDetails, error)
Click to show internal directories.
Click to hide internal directories.