secretutil

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 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 []*secretsstorev1.SecretObjectData, secretType corev1.SecretType, files map[string]string) (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 secretsstorev1.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