diff --git a/Documentation/api.md b/Documentation/api.md index 5e198385a53..bae9ca1cdfe 100644 --- a/Documentation/api.md +++ b/Documentation/api.md @@ -326,7 +326,7 @@ PrometheusSpec is a specification of the desired behavior of the Prometheus clus | podMetadata | Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata Metadata Labels and Annotations gets propagated to the prometheus pods. | *[metav1.ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#objectmeta-v1-meta) | false | | serviceMonitorSelector | ServiceMonitors to be selected for target discovery. | *[metav1.LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#labelselector-v1-meta) | false | | serviceMonitorNamespaceSelector | Namespaces to be selected for ServiceMonitor discovery. If nil, only check own namespace. | *[metav1.LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#labelselector-v1-meta) | false | -| podMonitorSelector | PodMonitors to be selected for target discovery. | *[metav1.LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#labelselector-v1-meta) | false | +| podMonitorSelector | *Experimental* PodMonitors to be selected for target discovery. | *[metav1.LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#labelselector-v1-meta) | false | | podMonitorNamespaceSelector | Namespaces to be selected for PodMonitor discovery. If nil, only check own namespace. | *[metav1.LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#labelselector-v1-meta) | false | | version | Version of Prometheus to be deployed. | string | false | | tag | Tag of Prometheus container image to be deployed. Defaults to the value of `version`. Version is ignored if Tag is set. | string | false | diff --git a/pkg/apis/monitoring/v1/types.go b/pkg/apis/monitoring/v1/types.go index aca738ea930..090e5df0c62 100644 --- a/pkg/apis/monitoring/v1/types.go +++ b/pkg/apis/monitoring/v1/types.go @@ -88,7 +88,7 @@ type PrometheusSpec struct { // Namespaces to be selected for ServiceMonitor discovery. If nil, only // check own namespace. ServiceMonitorNamespaceSelector *metav1.LabelSelector `json:"serviceMonitorNamespaceSelector,omitempty"` - // PodMonitors to be selected for target discovery. + // *Experimental* PodMonitors to be selected for target discovery. PodMonitorSelector *metav1.LabelSelector `json:"podMonitorSelector,omitempty"` // Namespaces to be selected for PodMonitor discovery. If nil, only // check own namespace. diff --git a/pkg/prometheus/promcfg.go b/pkg/prometheus/promcfg.go index 910347fb88e..ef9759567a6 100644 --- a/pkg/prometheus/promcfg.go +++ b/pkg/prometheus/promcfg.go @@ -443,10 +443,6 @@ func (cg *configGenerator) generatePodMonitorConfig(version semver.Version, m *v // Relabel namespace and pod and service labels into proper labels. relabelings = append(relabelings, []yaml.MapSlice{ - { - {Key: "source_labels", Value: []string{"__meta_kubernetes_pod_node_name"}}, - {Key: "target_label", Value: "node"}, - }, { {Key: "source_labels", Value: []string{"__meta_kubernetes_namespace"}}, {Key: "target_label", Value: "namespace"}, @@ -459,14 +455,6 @@ func (cg *configGenerator) generatePodMonitorConfig(version semver.Version, m *v {Key: "source_labels", Value: []string{"__meta_kubernetes_pod_name"}}, {Key: "target_label", Value: "pod"}, }, - { - {Key: "source_labels", Value: []string{"__meta_kubernetes_pod_phase"}}, - {Key: "target_label", Value: "pod_phase"}, - }, - { - {Key: "source_labels", Value: []string{"__meta_kubernetes_pod_ready"}}, - {Key: "target_label", Value: "pod_ready"}, - }, }...) // Relabel targetLabels from Pod onto target.