secrets

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: MIT Imports: 8 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(pod *v1.Pod) (*ImagePullSecretsResult, error)

GetImagePullSecrets returns an empty ImagePullSecretsResult

type ImagePullSecretsProvider

type ImagePullSecretsProvider interface {
	GetImagePullSecrets(pod *v1.Pod) (*ImagePullSecretsResult, error)
}

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 (*ImagePullSecretsResult) Add

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

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

func (p *KubernetesImagePullSecretsProvider) GetImagePullSecrets(pod *v1.Pod) (*ImagePullSecretsResult, error)

GetImagePullSecrets returns all secrets with their respective content

Jump to

Keyboard shortcuts

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