Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClusterNameKey = "cluster-name" HubInfoSecretName = "hub-info-secret" HubInfoSecretKey = "hub-info.yaml" // #nosec G101 -- Not a hardcoded credential. ObservatoriumAPIRemoteWritePath = "/api/metrics/v1/default/api/v1/receive" AnnotationSkipCreation = "skip-creation-if-exist" ClusterLabelKeyForAlerts = "managed_cluster" CollectorImage = "COLLECTOR_IMAGE" InstallPrometheus = "INSTALL_PROM" PullSecret = "PULL_SECRET" ImageConfigMap = "images-list" AllowlistConfigMapName = "observability-metrics-allowlist" AllowlistCustomConfigMapName = "observability-metrics-custom-allowlist" MetricsConfigMapKey = "metrics_list.yaml" UwlMetricsConfigMapKey = "uwl_metrics_list.yaml" PrometheusUserWorkload = "prometheus-user-workload" MetricsOcp311ConfigMapKey = "ocp311_metrics_list.yaml" CaConfigmapName = "metrics-collector-serving-certs-ca-bundle" HubMetricsCollectorMtlsCert = "observability-controller-open-cluster-management.io-observability-signer-client-cert" ClientCACertificateCN = "observability-client-ca-certificate" )
View Source
const ( OCPClusterMonitoringNamespace = "openshift-monitoring" OCPClusterMonitoringConfigMapName = "cluster-monitoring-config" OCPClusterMonitoringConfigMapKey = "config.yaml" OCPClusterMonitoringPrometheusService = "prometheus-k8s" )
View Source
const ( MetricsCollectorImgName = "metrics-collector" MetricsCollectorKey = "metrics_collector" PrometheusImgName = "prometheus" PrometheusKey = "prometheus" KubeStateMetricsImgName = "kube-state-metrics" KubeStateMetricsKey = "kube_state_metrics" NodeExporterImgName = "node-exporter" NodeExporterKey = "node_exporter" KubeRbacProxyImgName = "kube-rbac-proxy" KubeRbacProxyKey = "kube_rbac_proxy" PrometheusOperatorImgName = "prometheus-operator" PrometheusOperatorKey = "prometheus_operator" PrometheusConfigmapReloaderImgName = "prometheus-config-reloader" PrometheusConfigmapReloaderKey = "prometheus_config_reloader" )
View Source
const ( WorkloadPartitioningPodAnnotationKey = "target.workload.openshift.io/management" WorkloadPodExpectedValueJSON = "{\"effect\":\"PreferredDuringScheduling\"}" WorkloadPartitioningNSAnnotationsKey = "workload.openshift.io/allowed" WorkloadPartitioningNSExpectedValue = "management" )
Annotations to uspport OpenShift workload partitioning.
View Source
const ( DefaultClusterType = "" OcpThreeClusterType = "ocp3" SnoClusterType = "SNO" )
Variables ¶
View Source
var ImageKeyNameMap = map[string]string{ PrometheusKey: PrometheusKey, KubeStateMetricsKey: KubeStateMetricsImgName, NodeExporterKey: NodeExporterImgName, KubeRbacProxyKey: KubeRbacProxyImgName, MetricsCollectorKey: MetricsCollectorImgName, PrometheusConfigmapReloaderKey: PrometheusConfigmapReloaderImgName, }
View Source
var (
IsMCOTerminating = false
)
Functions ¶
This section is empty.
Types ¶
type CollectRule ¶
type CollectRuleGroup ¶
type CollectRuleGroup struct { Name string `yaml:"group"` Annotations map[string]string `yaml:"annotations"` Selector CollectRuleSelector `yaml:"selector"` CollectRuleList []CollectRule `yaml:"rules"` }
CollectRuleGroup structure contains information of a group of collect rules used for dnamically collecting metrics.
type CollectRuleSelector ¶
type CollectRuleSelector struct {
MatchExpression []metav1.LabelSelectorRequirement `yaml:"matchExpressions"`
}
type DynamicMetrics ¶
type HubInfo ¶
type HubInfo struct { ClusterName string `yaml:"cluster-name"` ObservatoriumAPIEndpoint string `yaml:"observatorium-api-endpoint"` AlertmanagerEndpoint string `yaml:"alertmanager-endpoint"` AlertmanagerRouterCA string `yaml:"alertmanager-router-ca"` }
HubInfo is the struct that contains the common information about the hub cluster, for example the name of managed cluster on the hub, the URL of observatorium api gateway, the URL of hub alertmanager and the CA for the hub router.
type MetricsAllowlist ¶
type MetricsAllowlist struct { NameList []string `yaml:"names"` MatchList []string `yaml:"matches"` RenameMap map[string]string `yaml:"renames"` RuleList []RecordingRule `yaml:"rules"` //deprecated RecordingRuleList []RecordingRule `yaml:"recording_rules"` CollectRuleGroupList []CollectRuleGroup `yaml:"collect_rules"` }
type RecordingRule ¶
Click to show internal directories.
Click to hide internal directories.