Przeglądaj źródła

Merge branch 'develop' into feature/allow-ui-to-run-from-non-privileged

Ajay Tripathy 3 lat temu
rodzic
commit
91d2d2ce43
3 zmienionych plików z 5 dodań i 4 usunięć
  1. 1 0
      CONTRIBUTING.md
  2. 2 2
      pkg/costmodel/metrics.go
  3. 2 2
      pkg/metrics/jobmetrics.go

+ 1 - 0
CONTRIBUTING.md

@@ -7,6 +7,7 @@ Thanks for your help improving the OpenCost project! There are many ways to cont
 * joining the discussion in the [CNCF Slack](https://slack.cncf.io/) in the [#opencost](https://cloud-native.slack.com/archives/C03D56FPD4G) channel
 * participating in the fortnightly [OpenCost Working Group](https://calendar.google.com/calendar/u/0/embed?src=c_c0f7q56e5eeod3j89bb320fvjg@group.calendar.google.com&ctz=America/Los_Angeles) meetings ([notes here](https://drive.google.com/drive/folders/1hXlcyFPePB7t3z6lyVzdxmdfrbzeT1Jz))
 * committing software via the workflow below
+* keep up with community events using our [Calendar](https://calendar.google.com/calendar/u/0/embed?src=c_c0f7q56e5eeod3j89bb320fvjg@group.calendar.google.com&ctz=America/Los_Angeles)
 
 ## Getting Help
 

+ 2 - 2
pkg/costmodel/metrics.go

@@ -38,7 +38,7 @@ type ClusterInfoCollector struct {
 // collected by this Collector.
 func (cic ClusterInfoCollector) Describe(ch chan<- *prometheus.Desc) {
 	disabledMetrics := cic.metricsConfig.GetDisabledMetricsMap()
-	if _, disabled := disabledMetrics["kube_pod_annotations"]; disabled {
+	if _, disabled := disabledMetrics["kubecost_cluster_info"]; disabled {
 		return
 	}
 
@@ -49,7 +49,7 @@ func (cic ClusterInfoCollector) Describe(ch chan<- *prometheus.Desc) {
 // Collect is called by the Prometheus registry when collecting metrics.
 func (cic ClusterInfoCollector) Collect(ch chan<- prometheus.Metric) {
 	disabledMetrics := cic.metricsConfig.GetDisabledMetricsMap()
-	if _, disabled := disabledMetrics["kube_pod_annotations"]; disabled {
+	if _, disabled := disabledMetrics["kubecost_cluster_info"]; disabled {
 		return
 	}
 

+ 2 - 2
pkg/metrics/jobmetrics.go

@@ -25,7 +25,7 @@ type KubeJobCollector struct {
 // collected by this Collector.
 func (kjc KubeJobCollector) Describe(ch chan<- *prometheus.Desc) {
 	disabledMetrics := kjc.metricsConfig.GetDisabledMetricsMap()
-	if _, disabled := disabledMetrics["kube_pod_annotations"]; disabled {
+	if _, disabled := disabledMetrics["kube_job_status_failed"]; disabled {
 		return
 	}
 
@@ -35,7 +35,7 @@ func (kjc KubeJobCollector) Describe(ch chan<- *prometheus.Desc) {
 // Collect is called by the Prometheus registry when collecting metrics.
 func (kjc KubeJobCollector) Collect(ch chan<- prometheus.Metric) {
 	disabledMetrics := kjc.metricsConfig.GetDisabledMetricsMap()
-	if _, disabled := disabledMetrics["kube_pod_annotations"]; disabled {
+	if _, disabled := disabledMetrics["kube_job_status_failed"]; disabled {
 		return
 	}