secret

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreSecretsEqual

func AreSecretsEqual(secret corev1.Secret, other corev1.Secret) bool

func Create

func Create(scheme *runtime.Scheme, owner metav1.Object, mods ...secretBuilderModifier) (*corev1.Secret, error)

func ExtractToken

func ExtractToken(secret *corev1.Secret, key string) (string, error)

func GetDataFromSecretName

func GetDataFromSecretName(apiReader client.Reader, namespacedName types.NamespacedName, dataKey string, log logr.Logger) (string, error)

Types

type DataModifier

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

func NewDataModifier

func NewDataModifier(data map[string][]byte) DataModifier

func (DataModifier) Enabled

func (mod DataModifier) Enabled() bool

func (DataModifier) Modify

func (mod DataModifier) Modify(secret *corev1.Secret) error

type LabelsModifier

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

func NewLabelsModifier

func NewLabelsModifier(labels map[string]string) LabelsModifier

func (LabelsModifier) Enabled

func (mod LabelsModifier) Enabled() bool

func (LabelsModifier) Modify

func (mod LabelsModifier) Modify(secret *corev1.Secret) error

type NameModifier

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

func NewNameModifier

func NewNameModifier(name string) NameModifier

func (NameModifier) Enabled

func (mod NameModifier) Enabled() bool

func (NameModifier) Modify

func (mod NameModifier) Modify(secret *corev1.Secret) error

type NamespaceModifier

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

func NewNamespaceModifier

func NewNamespaceModifier(namespaceName string) NamespaceModifier

func (NamespaceModifier) Enabled

func (mod NamespaceModifier) Enabled() bool

func (NamespaceModifier) Modify

func (mod NamespaceModifier) Modify(secret *corev1.Secret) error

type Query

type Query struct {
	query.KubeQuery
}

func NewQuery

func NewQuery(ctx context.Context, kubeClient client.Client, kubeReader client.Reader, log logr.Logger) Query

func (Query) Create

func (query Query) Create(secret corev1.Secret) error

func (Query) CreateOrUpdate

func (query Query) CreateOrUpdate(secret corev1.Secret) error

func (Query) CreateOrUpdateForNamespaces

func (query Query) CreateOrUpdateForNamespaces(newSecret corev1.Secret, namespaces []corev1.Namespace) error

func (Query) Get

func (query Query) Get(objectKey client.ObjectKey) (corev1.Secret, error)

func (Query) GetAllFromNamespaces

func (query Query) GetAllFromNamespaces(secretName string) ([]corev1.Secret, error)

func (Query) Update

func (query Query) Update(secret corev1.Secret) error

type Tokens

type Tokens struct {
	ApiToken  string
	PaasToken string
}

type TypeModifier

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

func NewTypeModifier

func NewTypeModifier(secretType corev1.SecretType) TypeModifier

func (TypeModifier) Enabled

func (mod TypeModifier) Enabled() bool

func (TypeModifier) Modify

func (mod TypeModifier) Modify(secret *corev1.Secret) error

Jump to

Keyboard shortcuts

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