imagepullsecrets

package
v0.22.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

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 BuildDockerConfigJSON(server, username, password string) ([]byte, error)

func CleanSecretNames

func CleanSecretNames(names []string) []string

func DiscoverServiceAccountIssuer

func DiscoverServiceAccountIssuer(ctx context.Context, restConfig *rest.Config) (string, error)

func ECRSubject

func ECRSubject(namespace, serviceAccountName string) string

func EffectiveSecretNames

func EffectiveSecretNames(staticPullSecrets []string, managedSecrets []v1.ImagePullSecret) []string

func Hash

func Hash(secretNames []string) string

func NormalizeIssuerURL

func NormalizeIssuerURL(issuerURL string) (string, error)

func NormalizeRegistryServer

func NormalizeRegistryServer(server string) (string, error)

Types

type Capability

type Capability struct {
	Available bool
	Reason    string
}

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

type RegistryTestResult struct {
	Success bool
	Message string
}

func TestBasicRegistryCredentials

func TestBasicRegistryCredentials(ctx context.Context, server, username, password, image string) (RegistryTestResult, error)

func TestDockerConfigJSONCredentials

func TestDockerConfigJSONCredentials(ctx context.Context, dockerConfigJSON []byte, image string) (RegistryTestResult, error)

Jump to

Keyboard shortcuts

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