Documentation
¶
Index ¶
- Constants
- func BuildDockerConfigJSON(server, username, password string) ([]byte, error)
- func CleanSecretNames(names []string) []string
- func DiscoverServiceAccountIssuer(ctx context.Context, restConfig *rest.Config) (string, error)
- func ECRSubject(namespace, serviceAccountName string) string
- func EffectiveSecretNames(staticPullSecrets []string, managedSecrets []v1.ImagePullSecret) []string
- func Hash(secretNames []string) string
- func NormalizeIssuerURL(issuerURL string) (string, error)
- func NormalizeRegistryServer(server string) (string, error)
- func ValidateBasicSpec(spec *types.BasicImagePullSecretConfig) (*types.BasicImagePullSecretConfig, error)
- func ValidateECRSpec(spec *types.ECRImagePullSecretConfig) (*types.ECRImagePullSecretConfig, error)
- func ValidateSpec(spec v1.ImagePullSecretSpec) (v1.ImagePullSecretSpec, error)
- type Capability
- type ECRAuthorizationClient
- type ECRRefreshResult
- type RegistryTestResult
Constants ¶
View Source
const ( CredentialContext = "image-pull-secrets" PasswordEnvVar = "REGISTRY_PASSWORD" DefaultECRAudience = "sts.amazonaws.com" DefaultECRRefreshSchedule = "0 */6 * * *" LabelManagedBy = "obot.ai/managed-by" LabelManagedByValue = "image-pull-secrets" LabelImagePullSecret = "obot.ai/image-pull-secret" AnnotationECRRefreshRequestedAt = "obot.ai/ecr-refresh-requested-at" )
Variables ¶
This section is empty.
Functions ¶
func BuildDockerConfigJSON ¶
func CleanSecretNames ¶
func ECRSubject ¶
func EffectiveSecretNames ¶
func EffectiveSecretNames(staticPullSecrets []string, managedSecrets []v1.ImagePullSecret) []string
func NormalizeIssuerURL ¶
func NormalizeRegistryServer ¶
func ValidateBasicSpec ¶
func ValidateBasicSpec(spec *types.BasicImagePullSecretConfig) (*types.BasicImagePullSecretConfig, error)
func ValidateECRSpec ¶
func ValidateECRSpec(spec *types.ECRImagePullSecretConfig) (*types.ECRImagePullSecretConfig, error)
func ValidateSpec ¶
func ValidateSpec(spec v1.ImagePullSecretSpec) (v1.ImagePullSecretSpec, error)
Types ¶
type Capability ¶
func Availability ¶
func Availability(kubernetesBackend bool, staticPullSecrets []string) Capability
type ECRAuthorizationClient ¶
type ECRAuthorizationClient interface {
GetAuthorizationToken(context.Context, *ecr.GetAuthorizationTokenInput, ...func(*ecr.Options)) (*ecr.GetAuthorizationTokenOutput, error)
}
type ECRRefreshResult ¶
type ECRRefreshResult struct {
DockerConfigJSON []byte
TokenExpiresAt *time.Time
RegistryEndpoints []string
}
func FetchECRDockerConfig ¶
func FetchECRDockerConfig(ctx context.Context, client ECRAuthorizationClient) (*ECRRefreshResult, error)
type RegistryTestResult ¶
func TestBasicRegistryCredentials ¶
func TestBasicRegistryCredentials(ctx context.Context, server, username, password, image string) (RegistryTestResult, error)
Click to show internal directories.
Click to hide internal directories.