diff --git a/files/templates/scrapeconfigs/additional-scrape-configs.template.yaml b/files/templates/scrapeconfigs/additional-scrape-configs.template.yaml index 5b07eae5e..6c411ce56 100644 --- a/files/templates/scrapeconfigs/additional-scrape-configs.template.yaml +++ b/files/templates/scrapeconfigs/additional-scrape-configs.template.yaml @@ -1,10 +1,10 @@ -[[- if not (contains "kube-apiserver" .IgnoredTargets) ]] +[[- if not (contains "kube-apiserver" .IgnoredTargets) -]] - job_name: [[ .ClusterID ]]-prometheus/kubernetes-apiserver-[[ .ClusterID ]]/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - source_labels: [__meta_kubernetes_service_label_component] @@ -25,7 +25,7 @@ scheme: https kubernetes_sd_configs: - role: node -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig" . | indent 2 ]] relabel_configs: - target_label: __address__ @@ -55,7 +55,7 @@ namespaces: names: - giantswarm -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name] @@ -73,7 +73,7 @@ scheme: https kubernetes_sd_configs: - role: node -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - target_label: app @@ -103,7 +103,7 @@ scheme: https kubernetes_sd_configs: - role: node -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig" . | indent 2 ]] relabel_configs: - source_labels: [__address__] @@ -144,7 +144,7 @@ scheme: https kubernetes_sd_configs: - role: pod -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig" . | indent 2 ]] relabel_configs: - source_labels: [__address__] @@ -169,24 +169,24 @@ honor_labels: true scheme: https kubernetes_sd_configs: - [[ if .CAPIManagementCluster ]] + [[- if .CAPIManagementCluster ]] - role: pod namespaces: names: - kube-system - [[ else ]] + [[- else ]] - role: node - [[ end ]] -[[ if ne .ClusterType "management_cluster" ]] + [[- end ]] +[[- if ne .ClusterType "management_cluster" ]] api_server: https://[[ .APIServerURL ]] tls_config: ca_file: /etc/prometheus/secrets/[[ .SecretName ]]/ca cert_file: /etc/prometheus/secrets/[[ .SecretName ]]/crt key_file: /etc/prometheus/secrets/[[ .SecretName ]]/key insecure_skip_verify: false -[[ else ]] +[[- else ]] bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token -[[ end ]] +[[- end ]] tls_config: ca_file: /etc/prometheus/secrets/[[ .EtcdSecretName ]]/ca cert_file: /etc/prometheus/secrets/[[ .EtcdSecretName ]]/crt @@ -215,7 +215,7 @@ target_label: __address__ replacement: ${1}:2379 action: replace -[[ if eq .ClusterType "management_cluster" ]] +[[- if eq .ClusterType "management_cluster" ]] # if the 'ip' label is present, use the value - source_labels: [__meta_kubernetes_node_label_ip] regex: (.+) @@ -250,7 +250,7 @@ namespaces: names: - kube-system -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - source_labels: [__address__] @@ -302,7 +302,7 @@ namespaces: names: - kube-system -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - source_labels: [__address__] @@ -353,7 +353,7 @@ namespaces: names: - kube-system -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - source_labels: [__address__] @@ -387,7 +387,7 @@ namespaces: names: - kube-system -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - source_labels: [__address__] @@ -422,12 +422,12 @@ - role: endpoints namespaces: names: -[[ if eq .ClusterType "management_cluster" ]] +[[- if eq .ClusterType "management_cluster" ]] - monitoring -[[ else ]] +[[- else ]] - kube-system -[[ end ]] -[[ include "_apiserver" . ]] +[[- end ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - source_labels: [__address__] @@ -455,7 +455,7 @@ scheme: https kubernetes_sd_configs: - role: pod -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - target_label: __address__ @@ -486,7 +486,7 @@ scheme: https kubernetes_sd_configs: - role: endpoints -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - source_labels: [__meta_kubernetes_service_annotationpresent_giantswarm_io_monitoring, __meta_kubernetes_service_labelpresent_giantswarm_io_monitoring] @@ -644,7 +644,7 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment -[[ if eq .ClusterType "management_cluster" ]] +[[- if eq .ClusterType "management_cluster" ]] # cert-operator (missing label) (versionned so it needs to be kept) - job_name: [[ .ClusterID ]]-prometheus/cert-operator-[[ .ClusterID ]]/0 honor_labels: true @@ -686,7 +686,7 @@ action: drop [[ include "_common" . | indent 2 ]] [[ include "_labelingschema" . | indent 2 ]] -[[ if .Bastions ]] +[[- if .Bastions ]] # bastion exporters - job_name: [[ .ClusterID ]]-prometheus/bastions-[[ .ClusterID ]]/0 honor_labels: true @@ -701,12 +701,12 @@ role: bastion relabel_configs: [[ include "_labelingschema" . | indent 2 ]] -[[ end ]] +[[- end ]] [[- if .AdditionalScrapeConfigs ]] # installation-specific configs from config repo [[ .AdditionalScrapeConfigs ]] [[- end ]] -[[ if eq .Provider "kvm" ]] +[[- if eq .Provider "kvm" ]] # flannel-operator (missing label) - job_name: [[ .ClusterID ]]-prometheus/flannel-operator-[[ .ClusterID ]]/0 honor_labels: true @@ -794,8 +794,8 @@ app: mayu relabel_configs: [[ include "_labelingschema" . | indent 2 ]] -[[ end ]] -[[ if not .CAPIManagementCluster ]] +[[- end ]] +[[- if not .CAPIManagementCluster ]] - job_name: [[ .ClusterID ]]-prometheus/vault-[[ .ClusterID ]]/0 honor_labels: true scheme: http @@ -814,7 +814,7 @@ app: vault-etcd-backups-exporter relabel_configs: [[ include "_labelingschema" . | indent 2 ]] -[[ end ]] +[[- end ]] # nginx-ingress-controller - job_name: [[ .ClusterID ]]-prometheus/nginx-ingress-controller-[[ .ClusterID ]]/0 honor_labels: true @@ -824,7 +824,7 @@ namespaces: names: - kube-system -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig" . | indent 2 ]] relabel_configs: - source_labels: [__meta_kubernetes_service_annotationpresent_giantswarm_io_monitoring, __meta_kubernetes_service_labelpresent_giantswarm_io_monitoring] @@ -853,7 +853,7 @@ - source_labels: [__name__] regex: nginx_ingress_controller_(bytes_sent_bucket|request_size_bucket|response_duration_seconds_bucket|response_size_bucket|request_duration_seconds_count|connect_duration_seconds_bucket|header_duration_seconds_bucket|bytes_sent_count|request_duration_seconds_sum|bytes_sent_sum|request_size_count|response_size_count|response_duration_seconds_sum|response_duration_seconds_count|ingress_upstream_latency_seconds|ingress_upstream_latency_seconds_sum|ingress_upstream_latency_seconds_count) action: drop -[[ end ]] +[[- end ]] # prometheus - job_name: [[ .ClusterID ]]-prometheus/prometheus-[[ .ClusterID ]]/0 honor_labels: true @@ -875,7 +875,7 @@ namespaces: names: - kube-system -[[ include "_apiserver" . ]] +[[- include "_apiserver" . ]] [[ include "_tlsconfig_skip" . | indent 2 ]] relabel_configs: - replacement: http @@ -892,4 +892,4 @@ replacement: $1 [[ include "_common" . | indent 2 ]] [[ include "_labelingschema" . | indent 2 ]] -[[ end ]] +[[- end ]] diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-1-awsconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-1-awsconfig.golden index a7e3bea21..6366825ab 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-1-awsconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-1-awsconfig.golden @@ -1,10 +1,8 @@ - - job_name: alice-prometheus/kubernetes-apiserver-alice/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -461,7 +449,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -547,7 +534,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -624,7 +610,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -702,10 +687,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -776,7 +758,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -836,7 +817,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -1018,7 +998,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: alice-prometheus/prometheus-alice/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-2-azureconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-2-azureconfig.golden index ab61c3fcd..ea8eb40f3 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-2-azureconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-2-azureconfig.golden @@ -1,10 +1,8 @@ - - job_name: foo-prometheus/kubernetes-apiserver-foo/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -452,7 +440,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -530,10 +517,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -604,7 +588,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -664,7 +647,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -846,7 +828,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: foo-prometheus/prometheus-foo/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-3-kvmconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-3-kvmconfig.golden index 6112aae5f..dfafebf37 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-3-kvmconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-3-kvmconfig.golden @@ -1,10 +1,8 @@ - - job_name: bar-prometheus/kubernetes-apiserver-bar/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -461,7 +449,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -547,7 +534,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -624,7 +610,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -702,10 +687,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -776,7 +758,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -836,7 +817,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -1018,7 +998,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: bar-prometheus/prometheus-bar/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-4-control-plane.golden b/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-4-control-plane.golden index 4f83269af..c30f7de78 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-4-control-plane.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-4-control-plane.golden @@ -1,10 +1,8 @@ - - job_name: kubernetes-prometheus/kubernetes-apiserver-kubernetes/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -48,7 +46,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -101,7 +98,6 @@ namespaces: names: - giantswarm - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -154,7 +150,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -209,7 +204,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -268,7 +262,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -329,12 +322,8 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - tls_config: ca_file: /etc/prometheus/secrets/etcd-certificates/ca cert_file: /etc/prometheus/secrets/etcd-certificates/crt @@ -350,7 +339,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - # if the 'ip' label is present, use the value - source_labels: [__meta_kubernetes_node_label_ip] regex: (.+) @@ -397,7 +385,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -476,7 +463,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -555,7 +541,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -625,7 +610,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -696,10 +680,7 @@ - role: endpoints namespaces: names: - - monitoring - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -763,7 +744,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -816,7 +796,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -991,7 +970,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # cert-operator (missing label) (versionned so it needs to be kept) - job_name: kubernetes-prometheus/cert-operator-kubernetes/0 honor_labels: true @@ -1067,9 +1045,6 @@ # Add customer label. - target_label: customer replacement: pmo - - - - job_name: kubernetes-prometheus/vault-kubernetes/0 honor_labels: true scheme: http @@ -1108,7 +1083,6 @@ # Add customer label. - target_label: customer replacement: pmo - # nginx-ingress-controller - job_name: kubernetes-prometheus/nginx-ingress-controller-kubernetes/0 honor_labels: true @@ -1118,7 +1092,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1172,7 +1145,6 @@ - source_labels: [__name__] regex: nginx_ingress_controller_(bytes_sent_bucket|request_size_bucket|response_duration_seconds_bucket|response_size_bucket|request_duration_seconds_count|connect_duration_seconds_bucket|header_duration_seconds_bucket|bytes_sent_count|request_duration_seconds_sum|bytes_sent_sum|request_size_count|response_size_count|response_duration_seconds_sum|response_duration_seconds_count|ingress_upstream_latency_seconds|ingress_upstream_latency_seconds_sum|ingress_upstream_latency_seconds_count) action: drop - # prometheus - job_name: kubernetes-prometheus/prometheus-kubernetes/0 honor_labels: true @@ -1213,7 +1185,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1267,4 +1238,3 @@ # Add customer label. - target_label: customer replacement: pmo - diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-5-cluster-api-v1alpha3.golden b/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-5-cluster-api-v1alpha3.golden index 28f78e1ee..19a82eb3e 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-5-cluster-api-v1alpha3.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/aws/case-5-cluster-api-v1alpha3.golden @@ -1,10 +1,8 @@ - - job_name: baz-prometheus/kubernetes-apiserver-baz/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -452,7 +440,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -530,10 +517,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -604,7 +588,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -664,7 +647,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -846,7 +828,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: baz-prometheus/prometheus-baz/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-1-awsconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-1-awsconfig.golden index 7b2557b44..af685b4da 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-1-awsconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-1-awsconfig.golden @@ -1,10 +1,8 @@ - - job_name: alice-prometheus/kubernetes-apiserver-alice/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -461,7 +449,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -547,7 +534,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -624,7 +610,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -702,10 +687,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -776,7 +758,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -836,7 +817,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -1018,7 +998,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: alice-prometheus/prometheus-alice/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-2-azureconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-2-azureconfig.golden index 8ab02592d..e0f123d3a 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-2-azureconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-2-azureconfig.golden @@ -1,10 +1,8 @@ - - job_name: foo-prometheus/kubernetes-apiserver-foo/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -452,7 +440,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -530,10 +517,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -604,7 +588,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -664,7 +647,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -846,7 +828,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: foo-prometheus/prometheus-foo/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-3-kvmconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-3-kvmconfig.golden index a40baabe1..3b03d4a10 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-3-kvmconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-3-kvmconfig.golden @@ -1,10 +1,8 @@ - - job_name: bar-prometheus/kubernetes-apiserver-bar/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -461,7 +449,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -547,7 +534,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -624,7 +610,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -702,10 +687,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -776,7 +758,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -836,7 +817,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -1018,7 +998,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: bar-prometheus/prometheus-bar/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-4-control-plane.golden b/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-4-control-plane.golden index a9381a774..3e4428048 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-4-control-plane.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-4-control-plane.golden @@ -1,10 +1,8 @@ - - job_name: kubernetes-prometheus/kubernetes-apiserver-kubernetes/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -48,7 +46,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -101,7 +98,6 @@ namespaces: names: - giantswarm - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -154,7 +150,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -209,7 +204,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -268,7 +262,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -329,12 +322,8 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - tls_config: ca_file: /etc/prometheus/secrets/etcd-certificates/ca cert_file: /etc/prometheus/secrets/etcd-certificates/crt @@ -350,7 +339,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - # if the 'ip' label is present, use the value - source_labels: [__meta_kubernetes_node_label_ip] regex: (.+) @@ -397,7 +385,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -476,7 +463,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -555,7 +541,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -625,7 +610,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -696,10 +680,7 @@ - role: endpoints namespaces: names: - - monitoring - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -763,7 +744,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -816,7 +796,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -991,7 +970,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # cert-operator (missing label) (versionned so it needs to be kept) - job_name: kubernetes-prometheus/cert-operator-kubernetes/0 honor_labels: true @@ -1067,9 +1045,6 @@ # Add customer label. - target_label: customer replacement: pmo - - - - job_name: kubernetes-prometheus/vault-kubernetes/0 honor_labels: true scheme: http @@ -1108,7 +1083,6 @@ # Add customer label. - target_label: customer replacement: pmo - # nginx-ingress-controller - job_name: kubernetes-prometheus/nginx-ingress-controller-kubernetes/0 honor_labels: true @@ -1118,7 +1092,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1172,7 +1145,6 @@ - source_labels: [__name__] regex: nginx_ingress_controller_(bytes_sent_bucket|request_size_bucket|response_duration_seconds_bucket|response_size_bucket|request_duration_seconds_count|connect_duration_seconds_bucket|header_duration_seconds_bucket|bytes_sent_count|request_duration_seconds_sum|bytes_sent_sum|request_size_count|response_size_count|response_duration_seconds_sum|response_duration_seconds_count|ingress_upstream_latency_seconds|ingress_upstream_latency_seconds_sum|ingress_upstream_latency_seconds_count) action: drop - # prometheus - job_name: kubernetes-prometheus/prometheus-kubernetes/0 honor_labels: true @@ -1213,7 +1185,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1267,4 +1238,3 @@ # Add customer label. - target_label: customer replacement: pmo - diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-5-cluster-api-v1alpha3.golden b/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-5-cluster-api-v1alpha3.golden index 10aa6bc46..734d661e4 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-5-cluster-api-v1alpha3.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/azure/case-5-cluster-api-v1alpha3.golden @@ -1,10 +1,8 @@ - - job_name: baz-prometheus/kubernetes-apiserver-baz/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -452,7 +440,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -530,10 +517,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -604,7 +588,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -664,7 +647,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -846,7 +828,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: baz-prometheus/prometheus-baz/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-1-awsconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-1-awsconfig.golden index bf05d79ea..c0763e2aa 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-1-awsconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-1-awsconfig.golden @@ -1,10 +1,8 @@ - - job_name: alice-prometheus/kubernetes-apiserver-alice/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -117,7 +114,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -183,7 +179,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -251,20 +246,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -322,7 +313,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -408,7 +398,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -494,7 +483,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -571,7 +559,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -649,10 +636,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -723,7 +707,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -783,7 +766,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -965,7 +947,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: alice-prometheus/prometheus-alice/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-2-azureconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-2-azureconfig.golden index 37f963195..c61b23314 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-2-azureconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-2-azureconfig.golden @@ -1,10 +1,8 @@ - - job_name: foo-prometheus/kubernetes-apiserver-foo/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -117,7 +114,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -183,7 +179,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -251,20 +246,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -322,7 +313,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -408,7 +398,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -494,7 +483,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -571,7 +559,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -649,10 +636,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -723,7 +707,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -783,7 +766,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -965,7 +947,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: foo-prometheus/prometheus-foo/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-3-kvmconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-3-kvmconfig.golden index 11de58f87..75135f85e 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-3-kvmconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-3-kvmconfig.golden @@ -1,10 +1,8 @@ - - job_name: bar-prometheus/kubernetes-apiserver-bar/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -117,7 +114,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -183,7 +179,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -251,20 +246,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -322,7 +313,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -408,7 +398,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -494,7 +483,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -571,7 +559,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -649,10 +636,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -723,7 +707,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -783,7 +766,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -965,7 +947,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: bar-prometheus/prometheus-bar/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-4-control-plane.golden b/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-4-control-plane.golden index 055642c8c..27ca8d66d 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-4-control-plane.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-4-control-plane.golden @@ -1,10 +1,8 @@ - - job_name: kubernetes-prometheus/kubernetes-apiserver-kubernetes/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -51,7 +49,6 @@ namespaces: names: - giantswarm - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -104,7 +101,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -159,7 +155,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -218,7 +213,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -279,15 +273,11 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - tls_config: ca_file: /etc/prometheus/secrets/etcd-certificates/ca cert_file: /etc/prometheus/secrets/etcd-certificates/crt @@ -345,7 +335,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -424,7 +413,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -503,7 +491,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -573,7 +560,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -644,10 +630,7 @@ - role: endpoints namespaces: names: - - monitoring - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -711,7 +694,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -764,7 +746,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -939,7 +920,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # cert-operator (missing label) (versionned so it needs to be kept) - job_name: kubernetes-prometheus/cert-operator-kubernetes/0 honor_labels: true @@ -1015,7 +995,6 @@ # Add customer label. - target_label: customer replacement: pmo - # installation-specific configs from config repo - job_name: test1 static_configs: @@ -1031,8 +1010,6 @@ relabel_configs: - source_labels: [__address__] target_label: __param_target - - # nginx-ingress-controller - job_name: kubernetes-prometheus/nginx-ingress-controller-kubernetes/0 honor_labels: true @@ -1042,7 +1019,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1096,7 +1072,6 @@ - source_labels: [__name__] regex: nginx_ingress_controller_(bytes_sent_bucket|request_size_bucket|response_duration_seconds_bucket|response_size_bucket|request_duration_seconds_count|connect_duration_seconds_bucket|header_duration_seconds_bucket|bytes_sent_count|request_duration_seconds_sum|bytes_sent_sum|request_size_count|response_size_count|response_duration_seconds_sum|response_duration_seconds_count|ingress_upstream_latency_seconds|ingress_upstream_latency_seconds_sum|ingress_upstream_latency_seconds_count) action: drop - # prometheus - job_name: kubernetes-prometheus/prometheus-kubernetes/0 honor_labels: true @@ -1137,7 +1112,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1191,4 +1165,3 @@ # Add customer label. - target_label: customer replacement: pmo - diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-5-cluster-api-v1alpha3.golden b/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-5-cluster-api-v1alpha3.golden index a02c9dca6..b516610b4 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-5-cluster-api-v1alpha3.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/capa/case-5-cluster-api-v1alpha3.golden @@ -5,7 +5,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -67,7 +66,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -133,7 +131,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -201,20 +198,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -272,7 +265,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -349,7 +341,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -427,10 +418,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -500,7 +488,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -685,7 +672,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: baz-prometheus/prometheus-baz/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-1-awsconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-1-awsconfig.golden index bec2c5b6d..4f8ba7438 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-1-awsconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-1-awsconfig.golden @@ -1,10 +1,8 @@ - - job_name: alice-prometheus/kubernetes-apiserver-alice/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -117,7 +114,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -183,7 +179,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -251,20 +246,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -322,7 +313,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -408,7 +398,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -494,7 +483,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -571,7 +559,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -649,10 +636,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -723,7 +707,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -783,7 +766,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -965,7 +947,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: alice-prometheus/prometheus-alice/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-2-azureconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-2-azureconfig.golden index 91add138d..8c967cab4 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-2-azureconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-2-azureconfig.golden @@ -1,10 +1,8 @@ - - job_name: foo-prometheus/kubernetes-apiserver-foo/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -117,7 +114,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -183,7 +179,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -251,20 +246,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -322,7 +313,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -408,7 +398,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -494,7 +483,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -571,7 +559,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -649,10 +636,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -723,7 +707,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -783,7 +766,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -965,7 +947,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: foo-prometheus/prometheus-foo/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-3-kvmconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-3-kvmconfig.golden index cbdfd371f..d3e7d9326 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-3-kvmconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-3-kvmconfig.golden @@ -1,10 +1,8 @@ - - job_name: bar-prometheus/kubernetes-apiserver-bar/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -117,7 +114,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -183,7 +179,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -251,20 +246,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -322,7 +313,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -408,7 +398,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -494,7 +483,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -571,7 +559,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -649,10 +636,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -723,7 +707,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -783,7 +766,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -965,7 +947,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: bar-prometheus/prometheus-bar/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-4-control-plane.golden b/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-4-control-plane.golden index 54e7495bd..52111b600 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-4-control-plane.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-4-control-plane.golden @@ -1,10 +1,8 @@ - - job_name: kubernetes-prometheus/kubernetes-apiserver-kubernetes/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -51,7 +49,6 @@ namespaces: names: - giantswarm - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -104,7 +101,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -159,7 +155,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -218,7 +213,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -279,15 +273,11 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - tls_config: ca_file: /etc/prometheus/secrets/etcd-certificates/ca cert_file: /etc/prometheus/secrets/etcd-certificates/crt @@ -345,7 +335,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -424,7 +413,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -503,7 +491,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -573,7 +560,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -644,10 +630,7 @@ - role: endpoints namespaces: names: - - monitoring - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -711,7 +694,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -764,7 +746,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -939,7 +920,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # cert-operator (missing label) (versionned so it needs to be kept) - job_name: kubernetes-prometheus/cert-operator-kubernetes/0 honor_labels: true @@ -1015,7 +995,6 @@ # Add customer label. - target_label: customer replacement: pmo - # installation-specific configs from config repo - job_name: test1 static_configs: @@ -1031,8 +1010,6 @@ relabel_configs: - source_labels: [__address__] target_label: __param_target - - # nginx-ingress-controller - job_name: kubernetes-prometheus/nginx-ingress-controller-kubernetes/0 honor_labels: true @@ -1042,7 +1019,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1096,7 +1072,6 @@ - source_labels: [__name__] regex: nginx_ingress_controller_(bytes_sent_bucket|request_size_bucket|response_duration_seconds_bucket|response_size_bucket|request_duration_seconds_count|connect_duration_seconds_bucket|header_duration_seconds_bucket|bytes_sent_count|request_duration_seconds_sum|bytes_sent_sum|request_size_count|response_size_count|response_duration_seconds_sum|response_duration_seconds_count|ingress_upstream_latency_seconds|ingress_upstream_latency_seconds_sum|ingress_upstream_latency_seconds_count) action: drop - # prometheus - job_name: kubernetes-prometheus/prometheus-kubernetes/0 honor_labels: true @@ -1137,7 +1112,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1191,4 +1165,3 @@ # Add customer label. - target_label: customer replacement: pmo - diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-5-cluster-api-v1alpha3.golden b/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-5-cluster-api-v1alpha3.golden index 0f03ea72d..a44c08184 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-5-cluster-api-v1alpha3.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/gcp/case-5-cluster-api-v1alpha3.golden @@ -5,7 +5,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -67,7 +66,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -133,7 +131,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -201,20 +198,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -272,7 +265,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -349,7 +341,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -427,10 +418,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -500,7 +488,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -685,7 +672,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: baz-prometheus/prometheus-baz/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-1-awsconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-1-awsconfig.golden index 01dc3fc19..0e975484c 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-1-awsconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-1-awsconfig.golden @@ -1,10 +1,8 @@ - - job_name: alice-prometheus/kubernetes-apiserver-alice/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -461,7 +449,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -547,7 +534,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -624,7 +610,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -702,10 +687,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -776,7 +758,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -836,7 +817,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -1018,7 +998,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: alice-prometheus/prometheus-alice/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-2-azureconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-2-azureconfig.golden index f8efcac82..1a36a1fda 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-2-azureconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-2-azureconfig.golden @@ -1,10 +1,8 @@ - - job_name: foo-prometheus/kubernetes-apiserver-foo/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -452,7 +440,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -530,10 +517,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -604,7 +588,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -664,7 +647,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -846,7 +828,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: foo-prometheus/prometheus-foo/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-3-kvmconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-3-kvmconfig.golden index 789b36adc..e7c9dddc5 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-3-kvmconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-3-kvmconfig.golden @@ -1,10 +1,8 @@ - - job_name: bar-prometheus/kubernetes-apiserver-bar/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -461,7 +449,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -547,7 +534,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -624,7 +610,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -702,10 +687,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -776,7 +758,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -836,7 +817,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -1018,7 +998,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: bar-prometheus/prometheus-bar/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-4-control-plane.golden b/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-4-control-plane.golden index 20d16ec39..ad3149bdb 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-4-control-plane.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-4-control-plane.golden @@ -1,10 +1,8 @@ - - job_name: kubernetes-prometheus/kubernetes-apiserver-kubernetes/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -48,7 +46,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -101,7 +98,6 @@ namespaces: names: - giantswarm - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -154,7 +150,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -209,7 +204,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -268,7 +262,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -329,12 +322,8 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - tls_config: ca_file: /etc/prometheus/secrets/etcd-certificates/ca cert_file: /etc/prometheus/secrets/etcd-certificates/crt @@ -350,7 +339,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - # if the 'ip' label is present, use the value - source_labels: [__meta_kubernetes_node_label_ip] regex: (.+) @@ -397,7 +385,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -476,7 +463,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -555,7 +541,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -625,7 +610,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -696,10 +680,7 @@ - role: endpoints namespaces: names: - - monitoring - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -763,7 +744,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -816,7 +796,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -991,7 +970,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # cert-operator (missing label) (versionned so it needs to be kept) - job_name: kubernetes-prometheus/cert-operator-kubernetes/0 honor_labels: true @@ -1067,7 +1045,6 @@ # Add customer label. - target_label: customer replacement: pmo - # installation-specific configs from config repo - job_name: test1 static_configs: @@ -1083,7 +1060,6 @@ relabel_configs: - source_labels: [__address__] target_label: __param_target - # flannel-operator (missing label) - job_name: kubernetes-prometheus/flannel-operator-kubernetes/0 honor_labels: true @@ -1293,8 +1269,6 @@ # Add customer label. - target_label: customer replacement: pmo - - - job_name: kubernetes-prometheus/vault-kubernetes/0 honor_labels: true scheme: http @@ -1333,7 +1307,6 @@ # Add customer label. - target_label: customer replacement: pmo - # nginx-ingress-controller - job_name: kubernetes-prometheus/nginx-ingress-controller-kubernetes/0 honor_labels: true @@ -1343,7 +1316,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1397,7 +1369,6 @@ - source_labels: [__name__] regex: nginx_ingress_controller_(bytes_sent_bucket|request_size_bucket|response_duration_seconds_bucket|response_size_bucket|request_duration_seconds_count|connect_duration_seconds_bucket|header_duration_seconds_bucket|bytes_sent_count|request_duration_seconds_sum|bytes_sent_sum|request_size_count|response_size_count|response_duration_seconds_sum|response_duration_seconds_count|ingress_upstream_latency_seconds|ingress_upstream_latency_seconds_sum|ingress_upstream_latency_seconds_count) action: drop - # prometheus - job_name: kubernetes-prometheus/prometheus-kubernetes/0 honor_labels: true @@ -1438,7 +1409,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1492,4 +1462,3 @@ # Add customer label. - target_label: customer replacement: pmo - diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-5-cluster-api-v1alpha3.golden b/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-5-cluster-api-v1alpha3.golden index ad794eaa5..76e86c900 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-5-cluster-api-v1alpha3.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/kvm/case-5-cluster-api-v1alpha3.golden @@ -1,10 +1,8 @@ - - job_name: baz-prometheus/kubernetes-apiserver-baz/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -112,7 +109,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -174,7 +170,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -240,7 +235,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -308,17 +302,13 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: node - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -334,7 +324,6 @@ target_label: __address__ replacement: ${1}:2379 action: replace - - target_label: app replacement: etcd - source_labels: [__address__] @@ -375,7 +364,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -452,7 +440,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -530,10 +517,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -604,7 +588,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -664,7 +647,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -846,7 +828,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: baz-prometheus/prometheus-baz/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-1-awsconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-1-awsconfig.golden index 85fdc16e0..911092f02 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-1-awsconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-1-awsconfig.golden @@ -1,10 +1,8 @@ - - job_name: alice-prometheus/kubernetes-apiserver-alice/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -117,7 +114,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -183,7 +179,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -251,20 +246,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -322,7 +313,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -408,7 +398,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -494,7 +483,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -571,7 +559,6 @@ namespaces: names: - kube-system - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -649,10 +636,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -723,7 +707,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -783,7 +766,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.alice:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -965,7 +947,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: alice-prometheus/prometheus-alice/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-2-azureconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-2-azureconfig.golden index 0ec5192b5..5a20e649b 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-2-azureconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-2-azureconfig.golden @@ -1,10 +1,8 @@ - - job_name: foo-prometheus/kubernetes-apiserver-foo/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -117,7 +114,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -183,7 +179,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -251,20 +246,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -322,7 +313,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -408,7 +398,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -494,7 +483,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -571,7 +559,6 @@ namespaces: names: - kube-system - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -649,10 +636,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -723,7 +707,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -783,7 +766,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.foo:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -965,7 +947,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: foo-prometheus/prometheus-foo/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-3-kvmconfig.golden b/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-3-kvmconfig.golden index f323a77a0..c01906fa1 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-3-kvmconfig.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-3-kvmconfig.golden @@ -1,10 +1,8 @@ - - job_name: bar-prometheus/kubernetes-apiserver-bar/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -55,7 +53,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -117,7 +114,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -183,7 +179,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -251,20 +246,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -322,7 +313,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -408,7 +398,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -494,7 +483,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -571,7 +559,6 @@ namespaces: names: - kube-system - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -649,10 +636,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -723,7 +707,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -783,7 +766,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.bar:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -965,7 +947,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: bar-prometheus/prometheus-bar/0 honor_labels: true diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-4-control-plane.golden b/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-4-control-plane.golden index 9abf1d15d..aa81e9c4b 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-4-control-plane.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-4-control-plane.golden @@ -1,10 +1,8 @@ - - job_name: kubernetes-prometheus/kubernetes-apiserver-kubernetes/0 honor_labels: true scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -51,7 +49,6 @@ namespaces: names: - giantswarm - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -104,7 +101,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -159,7 +155,6 @@ scheme: https kubernetes_sd_configs: - role: node - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -218,7 +213,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -279,15 +273,11 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - tls_config: ca_file: /etc/prometheus/secrets/etcd-certificates/ca cert_file: /etc/prometheus/secrets/etcd-certificates/crt @@ -345,7 +335,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -424,7 +413,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -503,7 +491,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -573,7 +560,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -644,10 +630,7 @@ - role: endpoints namespaces: names: - - monitoring - - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -711,7 +694,6 @@ scheme: https kubernetes_sd_configs: - role: pod - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -764,7 +746,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -939,7 +920,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # cert-operator (missing label) (versionned so it needs to be kept) - job_name: kubernetes-prometheus/cert-operator-kubernetes/0 honor_labels: true @@ -1015,7 +995,6 @@ # Add customer label. - target_label: customer replacement: pmo - # installation-specific configs from config repo - job_name: test1 static_configs: @@ -1031,8 +1010,6 @@ relabel_configs: - source_labels: [__address__] target_label: __param_target - - # nginx-ingress-controller - job_name: kubernetes-prometheus/nginx-ingress-controller-kubernetes/0 honor_labels: true @@ -1042,7 +1019,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1096,7 +1072,6 @@ - source_labels: [__name__] regex: nginx_ingress_controller_(bytes_sent_bucket|request_size_bucket|response_duration_seconds_bucket|response_size_bucket|request_duration_seconds_count|connect_duration_seconds_bucket|header_duration_seconds_bucket|bytes_sent_count|request_duration_seconds_sum|bytes_sent_sum|request_size_count|response_size_count|response_duration_seconds_sum|response_duration_seconds_count|ingress_upstream_latency_seconds|ingress_upstream_latency_seconds_sum|ingress_upstream_latency_seconds_count) action: drop - # prometheus - job_name: kubernetes-prometheus/prometheus-kubernetes/0 honor_labels: true @@ -1137,7 +1112,6 @@ namespaces: names: - kube-system - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token tls_config: ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt @@ -1191,4 +1165,3 @@ # Add customer label. - target_label: customer replacement: pmo - diff --git a/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-5-cluster-api-v1alpha3.golden b/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-5-cluster-api-v1alpha3.golden index c6873b0bf..d30812f24 100644 --- a/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-5-cluster-api-v1alpha3.golden +++ b/service/controller/resource/monitoring/scrapeconfigs/test/openstack/case-5-cluster-api-v1alpha3.golden @@ -5,7 +5,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -67,7 +66,6 @@ scheme: https kubernetes_sd_configs: - role: node - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -133,7 +131,6 @@ scheme: https kubernetes_sd_configs: - role: pod - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -201,20 +198,16 @@ honor_labels: true scheme: https kubernetes_sd_configs: - - role: pod namespaces: names: - kube-system - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt key_file: /etc/prometheus/secrets/cluster-certificates/key insecure_skip_verify: false - tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca cert_file: /etc/prometheus/secrets/cluster-certificates/crt @@ -272,7 +265,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -349,7 +341,6 @@ namespaces: names: - kube-system - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -427,10 +418,7 @@ - role: endpoints namespaces: names: - - kube-system - - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -500,7 +488,6 @@ scheme: https kubernetes_sd_configs: - role: endpoints - api_server: https://master.baz:443 tls_config: ca_file: /etc/prometheus/secrets/cluster-certificates/ca @@ -685,7 +672,6 @@ action: replace - action: labeldrop regex: label_giantswarm_io_machine_pool|label_giantswarm_io_machine_deployment - # prometheus - job_name: baz-prometheus/prometheus-baz/0 honor_labels: true