Documentation ¶
Index ¶
- Constants
- func NewBasicAuthSecret(secretNamespace, secretName, registry, user, password string) (*corev1.Secret, error)
- func NewECRLoginCredentialsSecret(secretNamespace, secretName, accountID, region, awsAccessKeyID, ... string) *corev1.Secret
- func SecretNameFromURL(prefix, url string) string
- type Config
- func (c Config) AddECR(accountID, region, accessKeyID, secretKey string)
- func (c *Config) AddECRFromSecret(data map[string][]byte) error
- func (c *Config) AddRegistriesFromDockerConfig(data []byte) error
- func (c *Config) AddRegistryWithUsernamePassword(url, username, password string)
- func (c Config) ConfigString(ctx context.Context) ([]byte, *time.Time, error)
- func (c Config) Secret(ctx context.Context, secretNamespace, secretName string) (*corev1.Secret, *time.Time, error)
- type DockerRegistryConfig
- type ECRLoginCredentialsProvider
- type LoginCredentialProvider
- type LoginCredentials
- 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
Variables ¶
This section is empty.
Functions ¶
func NewBasicAuthSecret ¶
func SecretNameFromURL ¶
Types ¶
type Config ¶
type Config struct {
Registries map[string]LoginCredentialProvider
}
func NewConfigFromSecrets ¶
func (*Config) AddRegistriesFromDockerConfig ¶
func (*Config) AddRegistryWithUsernamePassword ¶
func (Config) ConfigString ¶
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) (*LoginCredentials, *time.Time, error)
type LoginCredentialProvider ¶
type LoginCredentials ¶
type StaticLoginCredentialProvider ¶
func NewStaticLoginCredentialProvider ¶
func NewStaticLoginCredentialProvider(url, username, password string) StaticLoginCredentialProvider
func (StaticLoginCredentialProvider) GetURL ¶
func (p StaticLoginCredentialProvider) GetURL() string
func (StaticLoginCredentialProvider) LoginCredentials ¶
func (p StaticLoginCredentialProvider) LoginCredentials(ctx context.Context) (*LoginCredentials, *time.Time, error)
Click to show internal directories.
Click to hide internal directories.