secrets

package
v1.5.12 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyImagePullSecretsProvider

type DummyImagePullSecretsProvider struct {
}

DummyImagePullSecretsProvider does nothing

func (*DummyImagePullSecretsProvider) GetImagePullSecrets

func (p *DummyImagePullSecretsProvider) GetImagePullSecrets(ctx context.Context, pod *v1.Pod) (*ImagePullSecretsResult, error)

GetImagePullSecrets returns an empty ImagePullSecretsResult

func (*DummyImagePullSecretsProvider) SetAuthenticatedRegistries added in v1.5.0

func (p *DummyImagePullSecretsProvider) SetAuthenticatedRegistries(registries []registry.Client)

type ImagePullSecretsProvider

type ImagePullSecretsProvider interface {
	GetImagePullSecrets(ctx context.Context, pod *v1.Pod) (*ImagePullSecretsResult, error)
	SetAuthenticatedRegistries(privateRegistries []registry.Client)
}

func NewDummyImagePullSecretsProvider

func NewDummyImagePullSecretsProvider() ImagePullSecretsProvider

NewDummyImagePullSecretsProvider initialises a dummy image pull secrets provider

func NewKubernetesImagePullSecretsProvider

func NewKubernetesImagePullSecretsProvider(clientset kubernetes.Interface) ImagePullSecretsProvider

type ImagePullSecretsResult

type ImagePullSecretsResult struct {
	Secrets   map[string][]byte
	Aggregate []byte
}

ImagePullSecretsResult contains the result of GetImagePullSecrets

func NewImagePullSecretsResult

func NewImagePullSecretsResult() *ImagePullSecretsResult

NewImagePullSecretsResult initialises ImagePullSecretsResult

func NewImagePullSecretsResultWithDefaults added in v1.5.0

func NewImagePullSecretsResultWithDefaults(defaultImagePullSecrets []registry.Client) *ImagePullSecretsResult

Initialiaze an ImagePullSecretsResult and registers image pull secrets from the given registries

func (*ImagePullSecretsResult) Add

func (r *ImagePullSecretsResult) Add(name string, data []byte)

Add a secrets to internal list and rebuilds the aggregate

func (*ImagePullSecretsResult) AuthFile

func (r *ImagePullSecretsResult) AuthFile() (*os.File, error)

AuthFile provides the aggregate as a file to be used by a docker client

type KubernetesImagePullSecretsProvider

type KubernetesImagePullSecretsProvider struct {
	// contains filtered or unexported fields
}

KubernetesImagePullSecretsProvider retrieves the secrets holding docker auth information from Kubernetes and merges them if necessary. Supports Pod secrets as well as ServiceAccount secrets.

func (*KubernetesImagePullSecretsProvider) GetImagePullSecrets

GetImagePullSecrets returns all secrets with their respective content

func (*KubernetesImagePullSecretsProvider) SetAuthenticatedRegistries added in v1.5.0

func (p *KubernetesImagePullSecretsProvider) SetAuthenticatedRegistries(registries []registry.Client)

Jump to

Keyboard shortcuts

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