summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/exporter/standalone-kubelet/tasks/main.yml
blob: 3335769aa6a30c81293610653264f2a687225373 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
- name: register exporter
  copy:
    content: |
      location = /standalone-kubelet {
          proxy_pass https://{{ kubernetes_standalone_address | default('127.0.0.1') }}:{{ kubernetes_standalone_port | default(10250) }}/metrics;
          proxy_ssl_verify on;
          proxy_ssl_trusted_certificate /etc/ssl/standalone-kubelet/ca-crt.pem;
          proxy_ssl_certificate /etc/ssl/standalone-kubelet/client/crt.pem;
          proxy_ssl_certificate_key /etc/ssl/standalone-kubelet/client/key.pem;
      }
      location = /standalone-kubelet/resource {
          proxy_pass https://{{ kubernetes_standalone_address | default('127.0.0.1') }}:{{ kubernetes_standalone_port | default(10250) }}/metrics/resource;
          proxy_ssl_verify on;
          proxy_ssl_trusted_certificate /etc/ssl/standalone-kubelet/ca-crt.pem;
          proxy_ssl_certificate /etc/ssl/standalone-kubelet/client/crt.pem;
          proxy_ssl_certificate_key /etc/ssl/standalone-kubelet/client/key.pem;
      }
      location = /standalone-kubelet/probes {
          proxy_pass https://{{ kubernetes_standalone_address | default('127.0.0.1') }}:{{ kubernetes_standalone_port | default(10250) }}/metrics/probes;
          proxy_ssl_verify on;
          proxy_ssl_trusted_certificate /etc/ssl/standalone-kubelet/ca-crt.pem;
          proxy_ssl_certificate /etc/ssl/standalone-kubelet/client/crt.pem;
          proxy_ssl_certificate_key /etc/ssl/standalone-kubelet/client/key.pem;
      }
    dest: /etc/prometheus/exporter/standalone-kubelet.locations
  notify: reload nginx