secret

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCollectionSecret

func DeleteCollectionSecret(client *kubernetes.Clientset, secretList []k8s.SecretsData) (err error)

func DeleteSecret

func DeleteSecret(client *kubernetes.Clientset, namespace string, name string) error

Types

type ImagePullSecretSpec

type ImagePullSecretSpec struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`

	// The value of the .dockercfg property. It must be Base64 encoded.
	Data []byte `json:"data"`
}

ImagePullSecretSpec is a specification of an image pull secret implements SecretSpec

func (*ImagePullSecretSpec) GetData

func (spec *ImagePullSecretSpec) GetData() map[string][]byte

GetData returns the data the secret carries, it is a single key-value pair

func (*ImagePullSecretSpec) GetName

func (spec *ImagePullSecretSpec) GetName() string

GetName returns the name of the ImagePullSecret

func (*ImagePullSecretSpec) GetNamespace

func (spec *ImagePullSecretSpec) GetNamespace() string

GetNamespace returns the namespace of the ImagePullSecret

func (*ImagePullSecretSpec) GetType

func (spec *ImagePullSecretSpec) GetType() v1.SecretType

GetType returns the type of the ImagePullSecret, which is always api.SecretTypeDockercfg

type Secret

type Secret struct {
	ObjectMeta k8s.ObjectMeta `json:"objectMeta"`
	TypeMeta   k8s.TypeMeta   `json:"typeMeta"`
	Type       v1.SecretType  `json:"type"`
}

Secret is a single secret returned to the frontend.

func CreateSecret

func CreateSecret(client kubernetes.Interface, spec SecretSpec) (*Secret, error)

CreateSecret creates a single secret using the cluster API client

type SecretCell

type SecretCell api.Secret

func (SecretCell) GetProperty

type SecretDetail

type SecretDetail struct {
	// Extends list item structure.
	Secret `json:",inline"`

	// Data contains the secret data.  Each key must be a valid DNS_SUBDOMAIN
	// or leading dot followed by valid DNS_SUBDOMAIN.
	// The serialized form of the secret data is a base64 encoded string,
	// representing the arbitrary (possibly non-string) data value here.
	Data map[string][]byte `json:"data"`
}

SecretDetail API resource provides mechanisms to inject containers with configuration data while keeping containers agnostic of Kubernetes

func GetSecretDetail

func GetSecretDetail(client kubernetes.Interface, namespace, name string) (*SecretDetail, error)

GetSecretDetail returns detailed information about a secret

type SecretList

type SecretList struct {
	k8s.ListMeta `json:"listMeta"`

	// Unordered list of Secrets.
	Secrets []Secret `json:"secrets"`
}

SecretList is a response structure for a queried secrets list.

func GetSecretList

func GetSecretList(client kubernetes.Interface, namespace *k8scommon.NamespaceQuery, dsQuery *dataselect.DataSelectQuery) (*SecretList, error)

GetSecretList returns all secrets in the given namespace.

func ToSecretList

func ToSecretList(secrets []v1.Secret, dsQuery *dataselect.DataSelectQuery) *SecretList

type SecretSpec

type SecretSpec interface {
	GetName() string
	GetType() v1.SecretType
	GetNamespace() string
	GetData() map[string][]byte
}

SecretSpec is a common interface for the specification of different secrets.

Jump to

Keyboard shortcuts

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