secretutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCertPart

func GetCertPart(data []byte, key string) ([]byte, error)

GetCertPart returns the certificate or the private key part of the cert

func GetSHAFromSecret

func GetSHAFromSecret(data map[string][]byte) (string, error)

GetSHAFromSecret gets SHA for the secret data

func GetSecretData

func GetSecretData(secretObjData []*secretsyncv1alpha1.SecretObjectData, secretType corev1.SecretType, files map[string][]byte) (map[string][]byte, error)

GetSecretData gets the object contents from the pods target path and returns a map that will be populated in the Kubernetes secret data field

func GetSecretType

func GetSecretType(sType string) corev1.SecretType

GetSecretType returns a k8s secret type. Kubernetes doesn't impose any constraints on the type name: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types If the secret type is empty, then default is Opaque.

func ValidateSecretObject

func ValidateSecretObject(secretObj secretsyncv1alpha1.SecretObject) error

ValidateSecretObject performs basic validation of the secret provider class secret object to check if the mandatory fields - name, type and data are defined

Types

This section is empty.

Jump to

Keyboard shortcuts

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