pullsecrets

package
v0.3.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceSecretStatus = "Ok"
)

Variables

This section is empty.

Functions

func NewDockerRegistryConfig

func NewDockerRegistryConfig() common.DockerRegistryConfig

Types

type Config

type Config struct {
	Registries map[string]LoginCredentialProvider
}

func NewConfig

func NewConfig() *Config

func NewConfigFromSecrets

func NewConfigFromSecrets(ctx context.Context, c client.Client, refs []types.NamespacedName) *Config

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 ECRLoginCredentialsProvider

type ECRLoginCredentialsProvider struct {
	Credentials aws.Credentials
	Region      string
	AccountID   string
	RoleArn     string
	Client      impsEcr.ClientInterface
}

func NewECRLoginCredentialsProvider

func NewECRLoginCredentialsProvider(accountID, region, keyID, secretAccessKey string, roleArn string, client impsEcr.ClientInterface) ECRLoginCredentialsProvider

func (ECRLoginCredentialsProvider) GetURL

func (ECRLoginCredentialsProvider) LoginCredentials

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

type ErrorsPerSecret added in v0.3.1

type ErrorsPerSecret map[string]error

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 LoginCredentialsWithDetails added in v0.3.1

type LoginCredentialsWithDetails struct {
	common.LoginCredentials
	Expiration *time.Time
	URL        string
}

type ResultingDockerConfig added in v0.3.1

type ResultingDockerConfig struct {
	ErrorsPerSecret
	ConfigContents []byte
	Expiration     *time.Time
}

func (ResultingDockerConfig) AsSecret added in v0.3.1

func (c ResultingDockerConfig) AsSecret(secretNamespace, secretName string) *corev1.Secret

type StaticLoginCredentialProvider

type StaticLoginCredentialProvider struct {
	Credentials []LoginCredentialsWithDetails
}

func NewStaticLoginCredentialProvider

func NewStaticLoginCredentialProvider(parsedDockerConfig common.DockerRegistryConfig) StaticLoginCredentialProvider

func (StaticLoginCredentialProvider) LoginCredentials

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL