utils

package
v4.2.720+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResource

func CreateResource(k8sClient client.Client, obj runtime.Object) error

func GUnZip

func GUnZip(data []byte) ([]byte, error)

func GZip

func GZip(data []byte) ([]byte, error)

func GenLabelMapByLabelSelector

func GenLabelMapByLabelSelector(selector labels.Selector) (map[string]string, bool)

func GetMissingRules

func GetMissingRules(allPromRules []*prom_op_api.PrometheusRule,
	patchRulesFileStr map[interface{}]interface{}) map[string]string

func GetPromConfigFromSecret

func GetPromConfigFromSecret(k8sCli client.Client, ns, name string) (string, error)

func GetPromSrvCfgFileNameFromCM

func GetPromSrvCfgFileNameFromCM(promSrvDeploy *appsv1.Deployment, promSrvConfigMap *corev1.ConfigMap) string

func GetPromSrvConfigMap

func GetPromSrvConfigMap(k8sClient client.Client, promSrvDeploy *appsv1.Deployment) (*corev1.ConfigMap, error)

func GetPromSrvDeploy

func GetPromSrvDeploy(k8sClient client.Client, promNS string) (*appsv1.Deployment, error)

func GetPromSvcNamespacedNamedBySvcURL

func GetPromSvcNamespacedNamedBySvcURL(svcURL string) (string, string)

func GetPromSvcURLFromAlamedaService

func GetPromSvcURLFromAlamedaService(alamSvc *federatoraiv1alpha1.AlamedaService) string

func GetResource

func GetResource(k8sClient client.Client, key client.ObjectKey, obj runtime.Object) error

func GetValidAlamedaService

func GetValidAlamedaService(k8sClient client.Client) (*federatoraiv1alpha1.AlamedaService, error)

func IsNamespaceSelected

func IsNamespaceSelected(k8sClient client.Client, selector labels.Selector, name string) (bool, error)

func IsPromSrvDeployedByOperator

func IsPromSrvDeployedByOperator(k8sClient client.Client) (bool, error)

func ListPrometheusRules

func ListPrometheusRules(k8sClient client.Client, opts ...client.ListOption) ([]*prom_op_api.PrometheusRule, error)

func ListPrometheuses

func ListPrometheuses(k8sClient client.Client, opts ...client.ListOption) ([]*prom_op_api.Prometheus, error)

func ListServiceMonitors

func ListServiceMonitors(k8sClient client.Client, opts ...client.ListOption) ([]*prom_op_api.ServiceMonitor, error)

func UpdateResource

func UpdateResource(k8sClient client.Client, obj runtime.Object) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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