diff --git a/templates/k8smetricsservicemonitor.go b/templates/k8smetricsservicemonitor.go index 6be35546ec..2f0d61d4ee 100644 --- a/templates/k8smetricsservicemonitor.go +++ b/templates/k8smetricsservicemonitor.go @@ -8,18 +8,18 @@ import ( var params = map[string][]string{ "match[]": { - "{__name__='kube_node_status_condition'}", - "{__name__='kube_persistentvolume_info'}", - "{__name__='kube_storageclass_info'}", - "{__name__='kube_persistentvolumeclaim_info'}", - "{__name__='kube_deployment_spec_replicas'}", - "{__name__='kube_pod_status_phase'}", - "{__name__='kubelet_volume_stats_capacity_bytes'}", - "{__name__='kubelet_volume_stats_used_bytes'}", - "{__name__='node_disk_read_time_seconds_total'}", - "{__name__='node_disk_write_time_seconds_total'}", - "{__name__='node_disk_reads_completed_total'}", - "{__name__='node_disk_writes_completed_total'}", + "{__name__=\"kube_node_status_condition\"}", + "{__name__=\"kube_persistentvolume_info\"}", + "{__name__=\"kube_storageclass_info\"}", + "{__name__=\"kube_persistentvolumeclaim_info\"}", + "{__name__=\"kube_deployment_spec_replicas\"}", + "{__name__=\"kube_pod_status_phase\"}", + "{__name__=\"kubelet_volume_stats_capacity_bytes\"}", + "{__name__=\"kubelet_volume_stats_used_bytes\"}", + "{__name__=\"node_disk_read_time_seconds_total\"}", + "{__name__=\"node_disk_write_time_seconds_total\"}", + "{__name__=\"node_disk_reads_completed_total\"}", + "{__name__=\"node_disk_writes_completed_total\"}", }, } diff --git a/templates/prometheus.go b/templates/prometheus.go index 0742f03fcd..6793167b81 100644 --- a/templates/prometheus.go +++ b/templates/prometheus.go @@ -2,6 +2,7 @@ package templates import ( "fmt" + "os" promv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/red-hat-storage/ocs-operator/v4/controllers/defaults" @@ -29,9 +30,8 @@ var PrometheusSpecTemplate = promv1.PrometheusSpec{ ListenLocal: true, Resources: defaults.MonitoringResources["prometheus"], Containers: []corev1.Container{{ - Name: "kube-rbac-proxy", - // Tech-debt to include kube-rbac-proxy image from environment - Image: "gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0", + Name: "kube-rbac-proxy", + Image: os.Getenv("KUBE_RBAC_PROXY_IMAGE"), Args: []string{ fmt.Sprintf("--secure-listen-address=0.0.0.0:%d", KubeRBACProxyPortNumber), "--upstream=http://127.0.0.1:9090/",