Documentation ¶
Index ¶
- func ComputeMountableChecksum(secrets []corev1.Secret, configMaps []corev1.ConfigMap) (map[string]string, error)
- func GetConfigMapSelector(ctx context.Context, c client.Client, namespace string, ...) (string, error)
- func GetSecretSelector(ctx context.Context, c client.Client, namespace string, ...) ([]byte, error)
- func LookupConfigMapSelector(configMap *corev1.ConfigMap, sel matryoshkav1alpha1.ConfigMapSelector, ...) (string, error)
- func LookupSecretSelector(secret *corev1.Secret, sel matryoshkav1alpha1.SecretSelector, ...) ([]byte, error)
- func MergeStringStringMaps(ms ...map[string]string) map[string]string
- func StringOrDefault(s string, defaultValue string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeMountableChecksum ¶
func ComputeMountableChecksum(secrets []corev1.Secret, configMaps []corev1.ConfigMap) (map[string]string, error)
ComputeMountableChecksum computes checksums for secrets and config maps by applying a sha256sum to the ordered items.
func GetConfigMapSelector ¶
func GetConfigMapSelector(ctx context.Context, c client.Client, namespace string, sel matryoshkav1alpha1.ConfigMapSelector, defaultKey string) (string, error)
GetConfigMapSelector gets the config map referenced by the namespace and matryoshkav1alpha1.ConfigMapSelector and uses LookupConfigMapSelector to retrieve the specified key. If key is empty, defaultKey is used.
func GetSecretSelector ¶
func GetSecretSelector(ctx context.Context, c client.Client, namespace string, sel matryoshkav1alpha1.SecretSelector, defaultKey string) ([]byte, error)
GetSecretSelector gets the secret referenced by the namespace and matryoshkav1alpha1.SecretSelector and uses LookupSecretSelector to retrieve the specified key. If key is empty, defaultKey is used.
func LookupConfigMapSelector ¶
func LookupConfigMapSelector(configMap *corev1.ConfigMap, sel matryoshkav1alpha1.ConfigMapSelector, defaultKey string) (string, error)
LookupConfigMapSelector looks up the key referenced by the matryoshkav1alpha1.ConfigMapSelector or the defaultKey if key is empty.
func LookupSecretSelector ¶
func LookupSecretSelector(secret *corev1.Secret, sel matryoshkav1alpha1.SecretSelector, defaultKey string) ([]byte, error)
LookupSecretSelector looks up the key referenced by the matryoshkav1alpha1.SecretSelector or the defaultKey if key is empty.
func MergeStringStringMaps ¶
MergeStringStringMaps returns a new map with the key-value pairs of all given maps merged. If all maps are nil, nil is returned. If a map is non-nil, a non-nil map is returned. The key-value pairs of the last map have the highest priority.
func StringOrDefault ¶
StringOrDefault returns the given string if it's non-empty, otherwise it returns the defaultValue.
Types ¶
This section is empty.