From 2a68b5a8a03a0abc999e57ba177558732e2b2339 Mon Sep 17 00:00:00 2001 From: Kaveesh Dubey Date: Tue, 31 Oct 2023 11:58:14 -0700 Subject: [PATCH] update configs --- .../controlplane_apiserver.yml | 72 ++++++++-------- .../controlplane_cluster_autoscaler.yml | 73 ++++++++-------- .../controlplane_etcd.yml | 65 +++++++------- .../controlplane_kube_controller_manager.yml | 85 +++++++++---------- .../controlplane_kube_scheduler.yml | 85 +++++++++---------- ...controlplane_prometheuscollectorhealth.yml | 16 ++-- .../azure-monitor-metrics-addon/Chart.yaml | 4 +- .../azure-monitor-metrics-addon/values.yaml | 8 +- 8 files changed, 200 insertions(+), 208 deletions(-) diff --git a/otelcollector/configmapparser/default-prom-configs/controlplane_apiserver.yml b/otelcollector/configmapparser/default-prom-configs/controlplane_apiserver.yml index aa92ce62d..fef1b39f3 100644 --- a/otelcollector/configmapparser/default-prom-configs/controlplane_apiserver.yml +++ b/otelcollector/configmapparser/default-prom-configs/controlplane_apiserver.yml @@ -1,36 +1,40 @@ +# scrape_configs: +# - job_name: prometheus_ref_app_apiserver +# scheme: http +# scrape_interval: $$SCRAPE_INTERVAL$$ +# kubernetes_sd_configs: +# - role: pod +# relabel_configs: +# - source_labels: [__meta_kubernetes_pod_label_app] +# action: keep +# regex: "prometheus-reference-app" scrape_configs: - - job_name: prometheus_ref_app_apiserver - scheme: http - scrape_interval: $$SCRAPE_INTERVAL$$ - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: [__meta_kubernetes_pod_label_app] +- job_name: controlplane_apiserver + scrape_interval: $$SCRAPE_INTERVAL$$ + label_limit: 63 + label_name_length_limit: 511 + label_value_length_limit: 1023 + kubernetes_sd_configs: + - role: endpoints + namespaces: + names: + - $$POD_NAMESPACE$$ + scheme: https + tls_config: + ca_file: /etc/kubernetes/secrets/ca.pem + insecure_skip_verify: true + bearer_token_file: /etc/kubernetes/secrets/token + relabel_configs: + - source_labels: + - __meta_kubernetes_pod_label_k8s_app + - __meta_kubernetes_pod_container_name action: keep - regex: "prometheus-reference-app" - # scrape_configs: - # - job_name: controlplane_apiserver - # scrape_interval: $$SCRAPE_INTERVAL$$ - # label_limit: 63 - # label_name_length_limit: 511 - # label_value_length_limit: 1023 - # kubernetes_sd_configs: - # - role: endpoints - # namespaces: - # names: - # - $$POD_NAMESPACE$$ - # scheme: https - # tls_config: - # ca_file: /etc/kubernetes/secrets/ca.pem - # insecure_skip_verify: true - # bearer_token_file: /etc/kubernetes/secrets/token - # relabel_configs: - # - source_labels: - # - __meta_kubernetes_pod_label_k8s_app - # - __meta_kubernetes_pod_container_name - # action: keep - # regex: kube-apiserver;kube-apiserver - # - source_labels: [ __meta_kubernetes_pod_name ] - # regex: (.*) - # target_label: pod - # action: replace \ No newline at end of file + regex: kube-apiserver;kube-apiserver + - source_labels: [ __meta_kubernetes_pod_name ] + regex: (.*) + target_label: instance + action: replace + metric_relabel_configs: + - source_labels: [ __name__ ] + action: drop + regex: (go_.*|process_(cpu|max|resident|virtual|open)_.*) \ No newline at end of file diff --git a/otelcollector/configmapparser/default-prom-configs/controlplane_cluster_autoscaler.yml b/otelcollector/configmapparser/default-prom-configs/controlplane_cluster_autoscaler.yml index 2b270c0a8..88890b933 100644 --- a/otelcollector/configmapparser/default-prom-configs/controlplane_cluster_autoscaler.yml +++ b/otelcollector/configmapparser/default-prom-configs/controlplane_cluster_autoscaler.yml @@ -1,41 +1,38 @@ +# scrape_configs: +# - job_name: prometheus_ref_app_cluster_autoscaler +# scheme: http +# scrape_interval: $$SCRAPE_INTERVAL$$ +# kubernetes_sd_configs: +# - role: pod +# relabel_configs: +# - source_labels: [__meta_kubernetes_pod_label_app] +# action: keep +# regex: "prometheus-reference-app" scrape_configs: - - job_name: prometheus_ref_app_cluster_autoscaler - scheme: http - scrape_interval: $$SCRAPE_INTERVAL$$ - kubernetes_sd_configs: +- job_name: controlplane_cluster_autoscaler + scrape_interval: $$SCRAPE_INTERVAL$$ + follow_redirects: false + kubernetes_sd_configs: - role: pod - relabel_configs: - - source_labels: [__meta_kubernetes_pod_label_app] + namespaces: + names: + - $$POD_NAMESPACE$$ + relabel_configs: + - source_labels: [ __meta_kubernetes_pod_label_app, __meta_kubernetes_pod_container_name ] action: keep - regex: "prometheus-reference-app" - # scrape_configs: - # - job_name: controlplane_cluster_autoscaler - # scrape_interval: $$SCRAPE_INTERVAL$$ - # label_limit: 63 - # label_name_length_limit: 511 - # label_value_length_limit: 1023 - # follow_redirects: false - # kubernetes_sd_configs: - # - role: pod - # namespaces: - # names: - # - $$POD_NAMESPACE$$ - # relabel_configs: - # - source_labels: [ __meta_kubernetes_pod_label_app, __meta_kubernetes_pod_container_name ] - # action: keep - # regex: cluster-autoscaler;cluster-autoscaler - # - source_labels: [ __meta_kubernetes_pod_annotation_aks_prometheus_io_scrape ] - # action: keep - # regex: true - # - source_labels: [ __meta_kubernetes_pod_annotation_aks_prometheus_io_path ] - # action: replace - # target_label: __metrics_path__ - # regex: (.+) - # - source_labels: [ __address__, __meta_kubernetes_pod_annotation_aks_prometheus_io_port ] - # action: replace - # separator: ":" - # target_label: __address__ - # - source_labels: [ __meta_kubernetes_pod_name ] - # regex: (.*) - # target_label: pod - # action: replace \ No newline at end of file + regex: cluster-autoscaler;cluster-autoscaler + - source_labels: [ __meta_kubernetes_pod_annotation_aks_prometheus_io_scrape ] + action: keep + regex: true + - source_labels: [ __meta_kubernetes_pod_annotation_aks_prometheus_io_path ] + action: replace + target_label: __metrics_path__ + regex: (.+) + - source_labels: [ __address__, __meta_kubernetes_pod_annotation_aks_prometheus_io_port ] + action: replace + separator: ":" + target_label: __address__ + - source_labels: [ __meta_kubernetes_pod_name ] + regex: (.*) + target_label: instance + action: replace \ No newline at end of file diff --git a/otelcollector/configmapparser/default-prom-configs/controlplane_etcd.yml b/otelcollector/configmapparser/default-prom-configs/controlplane_etcd.yml index 926f838b5..5124ea59c 100644 --- a/otelcollector/configmapparser/default-prom-configs/controlplane_etcd.yml +++ b/otelcollector/configmapparser/default-prom-configs/controlplane_etcd.yml @@ -1,36 +1,33 @@ +# scrape_configs: +# - job_name: prometheus_ref_app_etcd +# scheme: http +# scrape_interval: $$SCRAPE_INTERVAL$$ +# kubernetes_sd_configs: +# - role: pod +# relabel_configs: +# - source_labels: [__meta_kubernetes_pod_label_app] +# action: keep +# regex: "prometheus-reference-app" scrape_configs: - - job_name: prometheus_ref_app_etcd - scheme: http - scrape_interval: $$SCRAPE_INTERVAL$$ - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: [__meta_kubernetes_pod_label_app] +- job_name: controlplane_etcd + scrape_interval: $$SCRAPE_INTERVAL$$ + follow_redirects: false + scheme: https + kubernetes_sd_configs: + - role: endpoints + namespaces: + names: + - $$POD_NAMESPACE$$ + tls_config: + ca_file: /etc/kubernetes/secrets/etcd-client-ca.crt + cert_file: /etc/kubernetes/secrets/etcd-client.crt + key_file: /etc/kubernetes/secrets/etcd-client.key + insecure_skip_verify: true + relabel_configs: + - source_labels: [ __meta_kubernetes_service_label_app, __meta_kubernetes_pod_container_port_number ] action: keep - regex: "prometheus-reference-app" - # scrape_configs: - # - job_name: controlplane_etcd - # scrape_interval: $$SCRAPE_INTERVAL$$ - # label_limit: 63 - # label_name_length_limit: 511 - # label_value_length_limit: 1023 - # follow_redirects: false - # scheme: https - # kubernetes_sd_configs: - # - role: endpoints - # namespaces: - # names: - # - $$POD_NAMESPACE$$ - # tls_config: - # ca_file: /etc/kubernetes/secrets/etcd-client-ca.crt - # cert_file: /etc/kubernetes/secrets/etcd-client.crt - # key_file: /etc/kubernetes/secrets/etcd-client.key - # insecure_skip_verify: true - # relabel_configs: - # - source_labels: [ __meta_kubernetes_service_label_app, __meta_kubernetes_pod_container_port_number ] - # action: keep - # regex: etcd;2379 - # - source_labels: [ __meta_kubernetes_pod_name ] - # regex: (.*) - # target_label: pod - # action: replace \ No newline at end of file + regex: etcd;2379 + - source_labels: [ __meta_kubernetes_pod_name ] + regex: (.*) + target_label: instance + action: replace \ No newline at end of file diff --git a/otelcollector/configmapparser/default-prom-configs/controlplane_kube_controller_manager.yml b/otelcollector/configmapparser/default-prom-configs/controlplane_kube_controller_manager.yml index 8163dba88..d54823ac3 100644 --- a/otelcollector/configmapparser/default-prom-configs/controlplane_kube_controller_manager.yml +++ b/otelcollector/configmapparser/default-prom-configs/controlplane_kube_controller_manager.yml @@ -1,47 +1,44 @@ +# scrape_configs: +# - job_name: prometheus_ref_app_kube_controller_manager +# scheme: http +# scrape_interval: $$SCRAPE_INTERVAL$$ +# kubernetes_sd_configs: +# - role: pod +# relabel_configs: +# - source_labels: [__meta_kubernetes_pod_label_app] +# action: keep +# regex: "prometheus-reference-app" scrape_configs: - - job_name: prometheus_ref_app_kube_controller_manager - scheme: http - scrape_interval: $$SCRAPE_INTERVAL$$ - kubernetes_sd_configs: +- job_name: controlplane_kube_controller_manager + scrape_interval: $$SCRAPE_INTERVAL$$ + follow_redirects: false + scheme: https + kubernetes_sd_configs: - role: pod - relabel_configs: - - source_labels: [__meta_kubernetes_pod_label_app] + namespaces: + names: + - $$POD_NAMESPACE$$ + tls_config: + ca_file: /etc/kubernetes/secrets/ca.pem + cert_file: /etc/kubernetes/secrets/client.pem + key_file: /etc/kubernetes/secrets/client-key.pem + insecure_skip_verify: true + relabel_configs: + - source_labels: [__meta_kubernetes_pod_label_k8s_app, __meta_kubernetes_pod_container_name] action: keep - regex: "prometheus-reference-app" - # scrape_configs: - # - job_name: controlplane_kube_controller_manager - # scrape_interval: $$SCRAPE_INTERVAL$$ - # label_limit: 63 - # label_name_length_limit: 511 - # label_value_length_limit: 1023 - # follow_redirects: false - # scheme: https - # kubernetes_sd_configs: - # - role: pod - # namespaces: - # names: - # - $$POD_NAMESPACE$$ - # tls_config: - # ca_file: /etc/kubernetes/secrets/ca.pem - # cert_file: /etc/kubernetes/secrets/client.pem - # key_file: /etc/kubernetes/secrets/client-key.pem - # insecure_skip_verify: true - # relabel_configs: - # - source_labels: [__meta_kubernetes_pod_label_k8s_app, __meta_kubernetes_pod_container_name] - # action: keep - # regex: kube-controller-manager;kube-controller-manager - # - source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_scrape] - # action: keep - # regex: true - # - source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_path] - # action: replace - # target_label: __metrics_path__ - # regex: (.+) - # - source_labels: [ __address__, __meta_kubernetes_pod_annotation_aks_prometheus_io_port ] - # action: replace - # separator: ":" - # target_label: __address__ - # - source_labels: [__meta_kubernetes_pod_name] - # regex: (.*) - # target_label: pod - # action: replace \ No newline at end of file + regex: kube-controller-manager;kube-controller-manager + - source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_scrape] + action: keep + regex: true + - source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_path] + action: replace + target_label: __metrics_path__ + regex: (.+) + - source_labels: [ __address__, __meta_kubernetes_pod_annotation_aks_prometheus_io_port ] + action: replace + separator: ":" + target_label: __address__ + - source_labels: [__meta_kubernetes_pod_name] + regex: (.*) + target_label: instance + action: replace \ No newline at end of file diff --git a/otelcollector/configmapparser/default-prom-configs/controlplane_kube_scheduler.yml b/otelcollector/configmapparser/default-prom-configs/controlplane_kube_scheduler.yml index a6cc93b04..91f230d4c 100644 --- a/otelcollector/configmapparser/default-prom-configs/controlplane_kube_scheduler.yml +++ b/otelcollector/configmapparser/default-prom-configs/controlplane_kube_scheduler.yml @@ -1,47 +1,44 @@ +# scrape_configs: +# - job_name: prometheus_ref_app_kube_scheduler +# scheme: http +# scrape_interval: $$SCRAPE_INTERVAL$$ +# kubernetes_sd_configs: +# - role: pod +# relabel_configs: +# - source_labels: [__meta_kubernetes_pod_label_app] +# action: keep +# regex: "prometheus-reference-app" scrape_configs: - - job_name: prometheus_ref_app_kube_scheduler - scheme: http - scrape_interval: $$SCRAPE_INTERVAL$$ - kubernetes_sd_configs: +- job_name: controlplane_kube_scheduler + scrape_interval: $$SCRAPE_INTERVAL$$ + follow_redirects: false + scheme: https + kubernetes_sd_configs: - role: pod - relabel_configs: - - source_labels: [__meta_kubernetes_pod_label_app] + namespaces: + names: + - $$POD_NAMESPACE$$ + tls_config: + ca_file: /etc/kubernetes/secrets/ca.pem + cert_file: /etc/kubernetes/secrets/client.pem + key_file: /etc/kubernetes/secrets/client-key.pem + insecure_skip_verify: true + relabel_configs: + - source_labels: [__meta_kubernetes_pod_label_k8s_app, __meta_kubernetes_pod_container_name] action: keep - regex: "prometheus-reference-app" - # scrape_configs: - # - job_name: controlplane_kube_scheduler - # scrape_interval: $$SCRAPE_INTERVAL$$ - # label_limit: 63 - # label_name_length_limit: 511 - # label_value_length_limit: 1023 - # follow_redirects: false - # scheme: https - # kubernetes_sd_configs: - # - role: pod - # namespaces: - # names: - # - $$POD_NAMESPACE$$ - # tls_config: - # ca_file: /etc/kubernetes/secrets/ca.pem - # cert_file: /etc/kubernetes/secrets/client.pem - # key_file: /etc/kubernetes/secrets/client-key.pem - # insecure_skip_verify: true - # relabel_configs: - # - source_labels: [__meta_kubernetes_pod_label_k8s_app, __meta_kubernetes_pod_container_name] - # action: keep - # regex: kube-scheduler;kube-scheduler - # - source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_scrape] - # action: keep - # regex: true - # - source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_path] - # action: replace - # target_label: __metrics_path__ - # regex: (.+) - # - source_labels: [__address__, __meta_kubernetes_pod_annotation_aks_prometheus_io_port] - # action: replace - # separator: ":" - # target_label: __address__ - # - source_labels: [__meta_kubernetes_pod_name] - # regex: (.*) - # target_label: pod - # action: replace \ No newline at end of file + regex: kube-scheduler;kube-scheduler + - source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_scrape] + action: keep + regex: true + - source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_path] + action: replace + target_label: __metrics_path__ + regex: (.+) + - source_labels: [__address__, __meta_kubernetes_pod_annotation_aks_prometheus_io_port] + action: replace + separator: ":" + target_label: __address__ + - source_labels: [__meta_kubernetes_pod_name] + regex: (.*) + target_label: instance + action: replace \ No newline at end of file diff --git a/otelcollector/configmapparser/default-prom-configs/controlplane_prometheuscollectorhealth.yml b/otelcollector/configmapparser/default-prom-configs/controlplane_prometheuscollectorhealth.yml index d92de3b5f..0a2088474 100644 --- a/otelcollector/configmapparser/default-prom-configs/controlplane_prometheuscollectorhealth.yml +++ b/otelcollector/configmapparser/default-prom-configs/controlplane_prometheuscollectorhealth.yml @@ -1,8 +1,8 @@ - scrape_configs: - - job_name: controlplane_prometheuscollectorhealth - scrape_interval: $$SCRAPE_INTERVAL$$ - label_limit: 63 - label_name_length_limit: 511 - label_value_length_limit: 1023 - static_configs: - - targets: ['127.0.0.1:2234'] \ No newline at end of file +scrape_configs: +- job_name: controlplane_prometheuscollectorhealth + scrape_interval: $$SCRAPE_INTERVAL$$ + label_limit: 63 + label_name_length_limit: 511 + label_value_length_limit: 1023 + static_configs: + - targets: ['127.0.0.1:2234'] \ No newline at end of file diff --git a/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/Chart.yaml b/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/Chart.yaml index 6f448cd6f..9131930a8 100644 --- a/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/Chart.yaml +++ b/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/Chart.yaml @@ -15,13 +15,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 6.8.0-ccp-shell-removal-branch-10-26-2023-1ac81793 +version: 6.8.0-ccp-shell-removal-branch-10-27-2023-aff5591d # This is the version number of the application being deployed (basically, imagetag for the image built/compatible with this chart semver above). This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "6.8.0-ccp-shell-removal-branch-10-26-2023-1ac81793" +appVersion: "6.8.0-ccp-shell-removal-branch-10-27-2023-aff5591d" # dependencies: # - name: prometheus-node-exporter # version: "4.21.0" diff --git a/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/values.yaml b/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/values.yaml index d9121c48f..f2cb63777 100644 --- a/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/values.yaml +++ b/otelcollector/deploy/addon-chart/azure-monitor-metrics-addon/values.yaml @@ -36,10 +36,10 @@ AzureMonitorMetrics: - validatingwebhookconfigurations - volumeattachments ImageRepository: "/azuremonitor/containerinsights/cidev/prometheus-collector/images" - ImageTag: "6.8.0-ccp-shell-removal-branch-10-26-2023-1ac81793" - ImageTagWin: "6.8.0-ccp-shell-removal-branch-10-26-2023-1ac81793-win" - ImageTagTargetAllocator: "6.8.0-ccp-shell-removal-branch-10-26-2023-1ac81793-targetallocator" - ImageTagCfgReader: "6.8.0-ccp-shell-removal-branch-10-26-2023-1ac81793-cfg" + ImageTag: "6.8.0-ccp-shell-removal-branch-10-27-2023-aff5591d" + ImageTagWin: "6.8.0-ccp-shell-removal-branch-10-27-2023-aff5591d-win" + ImageTagTargetAllocator: "6.8.0-ccp-shell-removal-branch-10-27-2023-aff5591d-targetallocator" + ImageTagCfgReader: "6.8.0-ccp-shell-removal-branch-10-27-2023-aff5591d-cfg" TargetAllocatorEnabled: false DeploymentReplicas: 1 # The below 2 settings are not Azure Monitor Metrics adapter chart. They are substituted in a different manner.