Documentation ¶
Index ¶
- func AddFinalizer(om *metav1.ObjectMeta, item string) *metav1.ObjectMeta
- func BaseLabelBuilder() map[string]string
- func BuildEnvVarSource(fieldPath string) *corev1.EnvVarSource
- func ConfigMapBuilder(name string, namespace string, data map[string]string, ...) *corev1.ConfigMap
- func GenerateChecksum(v interface{}) string
- func GeneratePass() string
- func GetConfigResource(ctx context.Context, key types.NamespacedName) (*corev1.ConfigMap, error)
- func GetSecretResource(ctx context.Context, key types.NamespacedName) (*corev1.Secret, error)
- func LabelBuilder(labels map[string]string) map[string]string
- func RemoveFinalizer(om *metav1.ObjectMeta, item string) *metav1.ObjectMeta
- func Retry(attempts int, intervals time.Duration, fn func() error) error
- func SecretBuilder(secretName string, namespace string, data map[string][]byte, ...) *corev1.Secret
- func StringNotEmpty(values ...string) string
- func StringSanitize(s string, limit int) string
- func TimeTrack(start time.Time) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFinalizer ¶
func AddFinalizer(om *metav1.ObjectMeta, item string) *metav1.ObjectMeta
AddFinalizer adds finalizer to object metadata
func BaseLabelBuilder ¶
BaseLabelBuilder builds source label. It will be used as base label for the kubernetes objects which created by db-operator
func BuildEnvVarSource ¶
func BuildEnvVarSource(fieldPath string) *corev1.EnvVarSource
BuildEnvVarSource builds kubernetes a source for the value of an EnvVar
func ConfigMapBuilder ¶
func ConfigMapBuilder(name string, namespace string, data map[string]string, ownership []metav1.OwnerReference) *corev1.ConfigMap
ConfigMapBuilder builds kubernetes configmap object
func GenerateChecksum ¶
func GenerateChecksum(v interface{}) string
GenerateChecksum generates hash value of given interface
func GetConfigResource ¶
GetConfigResource get configmap resource by kubernetes incluster rest api TODO: will be deprecated
func GetSecretResource ¶
GetSecretResource get secret resource by kubernetes incluster rest api TODO: will be deprecated
func LabelBuilder ¶
LabelBuilder builds key, value label which can be used for kubernetes object metadata
func RemoveFinalizer ¶
func RemoveFinalizer(om *metav1.ObjectMeta, item string) *metav1.ObjectMeta
RemoveFinalizer removes finalizer from object metadata
func SecretBuilder ¶
func SecretBuilder(secretName string, namespace string, data map[string][]byte, ownership []metav1.OwnerReference) *corev1.Secret
SecretBuilder builds kubernetes secret object
func StringNotEmpty ¶
StringNotEmpty return the first not empty string
func StringSanitize ¶
StringSanitize sanitizes and truncates a string to a fixed length using a hash function. useful for restricting the length and content of user supplied database identifiers.
Types ¶
This section is empty.