Documentation ¶
Index ¶
- Constants
- func CheckCRDExist(crdClient crdClientSet.Interface, crdName string) (bool, error)
- func CompareObject(re1 runtime.RawExtension, re2 runtime.RawExtension) bool
- func GeneratePassword(n int) (string, error)
- func GetAllowList(client client.Client, name, namespace string) (*operatorconfig.MetricsAllowlist, *operatorconfig.MetricsAllowlist, ...)
- func GetAnnotation(annotations map[string]string, key string) string
- func GetK8sObj(kind string) runtime.Object
- func GetK8sObjWithVersion(kind, version string) runtime.Object
- func GetObject(re runtime.RawExtension) (runtime.Object, error)
- func GetOrCreateCRDClient() (crdClientSet.Interface, error)
- func GetOrCreateKubeClient() (kubernetes.Interface, error)
- func GetOrCreateOCPClient() (ocpClientSet.Interface, error)
- func GetOrCreatePromClient() (promClientSet.Interface, error)
- func GetPVCList(c client.Client, namespace string, matchLabels map[string]string) ([]corev1.PersistentVolumeClaim, error)
- func GetStatefulSetList(c client.Client, namespace string, matchLabels map[string]string) ([]appsv1.StatefulSet, error)
- func MergeAllowlist(...) (*operatorconfig.MetricsAllowlist, *operatorconfig.MetricsAllowlist, ...)
- func ParseAllowlistConfigMap(cm corev1.ConfigMap) (*operatorconfig.MetricsAllowlist, *operatorconfig.MetricsAllowlist, ...)
- func ProxyEnvVarsAreSet() bool
- func RegisterDebugEndpoint(register func(string, http.Handler) error) error
- func Remove(list []string, s string) []string
- func RemoveDuplicates(elements []string) []string
- func UpdateCRDWebhookNS(crdClient crdClientSet.Interface, namespace, crdName string) error
- func UpdateDeployLabel(c client.Client, dName, namespace, label string) error
Constants ¶
const ConfigErrorMessage = "Failed to create the config"
Variables ¶
This section is empty.
Functions ¶
func CheckCRDExist ¶
func CheckCRDExist(crdClient crdClientSet.Interface, crdName string) (bool, error)
func CompareObject ¶
func CompareObject(re1 runtime.RawExtension, re2 runtime.RawExtension) bool
CompareObject is used to compare two k8s objs are same or not
func GeneratePassword ¶
GeneratePassword returns a base64 encoded securely random bytes.
func GetAllowList ¶
func GetAllowList(client client.Client, name, namespace string) (*operatorconfig.MetricsAllowlist, *operatorconfig.MetricsAllowlist, *operatorconfig.MetricsAllowlist, error)
func GetAnnotation ¶
GetAnnotation returns the annotation value for a given key, or an empty string if not set
func GetK8sObjWithVersion ¶
GetK8sObj is used to get k8s struct based on the passed-in Kind name
func GetOrCreateCRDClient ¶
func GetOrCreateCRDClient() (crdClientSet.Interface, error)
GetOrCreateCRDClient gets an existing or creates a new CRD client.
func GetOrCreateKubeClient ¶
func GetOrCreateKubeClient() (kubernetes.Interface, error)
GetOrCreateKubeClient gets existing kubeclient or creates new one if it doesn't exist.
func GetOrCreateOCPClient ¶
func GetOrCreateOCPClient() (ocpClientSet.Interface, error)
GetOrCreateOCPClient creates ocp client.
func GetOrCreatePromClient ¶
func GetOrCreatePromClient() (promClientSet.Interface, error)
GetOrCreatePromClient creates prometheus client.
func GetPVCList ¶
func GetPVCList(c client.Client, namespace string, matchLabels map[string]string) ([]corev1.PersistentVolumeClaim, error)
GetPVCList get pvc with matched labels.
func GetStatefulSetList ¶
func GetStatefulSetList(c client.Client, namespace string, matchLabels map[string]string) ([]appsv1.StatefulSet, error)
GetStatefulSetList get sts with matched labels.
func MergeAllowlist ¶
func MergeAllowlist(allowlist, customAllowlist, ocp3Allowlist, uwlAllowlist, customUwlAllowlist *operatorconfig.MetricsAllowlist) (*operatorconfig.MetricsAllowlist, *operatorconfig.MetricsAllowlist, *operatorconfig.MetricsAllowlist)
func ParseAllowlistConfigMap ¶
func ParseAllowlistConfigMap(cm corev1.ConfigMap) (*operatorconfig.MetricsAllowlist, *operatorconfig.MetricsAllowlist, *operatorconfig.MetricsAllowlist, error)
func ProxyEnvVarsAreSet ¶
func ProxyEnvVarsAreSet() bool
ProxyEnvVarsAreSet ... OLM handles these environment variables as a unit; if at least one of them is set, all three are considered overridden and the cluster-wide defaults are not used for the deployments of the subscribed Operator. https://docs.openshift.com/container-platform/4.6/operators/admin/olm-configuring-proxy-support.html
func RegisterDebugEndpoint ¶
func RemoveDuplicates ¶
func UpdateCRDWebhookNS ¶
func UpdateCRDWebhookNS(crdClient crdClientSet.Interface, namespace, crdName string) error
Types ¶
This section is empty.