imagepullsecrets

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 22 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 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