58a96cb5582851d83f2d412e347e162fda8906ed
[infra/stack/kubernetes.git] / apps / prometheus / kubespray / playbooks / roles / install / templates / values.yaml.j2
1 {% raw %}
2 rbac:
3   create: true
4
5 podSecurityPolicy:
6   enabled: false
7
8 imagePullSecrets:
9 # - name: "image-pull-secret"
10
11 ## Define serviceAccount names for components. Defaults to component's fully qualified name.
12 ##
13 serviceAccounts:
14   alertmanager:
15     create: true
16     name:
17   kubeStateMetrics:
18     create: true
19     name:
20   nodeExporter:
21     create: true
22     name:
23   pushgateway:
24     create: true
25     name:
26   server:
27     create: true
28     name:
29
30 alertmanager:
31   ## If false, alertmanager will not be installed
32   ##
33   enabled: true
34
35   ## alertmanager container name
36   ##
37   name: alertmanager
38
39   ## alertmanager container image
40   ##
41   image:
42 {% endraw %}
43     repository: {{ dockerio_image_repository }}/prom/alertmanager
44     tag: {{ prom_alertmanager_version }}
45 {% raw %}
46     pullPolicy: IfNotPresent
47
48   ## alertmanager priorityClassName
49   ##
50   priorityClassName: ""
51
52   ## Additional alertmanager container arguments
53   ##
54   extraArgs: {}
55
56   ## The URL prefix at which the container can be accessed. Useful in the case the '-web.external-url' includes a slug
57   ## so that the various internal URLs are still able to access as they are in the default case.
58   ## (Optional)
59   prefixURL: ""
60
61   ## External URL which can access alertmanager
62   baseURL: "http://localhost:9093"
63
64   ## Additional alertmanager container environment variable
65   ## For instance to add a http_proxy
66   ##
67   extraEnv: {}
68
69   ## Additional alertmanager Secret mounts
70   # Defines additional mounts with secrets. Secrets must be manually created in the namespace.
71   extraSecretMounts: []
72     # - name: secret-files
73     #   mountPath: /etc/secrets
74     #   subPath: ""
75     #   secretName: alertmanager-secret-files
76     #   readOnly: true
77
78   ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.alertmanager.configMapOverrideName}}
79   ## Defining configMapOverrideName will cause templates/alertmanager-configmap.yaml
80   ## to NOT generate a ConfigMap resource
81   ##
82   configMapOverrideName: ""
83
84   ## The name of a secret in the same kubernetes namespace which contains the Alertmanager config
85   ## Defining configFromSecret will cause templates/alertmanager-configmap.yaml
86   ## to NOT generate a ConfigMap resource
87   ##
88   configFromSecret: ""
89
90   ## The configuration file name to be loaded to alertmanager
91   ## Must match the key within configuration loaded from ConfigMap/Secret
92   ##
93   configFileName: alertmanager.yml
94
95   ingress:
96     ## If true, alertmanager Ingress will be created
97     ##
98     enabled: false
99
100     ## alertmanager Ingress annotations
101     ##
102     annotations: {}
103     #   kubernetes.io/ingress.class: nginx
104     #   kubernetes.io/tls-acme: 'true'
105
106     ## alertmanager Ingress additional labels
107     ##
108     extraLabels: {}
109
110     ## alertmanager Ingress hostnames with optional path
111     ## Must be provided if Ingress is enabled
112     ##
113     hosts: []
114     #   - alertmanager.domain.com
115     #   - domain.com/alertmanager
116
117     ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
118     extraPaths: []
119     # - path: /*
120     #   backend:
121     #     serviceName: ssl-redirect
122     #     servicePort: use-annotation
123
124     ## alertmanager Ingress TLS configuration
125     ## Secrets must be manually created in the namespace
126     ##
127     tls: []
128     #   - secretName: prometheus-alerts-tls
129     #     hosts:
130     #       - alertmanager.domain.com
131
132   ## Alertmanager Deployment Strategy type
133   # strategy:
134   #   type: Recreate
135
136   ## Node tolerations for alertmanager scheduling to nodes with taints
137   ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
138   ##
139   tolerations: []
140     # - key: "key"
141     #   operator: "Equal|Exists"
142     #   value: "value"
143     #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
144
145   ## Node labels for alertmanager pod assignment
146   ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
147   ##
148   nodeSelector: {}
149
150   ## Pod affinity
151   ##
152   affinity: {}
153
154   ## PodDisruptionBudget settings
155   ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
156   ##
157   podDisruptionBudget:
158     enabled: false
159     maxUnavailable: 1
160
161   ## Use an alternate scheduler, e.g. "stork".
162   ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
163   ##
164   # schedulerName:
165
166   persistentVolume:
167     ## If true, alertmanager will create/use a Persistent Volume Claim
168     ## If false, use emptyDir
169     ##
170     enabled: true
171
172     ## alertmanager data Persistent Volume access modes
173     ## Must match those of existing PV or dynamic provisioner
174     ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
175     ##
176     accessModes:
177       - ReadWriteOnce
178
179     ## alertmanager data Persistent Volume Claim annotations
180     ##
181     annotations: {}
182
183     ## alertmanager data Persistent Volume existing claim name
184     ## Requires alertmanager.persistentVolume.enabled: true
185     ## If defined, PVC must be created manually before volume will be bound
186     existingClaim: ""
187
188     ## alertmanager data Persistent Volume mount root path
189     ##
190     mountPath: /data
191
192     ## alertmanager data Persistent Volume size
193     ##
194     size: 2Gi
195
196     ## alertmanager data Persistent Volume Storage Class
197     ## If defined, storageClassName: <storageClass>
198     ## If set to "-", storageClassName: "", which disables dynamic provisioning
199     ## If undefined (the default) or set to null, no storageClassName spec is
200     ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
201     ##   GKE, AWS & OpenStack)
202     ##
203     # storageClass: "-"
204
205     ## alertmanager data Persistent Volume Binding Mode
206     ## If defined, volumeBindingMode: <volumeBindingMode>
207     ## If undefined (the default) or set to null, no volumeBindingMode spec is
208     ##   set, choosing the default mode.
209     ##
210     # volumeBindingMode: ""
211
212     ## Subdirectory of alertmanager data Persistent Volume to mount
213     ## Useful if the volume's root directory is not empty
214     ##
215     subPath: ""
216
217   ## Annotations to be added to alertmanager pods
218   ##
219   podAnnotations: {}
220     ## Tell prometheus to use a specific set of alertmanager pods
221     ## instead of all alertmanager pods found in the same namespace
222     ## Useful if you deploy multiple releases within the same namespace
223     ##
224     ## prometheus.io/probe: alertmanager-teamA
225
226   ## Labels to be added to Prometheus AlertManager pods
227   ##
228   podLabels: {}
229
230   ## Specify if a Pod Security Policy for node-exporter must be created
231   ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
232   ##
233   podSecurityPolicy:
234     annotations: {}
235       ## Specify pod annotations
236       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
237       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
238       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
239       ##
240       # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
241       # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
242       # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
243
244   ## Use a StatefulSet if replicaCount needs to be greater than 1 (see below)
245   ##
246   replicaCount: 1
247
248   statefulSet:
249     ## If true, use a statefulset instead of a deployment for pod management.
250     ## This allows to scale replicas to more than 1 pod
251     ##
252     enabled: false
253
254     podManagementPolicy: OrderedReady
255
256     ## Alertmanager headless service to use for the statefulset
257     ##
258     headless:
259       annotations: {}
260       labels: {}
261
262       ## Enabling peer mesh service end points for enabling the HA alert manager
263       ## Ref: https://github.com/prometheus/alertmanager/blob/master/README.md
264       # enableMeshPeer : true
265
266       servicePort: 80
267
268   ## alertmanager resource requests and limits
269   ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
270   ##
271   resources: {}
272     # limits:
273     #   cpu: 10m
274     #   memory: 32Mi
275     # requests:
276     #   cpu: 10m
277     #   memory: 32Mi
278
279   ## Security context to be added to alertmanager pods
280   ##
281   securityContext:
282     runAsUser: 65534
283     runAsNonRoot: true
284     runAsGroup: 65534
285     fsGroup: 65534
286
287   service:
288     annotations: {}
289     labels: {}
290     clusterIP: ""
291
292     ## Enabling peer mesh service end points for enabling the HA alert manager
293     ## Ref: https://github.com/prometheus/alertmanager/blob/master/README.md
294     # enableMeshPeer : true
295
296     ## List of IP addresses at which the alertmanager service is available
297     ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
298     ##
299     externalIPs: []
300
301     loadBalancerIP: ""
302     loadBalancerSourceRanges: []
303     servicePort: 80
304     # nodePort: 30000
305     sessionAffinity: None
306     type: ClusterIP
307
308 ## Monitors ConfigMap changes and POSTs to a URL
309 ## Ref: https://github.com/jimmidyson/configmap-reload
310 ##
311 configmapReload:
312   prometheus:
313     ## If false, the configmap-reload container will not be deployed
314     ##
315     enabled: true
316
317     ## configmap-reload container name
318     ##
319     name: configmap-reload
320
321     ## configmap-reload container image
322     ##
323     image:
324 {% endraw %}
325       repository: {{ dockerio_image_repository }}/jimmidyson/configmap-reload
326       tag: {{ configmap_reload_version }}
327 {% raw %}
328       pullPolicy: IfNotPresent
329
330     ## Additional configmap-reload container arguments
331     ##
332     extraArgs: {}
333     ## Additional configmap-reload volume directories
334     ##
335     extraVolumeDirs: []
336
337
338     ## Additional configmap-reload mounts
339     ##
340     extraConfigmapMounts: []
341       # - name: prometheus-alerts
342       #   mountPath: /etc/alerts.d
343       #   subPath: ""
344       #   configMap: prometheus-alerts
345       #   readOnly: true
346
347
348     ## configmap-reload resource requests and limits
349     ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
350     ##
351     resources: {}
352   alertmanager:
353     ## If false, the configmap-reload container will not be deployed
354     ##
355     enabled: true
356
357     ## configmap-reload container name
358     ##
359     name: configmap-reload
360
361     ## configmap-reload container image
362     ##
363     image:
364 {% endraw %}
365       repository: {{ dockerio_image_repository }}/jimmidyson/configmap-reload
366       tag: {{ configmap_reload_version }}
367 {% raw %}
368       pullPolicy: IfNotPresent
369
370     ## Additional configmap-reload container arguments
371     ##
372     extraArgs: {}
373     ## Additional configmap-reload volume directories
374     ##
375     extraVolumeDirs: []
376
377
378     ## Additional configmap-reload mounts
379     ##
380     extraConfigmapMounts: []
381       # - name: prometheus-alerts
382       #   mountPath: /etc/alerts.d
383       #   subPath: ""
384       #   configMap: prometheus-alerts
385       #   readOnly: true
386
387
388     ## configmap-reload resource requests and limits
389     ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
390     ##
391     resources: {}
392
393
394 kubeStateMetrics:
395   ## If false, kube-state-metrics will not be installed
396   ##
397   enabled: true
398
399   ## kube-state-metrics container name
400   ##
401   name: kube-state-metrics
402
403   ## kube-state-metrics container image
404   ##
405   image:
406 {% endraw %}
407     repository: {{ quayio_image_repository }}/coreos/kube-state-metrics
408     tag: {{ kube_state_metrics_version }}
409 {% raw %}
410     pullPolicy: IfNotPresent
411
412   ## kube-state-metrics priorityClassName
413   ##
414   priorityClassName: ""
415
416   ## kube-state-metrics container arguments
417   ##
418   args: {}
419
420   ## Node tolerations for kube-state-metrics scheduling to nodes with taints
421   ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
422   ##
423   tolerations: []
424     # - key: "key"
425     #   operator: "Equal|Exists"
426     #   value: "value"
427     #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
428
429   ## Node labels for kube-state-metrics pod assignment
430   ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
431   ##
432   nodeSelector: {}
433
434   ## Annotations to be added to kube-state-metrics pods
435   ##
436   podAnnotations: {}
437
438   ## Specify if a Pod Security Policy for node-exporter must be created
439   ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
440   ##
441   podSecurityPolicy:
442     annotations: {}
443       ## Specify pod annotations
444       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
445       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
446       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
447       ##
448       # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
449       # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
450       # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
451
452   pod:
453     labels: {}
454
455   replicaCount: 1
456
457   ## PodDisruptionBudget settings
458   ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
459   ##
460   podDisruptionBudget:
461     enabled: false
462     maxUnavailable: 1
463
464   ## kube-state-metrics resource requests and limits
465   ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
466   ##
467   resources: {}
468     # limits:
469     #   cpu: 10m
470     #   memory: 16Mi
471     # requests:
472     #   cpu: 10m
473     #   memory: 16Mi
474
475   ## Security context to be added to kube-state-metrics pods
476   ##
477   securityContext:
478     runAsUser: 65534
479     runAsNonRoot: true
480
481   service:
482     annotations:
483       prometheus.io/scrape: "true"
484     labels: {}
485
486     # Exposed as a headless service:
487     # https://kubernetes.io/docs/concepts/services-networking/service/#headless-services
488     clusterIP: None
489
490     ## List of IP addresses at which the kube-state-metrics service is available
491     ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
492     ##
493     externalIPs: []
494
495     loadBalancerIP: ""
496     loadBalancerSourceRanges: []
497     servicePort: 80
498     # Port for Kubestatemetric self telemetry
499     serviceTelemetryPort: 81
500     type: ClusterIP
501
502 nodeExporter:
503   ## If false, node-exporter will not be installed
504   ##
505   enabled: true
506
507   ## If true, node-exporter pods share the host network namespace
508   ##
509   hostNetwork: true
510
511   ## If true, node-exporter pods share the host PID namespace
512   ##
513   hostPID: true
514
515   ## node-exporter container name
516   ##
517   name: node-exporter
518
519   ## node-exporter container image
520   ##
521   image:
522 {% endraw %}
523     repository: {{ dockerio_image_repository }}/prom/node-exporter
524     tag: {{ prom_node_exporter_version }}
525 {% raw %}
526     pullPolicy: IfNotPresent
527
528   ## Specify if a Pod Security Policy for node-exporter must be created
529   ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
530   ##
531   podSecurityPolicy:
532     annotations: {}
533       ## Specify pod annotations
534       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
535       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
536       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
537       ##
538       # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
539       # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
540       # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
541
542   ## node-exporter priorityClassName
543   ##
544   priorityClassName: ""
545
546   ## Custom Update Strategy
547   ##
548   updateStrategy:
549     type: RollingUpdate
550
551   ## Additional node-exporter container arguments
552   ##
553   extraArgs: {}
554
555   ## Additional node-exporter hostPath mounts
556   ##
557   extraHostPathMounts: []
558     # - name: textfile-dir
559     #   mountPath: /srv/txt_collector
560     #   hostPath: /var/lib/node-exporter
561     #   readOnly: true
562     #   mountPropagation: HostToContainer
563
564   extraConfigmapMounts: []
565     # - name: certs-configmap
566     #   mountPath: /prometheus
567     #   configMap: certs-configmap
568     #   readOnly: true
569
570   ## Node tolerations for node-exporter scheduling to nodes with taints
571   ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
572   ##
573   tolerations: []
574     # - key: "key"
575     #   operator: "Equal|Exists"
576     #   value: "value"
577     #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
578
579   ## Node labels for node-exporter pod assignment
580   ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
581   ##
582   nodeSelector: {}
583
584   ## Annotations to be added to node-exporter pods
585   ##
586   podAnnotations: {}
587
588   ## Labels to be added to node-exporter pods
589   ##
590   pod:
591     labels: {}
592
593   ## PodDisruptionBudget settings
594   ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
595   ##
596   podDisruptionBudget:
597     enabled: false
598     maxUnavailable: 1
599
600   ## node-exporter resource limits & requests
601   ## Ref: https://kubernetes.io/docs/user-guide/compute-resources/
602   ##
603   resources: {}
604     # limits:
605     #   cpu: 200m
606     #   memory: 50Mi
607     # requests:
608     #   cpu: 100m
609     #   memory: 30Mi
610
611   ## Security context to be added to node-exporter pods
612   ##
613   securityContext: {}
614     # runAsUser: 0
615
616   service:
617     annotations:
618       prometheus.io/scrape: "true"
619     labels: {}
620
621     # Exposed as a headless service:
622     # https://kubernetes.io/docs/concepts/services-networking/service/#headless-services
623     clusterIP: None
624
625     ## List of IP addresses at which the node-exporter service is available
626     ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
627     ##
628     externalIPs: []
629
630     hostPort: 9100
631     loadBalancerIP: ""
632     loadBalancerSourceRanges: []
633     servicePort: 9100
634     type: ClusterIP
635
636 server:
637   ## Prometheus server container name
638   ##
639   enabled: true
640   name: server
641   sidecarContainers:
642
643   ## Prometheus server container image
644   ##
645   image:
646 {% endraw %}
647     repository: {{ dockerio_image_repository }}/prom/prometheus
648     tag: {{ prom_prometheus_version }}
649 {% raw %}
650     pullPolicy: IfNotPresent
651
652   ## prometheus server priorityClassName
653   ##
654   priorityClassName: ""
655
656   ## The URL prefix at which the container can be accessed. Useful in the case the '-web.external-url' includes a slug
657   ## so that the various internal URLs are still able to access as they are in the default case.
658   ## (Optional)
659   prefixURL: ""
660
661   ## External URL which can access alertmanager
662   ## Maybe same with Ingress host name
663   baseURL: ""
664
665   ## Additional server container environment variables
666   ##
667   ## You specify this manually like you would a raw deployment manifest.
668   ## This means you can bind in environment variables from secrets.
669   ##
670   ## e.g. static environment variable:
671   ##  - name: DEMO_GREETING
672   ##    value: "Hello from the environment"
673   ##
674   ## e.g. secret environment variable:
675   ## - name: USERNAME
676   ##   valueFrom:
677   ##     secretKeyRef:
678   ##       name: mysecret
679   ##       key: username
680   env: []
681
682   extraFlags:
683     - web.enable-lifecycle
684     ## web.enable-admin-api flag controls access to the administrative HTTP API which includes functionality such as
685     ## deleting time series. This is disabled by default.
686     # - web.enable-admin-api
687     ##
688     ## storage.tsdb.no-lockfile flag controls BD locking
689     # - storage.tsdb.no-lockfile
690     ##
691     ## storage.tsdb.wal-compression flag enables compression of the write-ahead log (WAL)
692     # - storage.tsdb.wal-compression
693
694   ## Path to a configuration file on prometheus server container FS
695   configPath: /etc/config/prometheus.yml
696
697   global:
698     ## How frequently to scrape targets by default
699     ##
700     scrape_interval: 1m
701     ## How long until a scrape request times out
702     ##
703     scrape_timeout: 10s
704     ## How frequently to evaluate rules
705     ##
706     evaluation_interval: 1m
707   ## https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write
708   ##
709   remoteWrite: {}
710   ## https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_read
711   ##
712   remoteRead: {}
713
714   ## Additional Prometheus server container arguments
715   ##
716   extraArgs: {}
717
718   ## Additional InitContainers to initialize the pod
719   ##
720   extraInitContainers: []
721
722   ## Additional Prometheus server Volume mounts
723   ##
724   extraVolumeMounts: []
725
726   ## Additional Prometheus server Volumes
727   ##
728   extraVolumes: []
729
730   ## Additional Prometheus server hostPath mounts
731   ##
732   extraHostPathMounts: []
733     # - name: certs-dir
734     #   mountPath: /etc/kubernetes/certs
735     #   subPath: ""
736     #   hostPath: /etc/kubernetes/certs
737     #   readOnly: true
738
739   extraConfigmapMounts: []
740     # - name: certs-configmap
741     #   mountPath: /prometheus
742     #   subPath: ""
743     #   configMap: certs-configmap
744     #   readOnly: true
745
746   ## Additional Prometheus server Secret mounts
747   # Defines additional mounts with secrets. Secrets must be manually created in the namespace.
748   extraSecretMounts: []
749     # - name: secret-files
750     #   mountPath: /etc/secrets
751     #   subPath: ""
752     #   secretName: prom-secret-files
753     #   readOnly: true
754
755   ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.server.configMapOverrideName}}
756   ## Defining configMapOverrideName will cause templates/server-configmap.yaml
757   ## to NOT generate a ConfigMap resource
758   ##
759   configMapOverrideName: ""
760
761   ingress:
762     ## If true, Prometheus server Ingress will be created
763     ##
764     enabled: false
765
766     ## Prometheus server Ingress annotations
767     ##
768     annotations: {}
769     #   kubernetes.io/ingress.class: nginx
770     #   kubernetes.io/tls-acme: 'true'
771
772     ## Prometheus server Ingress additional labels
773     ##
774     extraLabels: {}
775
776     ## Prometheus server Ingress hostnames with optional path
777     ## Must be provided if Ingress is enabled
778     ##
779     hosts: []
780     #   - prometheus.domain.com
781     #   - domain.com/prometheus
782
783     ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
784     extraPaths: []
785     # - path: /*
786     #   backend:
787     #     serviceName: ssl-redirect
788     #     servicePort: use-annotation
789
790     ## Prometheus server Ingress TLS configuration
791     ## Secrets must be manually created in the namespace
792     ##
793     tls: []
794     #   - secretName: prometheus-server-tls
795     #     hosts:
796     #       - prometheus.domain.com
797
798   ## Server Deployment Strategy type
799   # strategy:
800   #   type: Recreate
801
802   ## Node tolerations for server scheduling to nodes with taints
803   ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
804   ##
805   tolerations: []
806     # - key: "key"
807     #   operator: "Equal|Exists"
808     #   value: "value"
809     #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
810
811   ## Node labels for Prometheus server pod assignment
812   ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
813   ##
814   nodeSelector: {}
815
816   ## Pod affinity
817   ##
818   affinity: {}
819
820   ## PodDisruptionBudget settings
821   ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
822   ##
823   podDisruptionBudget:
824     enabled: false
825     maxUnavailable: 1
826
827   ## Use an alternate scheduler, e.g. "stork".
828   ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
829   ##
830   # schedulerName:
831
832   persistentVolume:
833     ## If true, Prometheus server will create/use a Persistent Volume Claim
834     ## If false, use emptyDir
835     ##
836     enabled: true
837
838     ## Prometheus server data Persistent Volume access modes
839     ## Must match those of existing PV or dynamic provisioner
840     ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
841     ##
842     accessModes:
843       - ReadWriteOnce
844
845     ## Prometheus server data Persistent Volume annotations
846     ##
847     annotations: {}
848
849     ## Prometheus server data Persistent Volume existing claim name
850     ## Requires server.persistentVolume.enabled: true
851     ## If defined, PVC must be created manually before volume will be bound
852     existingClaim: ""
853
854     ## Prometheus server data Persistent Volume mount root path
855     ##
856     mountPath: /data
857
858     ## Prometheus server data Persistent Volume size
859     ##
860     size: 8Gi
861
862     ## Prometheus server data Persistent Volume Storage Class
863     ## If defined, storageClassName: <storageClass>
864     ## If set to "-", storageClassName: "", which disables dynamic provisioning
865     ## If undefined (the default) or set to null, no storageClassName spec is
866     ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
867     ##   GKE, AWS & OpenStack)
868     ##
869     # storageClass: "-"
870
871     ## Prometheus server data Persistent Volume Binding Mode
872     ## If defined, volumeBindingMode: <volumeBindingMode>
873     ## If undefined (the default) or set to null, no volumeBindingMode spec is
874     ##   set, choosing the default mode.
875     ##
876     # volumeBindingMode: ""
877
878     ## Subdirectory of Prometheus server data Persistent Volume to mount
879     ## Useful if the volume's root directory is not empty
880     ##
881     subPath: ""
882
883   emptyDir:
884     sizeLimit: ""
885
886   ## Annotations to be added to Prometheus server pods
887   ##
888   podAnnotations: {}
889     # iam.amazonaws.com/role: prometheus
890
891   ## Labels to be added to Prometheus server pods
892   ##
893   podLabels: {}
894
895   ## Prometheus AlertManager configuration
896   ##
897   alertmanagers: []
898
899   ## Specify if a Pod Security Policy for node-exporter must be created
900   ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
901   ##
902   podSecurityPolicy:
903     annotations: {}
904       ## Specify pod annotations
905       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
906       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
907       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
908       ##
909       # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
910       # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
911       # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
912
913   ## Use a StatefulSet if replicaCount needs to be greater than 1 (see below)
914   ##
915   replicaCount: 1
916
917   statefulSet:
918     ## If true, use a statefulset instead of a deployment for pod management.
919     ## This allows to scale replicas to more than 1 pod
920     ##
921     enabled: false
922
923     annotations: {}
924     labels: {}
925     podManagementPolicy: OrderedReady
926
927     ## Alertmanager headless service to use for the statefulset
928     ##
929     headless:
930       annotations: {}
931       labels: {}
932       servicePort: 80
933
934   ## Prometheus server readiness and liveness probe initial delay and timeout
935   ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
936   ##
937   readinessProbeInitialDelay: 30
938   readinessProbeTimeout: 30
939   readinessProbeFailureThreshold: 3
940   readinessProbeSuccessThreshold: 1
941   livenessProbeInitialDelay: 30
942   livenessProbeTimeout: 30
943   livenessProbeFailureThreshold: 3
944   livenessProbeSuccessThreshold: 1
945
946   ## Prometheus server resource requests and limits
947   ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
948   ##
949   resources: {}
950     # limits:
951     #   cpu: 500m
952     #   memory: 512Mi
953     # requests:
954     #   cpu: 500m
955     #   memory: 512Mi
956
957   ## Vertical Pod Autoscaler config
958   ## Ref: https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler
959   verticalAutoscaler:
960     ## If true a VPA object will be created for the controller (either StatefulSet or Deployemnt, based on above configs)
961     enabled: false
962     # updateMode: "Auto"
963     # containerPolicies:
964     # - containerName: 'prometheus-server'
965
966   ## Security context to be added to server pods
967   ##
968   securityContext:
969     runAsUser: 65534
970     runAsNonRoot: true
971     runAsGroup: 65534
972     fsGroup: 65534
973
974   service:
975     annotations: {}
976     labels: {}
977     clusterIP: ""
978
979     ## List of IP addresses at which the Prometheus server service is available
980     ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
981     ##
982     externalIPs: []
983
984     loadBalancerIP: ""
985     loadBalancerSourceRanges: []
986     servicePort: 80
987     sessionAffinity: None
988     type: ClusterIP
989
990     ## Enable gRPC port on service to allow auto discovery with thanos-querier
991     gRPC:
992       enabled: false
993       servicePort: 10901
994       # nodePort: 10901
995
996     ## If using a statefulSet (statefulSet.enabled=true), configure the
997     ## service to connect to a specific replica to have a consistent view
998     ## of the data.
999     statefulsetReplica:
1000       enabled: false
1001       replica: 0
1002
1003   ## Prometheus server pod termination grace period
1004   ##
1005   terminationGracePeriodSeconds: 300
1006
1007   ## Prometheus data retention period (default if not specified is 15 days)
1008   ##
1009   retention: "15d"
1010
1011 pushgateway:
1012   ## If false, pushgateway will not be installed
1013   ##
1014   enabled: true
1015
1016   ## Use an alternate scheduler, e.g. "stork".
1017   ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
1018   ##
1019   # schedulerName:
1020
1021   ## pushgateway container name
1022   ##
1023   name: pushgateway
1024
1025   ## pushgateway container image
1026   ##
1027   image:
1028 {% endraw %}
1029     repository: {{ dockerio_image_repository }}/prom/pushgateway
1030     tag: {{ prom_push_gateway_version }}
1031 {% raw %}
1032     pullPolicy: IfNotPresent
1033
1034   ## pushgateway priorityClassName
1035   ##
1036   priorityClassName: ""
1037
1038   ## Additional pushgateway container arguments
1039   ##
1040   ## for example: persistence.file: /data/pushgateway.data
1041   extraArgs: {}
1042
1043   ingress:
1044     ## If true, pushgateway Ingress will be created
1045     ##
1046     enabled: false
1047
1048     ## pushgateway Ingress annotations
1049     ##
1050     annotations: {}
1051     #   kubernetes.io/ingress.class: nginx
1052     #   kubernetes.io/tls-acme: 'true'
1053
1054     ## pushgateway Ingress hostnames with optional path
1055     ## Must be provided if Ingress is enabled
1056     ##
1057     hosts: []
1058     #   - pushgateway.domain.com
1059     #   - domain.com/pushgateway
1060
1061     ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
1062     extraPaths: []
1063     # - path: /*
1064     #   backend:
1065     #     serviceName: ssl-redirect
1066     #     servicePort: use-annotation
1067
1068     ## pushgateway Ingress TLS configuration
1069     ## Secrets must be manually created in the namespace
1070     ##
1071     tls: []
1072     #   - secretName: prometheus-alerts-tls
1073     #     hosts:
1074     #       - pushgateway.domain.com
1075
1076   ## Node tolerations for pushgateway scheduling to nodes with taints
1077   ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
1078   ##
1079   tolerations: []
1080     # - key: "key"
1081     #   operator: "Equal|Exists"
1082     #   value: "value"
1083     #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
1084
1085   ## Node labels for pushgateway pod assignment
1086   ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
1087   ##
1088   nodeSelector: {}
1089
1090   ## Annotations to be added to pushgateway pods
1091   ##
1092   podAnnotations: {}
1093
1094   ## Specify if a Pod Security Policy for node-exporter must be created
1095   ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
1096   ##
1097   podSecurityPolicy:
1098     annotations: {}
1099       ## Specify pod annotations
1100       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
1101       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
1102       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
1103       ##
1104       # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
1105       # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
1106       # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
1107
1108   replicaCount: 1
1109
1110   ## PodDisruptionBudget settings
1111   ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
1112   ##
1113   podDisruptionBudget:
1114     enabled: false
1115     maxUnavailable: 1
1116
1117   ## pushgateway resource requests and limits
1118   ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
1119   ##
1120   resources: {}
1121     # limits:
1122     #   cpu: 10m
1123     #   memory: 32Mi
1124     # requests:
1125     #   cpu: 10m
1126     #   memory: 32Mi
1127
1128   ## Security context to be added to push-gateway pods
1129   ##
1130   securityContext:
1131     runAsUser: 65534
1132     runAsNonRoot: true
1133
1134   service:
1135     annotations:
1136       prometheus.io/probe: pushgateway
1137     labels: {}
1138     clusterIP: ""
1139
1140     ## List of IP addresses at which the pushgateway service is available
1141     ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
1142     ##
1143     externalIPs: []
1144
1145     loadBalancerIP: ""
1146     loadBalancerSourceRanges: []
1147     servicePort: 9091
1148     type: ClusterIP
1149
1150   ## pushgateway Deployment Strategy type
1151   # strategy:
1152   #   type: Recreate
1153
1154   persistentVolume:
1155     ## If true, pushgateway will create/use a Persistent Volume Claim
1156     ## If false, use emptyDir
1157     ##
1158     enabled: false
1159
1160     ## pushgateway data Persistent Volume access modes
1161     ## Must match those of existing PV or dynamic provisioner
1162     ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
1163     ##
1164     accessModes:
1165       - ReadWriteOnce
1166
1167     ## pushgateway data Persistent Volume Claim annotations
1168     ##
1169     annotations: {}
1170
1171     ## pushgateway data Persistent Volume existing claim name
1172     ## Requires pushgateway.persistentVolume.enabled: true
1173     ## If defined, PVC must be created manually before volume will be bound
1174     existingClaim: ""
1175
1176     ## pushgateway data Persistent Volume mount root path
1177     ##
1178     mountPath: /data
1179
1180     ## pushgateway data Persistent Volume size
1181     ##
1182     size: 2Gi
1183
1184     ## pushgateway data Persistent Volume Storage Class
1185     ## If defined, storageClassName: <storageClass>
1186     ## If set to "-", storageClassName: "", which disables dynamic provisioning
1187     ## If undefined (the default) or set to null, no storageClassName spec is
1188     ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
1189     ##   GKE, AWS & OpenStack)
1190     ##
1191     # storageClass: "-"
1192
1193     ## pushgateway data Persistent Volume Binding Mode
1194     ## If defined, volumeBindingMode: <volumeBindingMode>
1195     ## If undefined (the default) or set to null, no volumeBindingMode spec is
1196     ##   set, choosing the default mode.
1197     ##
1198     # volumeBindingMode: ""
1199
1200     ## Subdirectory of pushgateway data Persistent Volume to mount
1201     ## Useful if the volume's root directory is not empty
1202     ##
1203     subPath: ""
1204
1205
1206 ## alertmanager ConfigMap entries
1207 ##
1208 alertmanagerFiles:
1209   alertmanager.yml:
1210     global: {}
1211       # slack_api_url: ''
1212
1213     receivers:
1214       - name: default-receiver
1215         # slack_configs:
1216         #  - channel: '@you'
1217         #    send_resolved: true
1218
1219     route:
1220       group_wait: 10s
1221       group_interval: 5m
1222       receiver: default-receiver
1223       repeat_interval: 3h
1224
1225 ## Prometheus server ConfigMap entries
1226 ##
1227 serverFiles:
1228
1229   ## Alerts configuration
1230   ## Ref: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
1231   alerting_rules.yml: {}
1232   # groups:
1233   #   - name: Instances
1234   #     rules:
1235   #       - alert: InstanceDown
1236   #         expr: up == 0
1237   #         for: 5m
1238   #         labels:
1239   #           severity: page
1240   #         annotations:
1241   #           description: '{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes.'
1242   #           summary: 'Instance {{ $labels.instance }} down'
1243   ## DEPRECATED DEFAULT VALUE, unless explicitly naming your files, please use alerting_rules.yml
1244   alerts: {}
1245
1246   ## Records configuration
1247   ## Ref: https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/
1248   recording_rules.yml: {}
1249   ## DEPRECATED DEFAULT VALUE, unless explicitly naming your files, please use recording_rules.yml
1250   rules: {}
1251
1252   prometheus.yml:
1253     rule_files:
1254       - /etc/config/recording_rules.yml
1255       - /etc/config/alerting_rules.yml
1256     ## Below two files are DEPRECATED will be removed from this default values file
1257       - /etc/config/rules
1258       - /etc/config/alerts
1259
1260     scrape_configs:
1261       - job_name: prometheus
1262         static_configs:
1263           - targets:
1264             - localhost:9090
1265
1266       # A scrape configuration for running Prometheus on a Kubernetes cluster.
1267       # This uses separate scrape configs for cluster components (i.e. API server, node)
1268       # and services to allow each to use different authentication configs.
1269       #
1270       # Kubernetes labels will be added as Prometheus labels on metrics via the
1271       # `labelmap` relabeling action.
1272
1273       # Scrape config for API servers.
1274       #
1275       # Kubernetes exposes API servers as endpoints to the default/kubernetes
1276       # service so this uses `endpoints` role and uses relabelling to only keep
1277       # the endpoints associated with the default/kubernetes service using the
1278       # default named port `https`. This works for single API server deployments as
1279       # well as HA API server deployments.
1280       - job_name: 'kubernetes-apiservers'
1281
1282         kubernetes_sd_configs:
1283           - role: endpoints
1284
1285         # Default to scraping over https. If required, just disable this or change to
1286         # `http`.
1287         scheme: https
1288
1289         # This TLS & bearer token file config is used to connect to the actual scrape
1290         # endpoints for cluster components. This is separate to discovery auth
1291         # configuration because discovery & scraping are two separate concerns in
1292         # Prometheus. The discovery auth config is automatic if Prometheus runs inside
1293         # the cluster. Otherwise, more config options have to be provided within the
1294         # <kubernetes_sd_config>.
1295         tls_config:
1296           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
1297           # If your node certificates are self-signed or use a different CA to the
1298           # master CA, then disable certificate verification below. Note that
1299           # certificate verification is an integral part of a secure infrastructure
1300           # so this should only be disabled in a controlled environment. You can
1301           # disable certificate verification by uncommenting the line below.
1302           #
1303           insecure_skip_verify: true
1304         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
1305
1306         # Keep only the default/kubernetes service endpoints for the https port. This
1307         # will add targets for each API server which Kubernetes adds an endpoint to
1308         # the default/kubernetes service.
1309         relabel_configs:
1310           - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
1311             action: keep
1312             regex: default;kubernetes;https
1313
1314       - job_name: 'kubernetes-nodes'
1315
1316         # Default to scraping over https. If required, just disable this or change to
1317         # `http`.
1318         scheme: https
1319
1320         # This TLS & bearer token file config is used to connect to the actual scrape
1321         # endpoints for cluster components. This is separate to discovery auth
1322         # configuration because discovery & scraping are two separate concerns in
1323         # Prometheus. The discovery auth config is automatic if Prometheus runs inside
1324         # the cluster. Otherwise, more config options have to be provided within the
1325         # <kubernetes_sd_config>.
1326         tls_config:
1327           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
1328           # If your node certificates are self-signed or use a different CA to the
1329           # master CA, then disable certificate verification below. Note that
1330           # certificate verification is an integral part of a secure infrastructure
1331           # so this should only be disabled in a controlled environment. You can
1332           # disable certificate verification by uncommenting the line below.
1333           #
1334           insecure_skip_verify: true
1335         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
1336
1337         kubernetes_sd_configs:
1338           - role: node
1339
1340         relabel_configs:
1341           - action: labelmap
1342             regex: __meta_kubernetes_node_label_(.+)
1343           - target_label: __address__
1344             replacement: kubernetes.default.svc:443
1345           - source_labels: [__meta_kubernetes_node_name]
1346             regex: (.+)
1347             target_label: __metrics_path__
1348             replacement: /api/v1/nodes/$1/proxy/metrics
1349
1350
1351       - job_name: 'kubernetes-nodes-cadvisor'
1352
1353         # Default to scraping over https. If required, just disable this or change to
1354         # `http`.
1355         scheme: https
1356
1357         # This TLS & bearer token file config is used to connect to the actual scrape
1358         # endpoints for cluster components. This is separate to discovery auth
1359         # configuration because discovery & scraping are two separate concerns in
1360         # Prometheus. The discovery auth config is automatic if Prometheus runs inside
1361         # the cluster. Otherwise, more config options have to be provided within the
1362         # <kubernetes_sd_config>.
1363         tls_config:
1364           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
1365           # If your node certificates are self-signed or use a different CA to the
1366           # master CA, then disable certificate verification below. Note that
1367           # certificate verification is an integral part of a secure infrastructure
1368           # so this should only be disabled in a controlled environment. You can
1369           # disable certificate verification by uncommenting the line below.
1370           #
1371           insecure_skip_verify: true
1372         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
1373
1374         kubernetes_sd_configs:
1375           - role: node
1376
1377         # This configuration will work only on kubelet 1.7.3+
1378         # As the scrape endpoints for cAdvisor have changed
1379         # if you are using older version you need to change the replacement to
1380         # replacement: /api/v1/nodes/$1:4194/proxy/metrics
1381         # more info here https://github.com/coreos/prometheus-operator/issues/633
1382         relabel_configs:
1383           - action: labelmap
1384             regex: __meta_kubernetes_node_label_(.+)
1385           - target_label: __address__
1386             replacement: kubernetes.default.svc:443
1387           - source_labels: [__meta_kubernetes_node_name]
1388             regex: (.+)
1389             target_label: __metrics_path__
1390             replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
1391
1392       # Scrape config for service endpoints.
1393       #
1394       # The relabeling allows the actual service scrape endpoint to be configured
1395       # via the following annotations:
1396       #
1397       # * `prometheus.io/scrape`: Only scrape services that have a value of `true`
1398       # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
1399       # to set this to `https` & most likely set the `tls_config` of the scrape config.
1400       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1401       # * `prometheus.io/port`: If the metrics are exposed on a different port to the
1402       # service then set this appropriately.
1403       - job_name: 'kubernetes-service-endpoints'
1404
1405         kubernetes_sd_configs:
1406           - role: endpoints
1407
1408         relabel_configs:
1409           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
1410             action: keep
1411             regex: true
1412           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
1413             action: replace
1414             target_label: __scheme__
1415             regex: (https?)
1416           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
1417             action: replace
1418             target_label: __metrics_path__
1419             regex: (.+)
1420           - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
1421             action: replace
1422             target_label: __address__
1423             regex: ([^:]+)(?::\d+)?;(\d+)
1424             replacement: $1:$2
1425           - action: labelmap
1426             regex: __meta_kubernetes_service_label_(.+)
1427           - source_labels: [__meta_kubernetes_namespace]
1428             action: replace
1429             target_label: kubernetes_namespace
1430           - source_labels: [__meta_kubernetes_service_name]
1431             action: replace
1432             target_label: kubernetes_name
1433           - source_labels: [__meta_kubernetes_pod_node_name]
1434             action: replace
1435             target_label: kubernetes_node
1436
1437       # Scrape config for slow service endpoints; same as above, but with a larger
1438       # timeout and a larger interval
1439       #
1440       # The relabeling allows the actual service scrape endpoint to be configured
1441       # via the following annotations:
1442       #
1443       # * `prometheus.io/scrape-slow`: Only scrape services that have a value of `true`
1444       # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
1445       # to set this to `https` & most likely set the `tls_config` of the scrape config.
1446       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1447       # * `prometheus.io/port`: If the metrics are exposed on a different port to the
1448       # service then set this appropriately.
1449       - job_name: 'kubernetes-service-endpoints-slow'
1450
1451         scrape_interval: 5m
1452         scrape_timeout: 30s
1453
1454         kubernetes_sd_configs:
1455           - role: endpoints
1456
1457         relabel_configs:
1458           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape_slow]
1459             action: keep
1460             regex: true
1461           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
1462             action: replace
1463             target_label: __scheme__
1464             regex: (https?)
1465           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
1466             action: replace
1467             target_label: __metrics_path__
1468             regex: (.+)
1469           - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
1470             action: replace
1471             target_label: __address__
1472             regex: ([^:]+)(?::\d+)?;(\d+)
1473             replacement: $1:$2
1474           - action: labelmap
1475             regex: __meta_kubernetes_service_label_(.+)
1476           - source_labels: [__meta_kubernetes_namespace]
1477             action: replace
1478             target_label: kubernetes_namespace
1479           - source_labels: [__meta_kubernetes_service_name]
1480             action: replace
1481             target_label: kubernetes_name
1482           - source_labels: [__meta_kubernetes_pod_node_name]
1483             action: replace
1484             target_label: kubernetes_node
1485
1486       - job_name: 'prometheus-pushgateway'
1487         honor_labels: true
1488
1489         kubernetes_sd_configs:
1490           - role: service
1491
1492         relabel_configs:
1493           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
1494             action: keep
1495             regex: pushgateway
1496
1497       # Example scrape config for probing services via the Blackbox Exporter.
1498       #
1499       # The relabeling allows the actual service scrape endpoint to be configured
1500       # via the following annotations:
1501       #
1502       # * `prometheus.io/probe`: Only probe services that have a value of `true`
1503       - job_name: 'kubernetes-services'
1504
1505         metrics_path: /probe
1506         params:
1507           module: [http_2xx]
1508
1509         kubernetes_sd_configs:
1510           - role: service
1511
1512         relabel_configs:
1513           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
1514             action: keep
1515             regex: true
1516           - source_labels: [__address__]
1517             target_label: __param_target
1518           - target_label: __address__
1519             replacement: blackbox
1520           - source_labels: [__param_target]
1521             target_label: instance
1522           - action: labelmap
1523             regex: __meta_kubernetes_service_label_(.+)
1524           - source_labels: [__meta_kubernetes_namespace]
1525             target_label: kubernetes_namespace
1526           - source_labels: [__meta_kubernetes_service_name]
1527             target_label: kubernetes_name
1528
1529       # Example scrape config for pods
1530       #
1531       # The relabeling allows the actual pod scrape endpoint to be configured via the
1532       # following annotations:
1533       #
1534       # * `prometheus.io/scrape`: Only scrape pods that have a value of `true`
1535       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1536       # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
1537       - job_name: 'kubernetes-pods'
1538
1539         kubernetes_sd_configs:
1540           - role: pod
1541
1542         relabel_configs:
1543           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
1544             action: keep
1545             regex: true
1546           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
1547             action: replace
1548             target_label: __metrics_path__
1549             regex: (.+)
1550           - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
1551             action: replace
1552             regex: ([^:]+)(?::\d+)?;(\d+)
1553             replacement: $1:$2
1554             target_label: __address__
1555           - action: labelmap
1556             regex: __meta_kubernetes_pod_label_(.+)
1557           - source_labels: [__meta_kubernetes_namespace]
1558             action: replace
1559             target_label: kubernetes_namespace
1560           - source_labels: [__meta_kubernetes_pod_name]
1561             action: replace
1562             target_label: kubernetes_pod_name
1563
1564       # Example Scrape config for pods which should be scraped slower. An useful example
1565       # would be stackriver-exporter which querys an API on every scrape of the pod
1566       #
1567       # The relabeling allows the actual pod scrape endpoint to be configured via the
1568       # following annotations:
1569       #
1570       # * `prometheus.io/scrape-slow`: Only scrape pods that have a value of `true`
1571       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1572       # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
1573       - job_name: 'kubernetes-pods-slow'
1574
1575         scrape_interval: 5m
1576         scrape_timeout: 30s
1577
1578         kubernetes_sd_configs:
1579           - role: pod
1580
1581         relabel_configs:
1582           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow]
1583             action: keep
1584             regex: true
1585           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
1586             action: replace
1587             target_label: __metrics_path__
1588             regex: (.+)
1589           - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
1590             action: replace
1591             regex: ([^:]+)(?::\d+)?;(\d+)
1592             replacement: $1:$2
1593             target_label: __address__
1594           - action: labelmap
1595             regex: __meta_kubernetes_pod_label_(.+)
1596           - source_labels: [__meta_kubernetes_namespace]
1597             action: replace
1598             target_label: kubernetes_namespace
1599           - source_labels: [__meta_kubernetes_pod_name]
1600             action: replace
1601             target_label: kubernetes_pod_name
1602
1603 # adds additional scrape configs to prometheus.yml
1604 # must be a string so you have to add a | after extraScrapeConfigs:
1605 # example adds prometheus-blackbox-exporter scrape config
1606 extraScrapeConfigs:
1607   # - job_name: 'prometheus-blackbox-exporter'
1608   #   metrics_path: /probe
1609   #   params:
1610   #     module: [http_2xx]
1611   #   static_configs:
1612   #     - targets:
1613   #       - https://example.com
1614   #   relabel_configs:
1615   #     - source_labels: [__address__]
1616   #       target_label: __param_target
1617   #     - source_labels: [__param_target]
1618   #       target_label: instance
1619   #     - target_label: __address__
1620   #       replacement: prometheus-blackbox-exporter:9115
1621
1622 # Adds option to add alert_relabel_configs to avoid duplicate alerts in alertmanager
1623 # useful in H/A prometheus with different external labels but the same alerts
1624 alertRelabelConfigs:
1625   # alert_relabel_configs:
1626   # - source_labels: [dc]
1627   #   regex: (.+)\d+
1628   #   target_label: dc
1629
1630 networkPolicy:
1631   ## Enable creation of NetworkPolicy resources.
1632   ##
1633   enabled: false
1634 {% endraw %}