about summary refs log tree commit diff
path: root/bundles/prometheus/files/kube.yaml
blob: 165b60d3c05205f2d36e2eeefb4560fceae7057f (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
apiVersion: v1
kind: Pod
metadata:
  name: prometheus
  labels:
    traefik.enable: true
    traefik.http.routers.prometheus.tls: true
    traefik.http.routers.prometheus.tls.certresolver: le
    traefik.http.routers.prometheus.entrypoints: http,https
    traefik.http.routers.prometheus.rule: Host(`prom.gzr.im`)
    traefik.http.routers.prometheus.service: prometheus
    traefik.http.routers.prometheus.middlewares: prometheus-consoles-redirect
    traefik.http.services.prometheus.loadbalancer.server.port: 9090
    traefik.http.middlewares.prometheus-consoles-redirect.redirectregex.regex: ^https://prom.gzr.im/consoles(|/)$
    traefik.http.middlewares.prometheus-consoles-redirect.redirectregex.replacement: https://prom.gzr.im/consoles/index.html
    traefik.http.middlewares.prometheus-consoles-redirect.redirectregex.permanent: true
spec:
  dnsPolicy: Default
  dnsConfig:
    searches:
      - tail2d6ce.ts.net
  securityContext:
    runAsUser: 0
  containers:
  - name: prom
    image: quay.io/prometheus/prometheus:v${prom_version}
    args:
      - --config.file=/etc/prometheus/prometheus.yml
      - --storage.tsdb.path=/prometheus
      - --storage.tsdb.retention.time=30d
      - --storage.tsdb.retention.size=6GB
      - --web.page-title=Prometheus
      - --web.console.templates=/usr/share/prometheus/consoles
      - --web.console.libraries=/usr/share/prometheus/console_libraries
      - --web.user-assets=/usr/share/prometheus/console_assets
    volumeMounts:
    - mountPath: /etc/prometheus
      name: config
      readOnly: true
    - mountPath: /usr/share/prometheus/consoles
      name: config
      subPath: consoles
      readOnly: true
    - mountPath: /usr/share/prometheus/console_libraries
      name: config
      subPath: console_libraries
      readOnly: true
    - mountPath: /usr/share/prometheus/console_assets
      name: config
      subPath: console_assets
      readOnly: true
    - mountPath: /prometheus
      name: prom-data
    ports:
    - containerPort: 9090
      protocol: TCP
    livenessProbe:
      exec:
        command:
        - sh
        - -c
        - wget -qO - http://localhost:9090/-/healthy | grep -q 'is Healthy'
    resources:
      limits:
        cpu: 100m
        memory: 256Mi
      requests:
        cpu: 25m
        memory: 128Mi

  - name: alert
    image: quay.io/prometheus/alertmanager:v${alertmanager_version}
    volumeMounts:
    - mountPath: /etc/alertmanager
      name: config
      readOnly: true
    - mountPath: /alertmanager
      name: alert-data
    ports:
    - containerPort: 9093
      protocol: TCP
    livenessProbe:
      exec:
        command:
        - sh
        - -c
        - wget -qO - http://localhost:9093/-/healthy | grep -q 'OK'
    resources:
      limits:
        cpu: 50m
        memory: 64Mi

  volumes:
  - name: config
    hostPath:
      path: /etc/prometheus
      type: Directory
  - name: prom-data
    hostPath:
      path: /var/lib/prometheus/prom
      type: DirectoryOrCreate
  - name: alert-data
    hostPath:
      path: /var/lib/prometheus/alert
      type: DirectoryOrCreate