common

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: 9 Imported by: 0

Documentation

Index

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"
	ECRRoleArn              = "roleArn"
)

nolint:gosec

Variables

This section is empty.

Functions

func NewBasicAuthSecret

func NewBasicAuthSecret(secretNamespace, secretName, registry, user, password string) (*corev1.Secret, error)

func NewECRLoginCredentialsSecret

func NewECRLoginCredentialsSecret(secretNamespace, secretName, accountID, region, awsAccessKeyID, awsSecretAccessKey string) *corev1.Secret

func SecretNameFromURL

func SecretNameFromURL(prefix, url string) string

Types

type DockerRegistryConfig

type DockerRegistryConfig struct {
	Auths map[string]LoginCredentials `json:"auths"`
}

DockerRegistryConfig represents a docker compliant image pull secret json file

type LoginCredentials

type LoginCredentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Auth     string `json:"auth"` // base64 encoded username:password
}

Jump to

Keyboard shortcuts

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