utils

package
v0.0.0-...-ea8c238 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFinalizer

func AddFinalizer(object metav1.Object, finalizer string)

AddFinalizer adds a finalizer to the given object

func Contains

func Contains(s []string, str string) bool

Contains returns true if a slice contains a string, otherwise false

func DeleteConfigMap

func DeleteConfigMap(name string, namespace string, client client.Client, reqLogger logr.Logger) error

DeleteConfigMap deletes a ConfigMap

func DeleteFinalizer

func DeleteFinalizer(object metav1.Object, finalizer string)

DeleteFinalizer removes a finalizer from the given object

func DeleteSecret

func DeleteSecret(name string, namespace string, client client.Client, reqLogger logr.Logger) error

DeleteSecret deletes a Secret

func DeleteSyncSet

func DeleteSyncSet(name string, namespace string, client client.Client, reqLogger logr.Logger) error

DeleteSyncSet deletes a SyncSet

func GetClusterID

func GetClusterID(cd *hivev1.ClusterDeployment) string

func HasFinalizer

func HasFinalizer(object metav1.Object, finalizer string) bool

HasFinalizer returns true if the given object has the given finalizer

func LoadConfigMapData

func LoadConfigMapData(c client.Client, configMap types.NamespacedName, dataKey string) (string, error)

LoadConfigMapData loads a given configmap key and returns its data as a string.

func LoadSecretData

func LoadSecretData(c client.Client, secretName, namespace, dataKey string) (string, error)

LoadSecretData loads a given secret key and returns its data as a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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