Update rook-ceph kubernetes deployment for k8s 1.15
[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     - effect: NoExecute
575       operator: Exists
576     # - key: "key"
577     #   operator: "Equal|Exists"
578     #   value: "value"
579     #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
580
581   ## Node labels for node-exporter pod assignment
582   ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
583   ##
584   nodeSelector: {}
585
586   ## Annotations to be added to node-exporter pods
587   ##
588   podAnnotations: {}
589
590   ## Labels to be added to node-exporter pods
591   ##
592   pod:
593     labels: {}
594
595   ## PodDisruptionBudget settings
596   ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
597   ##
598   podDisruptionBudget:
599     enabled: false
600     maxUnavailable: 1
601
602   ## node-exporter resource limits & requests
603   ## Ref: https://kubernetes.io/docs/user-guide/compute-resources/
604   ##
605   resources: {}
606     # limits:
607     #   cpu: 200m
608     #   memory: 50Mi
609     # requests:
610     #   cpu: 100m
611     #   memory: 30Mi
612
613   ## Security context to be added to node-exporter pods
614   ##
615   securityContext: {}
616     # runAsUser: 0
617
618   service:
619     annotations:
620       prometheus.io/scrape: "true"
621     labels: {}
622
623     # Exposed as a headless service:
624     # https://kubernetes.io/docs/concepts/services-networking/service/#headless-services
625     clusterIP: None
626
627     ## List of IP addresses at which the node-exporter service is available
628     ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
629     ##
630     externalIPs: []
631
632     hostPort: 9100
633     loadBalancerIP: ""
634     loadBalancerSourceRanges: []
635     servicePort: 9100
636     type: ClusterIP
637
638 server:
639   ## Prometheus server container name
640   ##
641   enabled: true
642   name: server
643   sidecarContainers:
644
645   ## Prometheus server container image
646   ##
647   image:
648 {% endraw %}
649     repository: {{ dockerio_image_repository }}/prom/prometheus
650     tag: {{ prom_prometheus_version }}
651 {% raw %}
652     pullPolicy: IfNotPresent
653
654   ## prometheus server priorityClassName
655   ##
656   priorityClassName: ""
657
658   ## The URL prefix at which the container can be accessed. Useful in the case the '-web.external-url' includes a slug
659   ## so that the various internal URLs are still able to access as they are in the default case.
660   ## (Optional)
661   prefixURL: ""
662
663   ## External URL which can access alertmanager
664   ## Maybe same with Ingress host name
665   baseURL: ""
666
667   ## Additional server container environment variables
668   ##
669   ## You specify this manually like you would a raw deployment manifest.
670   ## This means you can bind in environment variables from secrets.
671   ##
672   ## e.g. static environment variable:
673   ##  - name: DEMO_GREETING
674   ##    value: "Hello from the environment"
675   ##
676   ## e.g. secret environment variable:
677   ## - name: USERNAME
678   ##   valueFrom:
679   ##     secretKeyRef:
680   ##       name: mysecret
681   ##       key: username
682   env: []
683
684   extraFlags:
685     - web.enable-lifecycle
686     ## web.enable-admin-api flag controls access to the administrative HTTP API which includes functionality such as
687     ## deleting time series. This is disabled by default.
688     # - web.enable-admin-api
689     ##
690     ## storage.tsdb.no-lockfile flag controls BD locking
691     # - storage.tsdb.no-lockfile
692     ##
693     ## storage.tsdb.wal-compression flag enables compression of the write-ahead log (WAL)
694     # - storage.tsdb.wal-compression
695
696   ## Path to a configuration file on prometheus server container FS
697   configPath: /etc/config/prometheus.yml
698
699   global:
700     ## How frequently to scrape targets by default
701     ##
702     scrape_interval: 1m
703     ## How long until a scrape request times out
704     ##
705     scrape_timeout: 10s
706     ## How frequently to evaluate rules
707     ##
708     evaluation_interval: 1m
709   ## https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write
710   ##
711   remoteWrite: {}
712   ## https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_read
713   ##
714   remoteRead: {}
715
716   ## Additional Prometheus server container arguments
717   ##
718   extraArgs: {}
719
720   ## Additional InitContainers to initialize the pod
721   ##
722   extraInitContainers: []
723
724   ## Additional Prometheus server Volume mounts
725   ##
726   extraVolumeMounts: []
727
728   ## Additional Prometheus server Volumes
729   ##
730   extraVolumes: []
731
732   ## Additional Prometheus server hostPath mounts
733   ##
734   extraHostPathMounts: []
735     # - name: certs-dir
736     #   mountPath: /etc/kubernetes/certs
737     #   subPath: ""
738     #   hostPath: /etc/kubernetes/certs
739     #   readOnly: true
740
741   extraConfigmapMounts: []
742     # - name: certs-configmap
743     #   mountPath: /prometheus
744     #   subPath: ""
745     #   configMap: certs-configmap
746     #   readOnly: true
747
748   ## Additional Prometheus server Secret mounts
749   # Defines additional mounts with secrets. Secrets must be manually created in the namespace.
750   extraSecretMounts: []
751     # - name: secret-files
752     #   mountPath: /etc/secrets
753     #   subPath: ""
754     #   secretName: prom-secret-files
755     #   readOnly: true
756
757   ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.server.configMapOverrideName}}
758   ## Defining configMapOverrideName will cause templates/server-configmap.yaml
759   ## to NOT generate a ConfigMap resource
760   ##
761   configMapOverrideName: ""
762
763   ingress:
764     ## If true, Prometheus server Ingress will be created
765     ##
766     enabled: false
767
768     ## Prometheus server Ingress annotations
769     ##
770     annotations: {}
771     #   kubernetes.io/ingress.class: nginx
772     #   kubernetes.io/tls-acme: 'true'
773
774     ## Prometheus server Ingress additional labels
775     ##
776     extraLabels: {}
777
778     ## Prometheus server Ingress hostnames with optional path
779     ## Must be provided if Ingress is enabled
780     ##
781     hosts: []
782     #   - prometheus.domain.com
783     #   - domain.com/prometheus
784
785     ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
786     extraPaths: []
787     # - path: /*
788     #   backend:
789     #     serviceName: ssl-redirect
790     #     servicePort: use-annotation
791
792     ## Prometheus server Ingress TLS configuration
793     ## Secrets must be manually created in the namespace
794     ##
795     tls: []
796     #   - secretName: prometheus-server-tls
797     #     hosts:
798     #       - prometheus.domain.com
799
800   ## Server Deployment Strategy type
801   # strategy:
802   #   type: Recreate
803
804   ## Node tolerations for server scheduling to nodes with taints
805   ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
806   ##
807   tolerations: []
808     # - key: "key"
809     #   operator: "Equal|Exists"
810     #   value: "value"
811     #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
812
813   ## Node labels for Prometheus server pod assignment
814   ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
815   ##
816   nodeSelector: {}
817
818   ## Pod affinity
819   ##
820   affinity: {}
821
822   ## PodDisruptionBudget settings
823   ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
824   ##
825   podDisruptionBudget:
826     enabled: false
827     maxUnavailable: 1
828
829   ## Use an alternate scheduler, e.g. "stork".
830   ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
831   ##
832   # schedulerName:
833
834   persistentVolume:
835     ## If true, Prometheus server will create/use a Persistent Volume Claim
836     ## If false, use emptyDir
837     ##
838     enabled: true
839
840     ## Prometheus server data Persistent Volume access modes
841     ## Must match those of existing PV or dynamic provisioner
842     ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
843     ##
844     accessModes:
845       - ReadWriteOnce
846
847     ## Prometheus server data Persistent Volume annotations
848     ##
849     annotations: {}
850
851     ## Prometheus server data Persistent Volume existing claim name
852     ## Requires server.persistentVolume.enabled: true
853     ## If defined, PVC must be created manually before volume will be bound
854     existingClaim: ""
855
856     ## Prometheus server data Persistent Volume mount root path
857     ##
858     mountPath: /data
859
860     ## Prometheus server data Persistent Volume size
861     ##
862     size: 8Gi
863
864     ## Prometheus server data Persistent Volume Storage Class
865     ## If defined, storageClassName: <storageClass>
866     ## If set to "-", storageClassName: "", which disables dynamic provisioning
867     ## If undefined (the default) or set to null, no storageClassName spec is
868     ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
869     ##   GKE, AWS & OpenStack)
870     ##
871     # storageClass: "-"
872
873     ## Prometheus server data Persistent Volume Binding Mode
874     ## If defined, volumeBindingMode: <volumeBindingMode>
875     ## If undefined (the default) or set to null, no volumeBindingMode spec is
876     ##   set, choosing the default mode.
877     ##
878     # volumeBindingMode: ""
879
880     ## Subdirectory of Prometheus server data Persistent Volume to mount
881     ## Useful if the volume's root directory is not empty
882     ##
883     subPath: ""
884
885   emptyDir:
886     sizeLimit: ""
887
888   ## Annotations to be added to Prometheus server pods
889   ##
890   podAnnotations: {}
891     # iam.amazonaws.com/role: prometheus
892
893   ## Labels to be added to Prometheus server pods
894   ##
895   podLabels: {}
896
897   ## Prometheus AlertManager configuration
898   ##
899   alertmanagers: []
900
901   ## Specify if a Pod Security Policy for node-exporter must be created
902   ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
903   ##
904   podSecurityPolicy:
905     annotations: {}
906       ## Specify pod annotations
907       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
908       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
909       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
910       ##
911       # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
912       # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
913       # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
914
915   ## Use a StatefulSet if replicaCount needs to be greater than 1 (see below)
916   ##
917   replicaCount: 1
918
919   statefulSet:
920     ## If true, use a statefulset instead of a deployment for pod management.
921     ## This allows to scale replicas to more than 1 pod
922     ##
923     enabled: false
924
925     annotations: {}
926     labels: {}
927     podManagementPolicy: OrderedReady
928
929     ## Alertmanager headless service to use for the statefulset
930     ##
931     headless:
932       annotations: {}
933       labels: {}
934       servicePort: 80
935
936   ## Prometheus server readiness and liveness probe initial delay and timeout
937   ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
938   ##
939   readinessProbeInitialDelay: 30
940   readinessProbeTimeout: 30
941   readinessProbeFailureThreshold: 3
942   readinessProbeSuccessThreshold: 1
943   livenessProbeInitialDelay: 30
944   livenessProbeTimeout: 30
945   livenessProbeFailureThreshold: 3
946   livenessProbeSuccessThreshold: 1
947
948   ## Prometheus server resource requests and limits
949   ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
950   ##
951   resources: {}
952     # limits:
953     #   cpu: 500m
954     #   memory: 512Mi
955     # requests:
956     #   cpu: 500m
957     #   memory: 512Mi
958
959   ## Vertical Pod Autoscaler config
960   ## Ref: https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler
961   verticalAutoscaler:
962     ## If true a VPA object will be created for the controller (either StatefulSet or Deployemnt, based on above configs)
963     enabled: false
964     # updateMode: "Auto"
965     # containerPolicies:
966     # - containerName: 'prometheus-server'
967
968   ## Security context to be added to server pods
969   ##
970   securityContext:
971     runAsUser: 65534
972     runAsNonRoot: true
973     runAsGroup: 65534
974     fsGroup: 65534
975
976   service:
977     annotations: {}
978     labels: {}
979     clusterIP: ""
980
981     ## List of IP addresses at which the Prometheus server service is available
982     ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
983     ##
984     externalIPs: []
985
986     loadBalancerIP: ""
987     loadBalancerSourceRanges: []
988     servicePort: 80
989     sessionAffinity: None
990     type: ClusterIP
991
992     ## Enable gRPC port on service to allow auto discovery with thanos-querier
993     gRPC:
994       enabled: false
995       servicePort: 10901
996       # nodePort: 10901
997
998     ## If using a statefulSet (statefulSet.enabled=true), configure the
999     ## service to connect to a specific replica to have a consistent view
1000     ## of the data.
1001     statefulsetReplica:
1002       enabled: false
1003       replica: 0
1004
1005   ## Prometheus server pod termination grace period
1006   ##
1007   terminationGracePeriodSeconds: 300
1008
1009   ## Prometheus data retention period (default if not specified is 15 days)
1010   ##
1011   retention: "15d"
1012
1013 pushgateway:
1014   ## If false, pushgateway will not be installed
1015   ##
1016   enabled: true
1017
1018   ## Use an alternate scheduler, e.g. "stork".
1019   ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
1020   ##
1021   # schedulerName:
1022
1023   ## pushgateway container name
1024   ##
1025   name: pushgateway
1026
1027   ## pushgateway container image
1028   ##
1029   image:
1030 {% endraw %}
1031     repository: {{ dockerio_image_repository }}/prom/pushgateway
1032     tag: {{ prom_push_gateway_version }}
1033 {% raw %}
1034     pullPolicy: IfNotPresent
1035
1036   ## pushgateway priorityClassName
1037   ##
1038   priorityClassName: ""
1039
1040   ## Additional pushgateway container arguments
1041   ##
1042   ## for example: persistence.file: /data/pushgateway.data
1043   extraArgs: {}
1044
1045   ingress:
1046     ## If true, pushgateway Ingress will be created
1047     ##
1048     enabled: false
1049
1050     ## pushgateway Ingress annotations
1051     ##
1052     annotations: {}
1053     #   kubernetes.io/ingress.class: nginx
1054     #   kubernetes.io/tls-acme: 'true'
1055
1056     ## pushgateway Ingress hostnames with optional path
1057     ## Must be provided if Ingress is enabled
1058     ##
1059     hosts: []
1060     #   - pushgateway.domain.com
1061     #   - domain.com/pushgateway
1062
1063     ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
1064     extraPaths: []
1065     # - path: /*
1066     #   backend:
1067     #     serviceName: ssl-redirect
1068     #     servicePort: use-annotation
1069
1070     ## pushgateway Ingress TLS configuration
1071     ## Secrets must be manually created in the namespace
1072     ##
1073     tls: []
1074     #   - secretName: prometheus-alerts-tls
1075     #     hosts:
1076     #       - pushgateway.domain.com
1077
1078   ## Node tolerations for pushgateway scheduling to nodes with taints
1079   ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
1080   ##
1081   tolerations: []
1082     # - key: "key"
1083     #   operator: "Equal|Exists"
1084     #   value: "value"
1085     #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
1086
1087   ## Node labels for pushgateway pod assignment
1088   ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
1089   ##
1090   nodeSelector: {}
1091
1092   ## Annotations to be added to pushgateway pods
1093   ##
1094   podAnnotations: {}
1095
1096   ## Specify if a Pod Security Policy for node-exporter must be created
1097   ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
1098   ##
1099   podSecurityPolicy:
1100     annotations: {}
1101       ## Specify pod annotations
1102       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
1103       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
1104       ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
1105       ##
1106       # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
1107       # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
1108       # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
1109
1110   replicaCount: 1
1111
1112   ## PodDisruptionBudget settings
1113   ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
1114   ##
1115   podDisruptionBudget:
1116     enabled: false
1117     maxUnavailable: 1
1118
1119   ## pushgateway resource requests and limits
1120   ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
1121   ##
1122   resources: {}
1123     # limits:
1124     #   cpu: 10m
1125     #   memory: 32Mi
1126     # requests:
1127     #   cpu: 10m
1128     #   memory: 32Mi
1129
1130   ## Security context to be added to push-gateway pods
1131   ##
1132   securityContext:
1133     runAsUser: 65534
1134     runAsNonRoot: true
1135
1136   service:
1137     annotations:
1138       prometheus.io/probe: pushgateway
1139     labels: {}
1140     clusterIP: ""
1141
1142     ## List of IP addresses at which the pushgateway service is available
1143     ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
1144     ##
1145     externalIPs: []
1146
1147     loadBalancerIP: ""
1148     loadBalancerSourceRanges: []
1149     servicePort: 9091
1150     type: ClusterIP
1151
1152   ## pushgateway Deployment Strategy type
1153   # strategy:
1154   #   type: Recreate
1155
1156   persistentVolume:
1157     ## If true, pushgateway will create/use a Persistent Volume Claim
1158     ## If false, use emptyDir
1159     ##
1160     enabled: false
1161
1162     ## pushgateway data Persistent Volume access modes
1163     ## Must match those of existing PV or dynamic provisioner
1164     ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
1165     ##
1166     accessModes:
1167       - ReadWriteOnce
1168
1169     ## pushgateway data Persistent Volume Claim annotations
1170     ##
1171     annotations: {}
1172
1173     ## pushgateway data Persistent Volume existing claim name
1174     ## Requires pushgateway.persistentVolume.enabled: true
1175     ## If defined, PVC must be created manually before volume will be bound
1176     existingClaim: ""
1177
1178     ## pushgateway data Persistent Volume mount root path
1179     ##
1180     mountPath: /data
1181
1182     ## pushgateway data Persistent Volume size
1183     ##
1184     size: 2Gi
1185
1186     ## pushgateway data Persistent Volume Storage Class
1187     ## If defined, storageClassName: <storageClass>
1188     ## If set to "-", storageClassName: "", which disables dynamic provisioning
1189     ## If undefined (the default) or set to null, no storageClassName spec is
1190     ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
1191     ##   GKE, AWS & OpenStack)
1192     ##
1193     # storageClass: "-"
1194
1195     ## pushgateway data Persistent Volume Binding Mode
1196     ## If defined, volumeBindingMode: <volumeBindingMode>
1197     ## If undefined (the default) or set to null, no volumeBindingMode spec is
1198     ##   set, choosing the default mode.
1199     ##
1200     # volumeBindingMode: ""
1201
1202     ## Subdirectory of pushgateway data Persistent Volume to mount
1203     ## Useful if the volume's root directory is not empty
1204     ##
1205     subPath: ""
1206
1207
1208 ## alertmanager ConfigMap entries
1209 ##
1210 alertmanagerFiles:
1211   alertmanager.yml:
1212     global: {}
1213       # slack_api_url: ''
1214
1215     receivers:
1216       - name: default-receiver
1217         # slack_configs:
1218         #  - channel: '@you'
1219         #    send_resolved: true
1220
1221     route:
1222       group_wait: 10s
1223       group_interval: 5m
1224       receiver: default-receiver
1225       repeat_interval: 3h
1226
1227 ## Prometheus server ConfigMap entries
1228 ##
1229 serverFiles:
1230
1231   ## Alerts configuration
1232   ## Ref: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
1233   alerting_rules.yml: {}
1234   # groups:
1235   #   - name: Instances
1236   #     rules:
1237   #       - alert: InstanceDown
1238   #         expr: up == 0
1239   #         for: 5m
1240   #         labels:
1241   #           severity: page
1242   #         annotations:
1243   #           description: '{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes.'
1244   #           summary: 'Instance {{ $labels.instance }} down'
1245   ## DEPRECATED DEFAULT VALUE, unless explicitly naming your files, please use alerting_rules.yml
1246   alerts: {}
1247
1248   ## Records configuration
1249   ## Ref: https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/
1250   recording_rules.yml: {}
1251   ## DEPRECATED DEFAULT VALUE, unless explicitly naming your files, please use recording_rules.yml
1252   rules: {}
1253
1254   prometheus.yml:
1255     rule_files:
1256       - /etc/config/recording_rules.yml
1257       - /etc/config/alerting_rules.yml
1258     ## Below two files are DEPRECATED will be removed from this default values file
1259       - /etc/config/rules
1260       - /etc/config/alerts
1261
1262     scrape_configs:
1263       - job_name: prometheus
1264         static_configs:
1265           - targets:
1266             - localhost:9090
1267
1268       # A scrape configuration for running Prometheus on a Kubernetes cluster.
1269       # This uses separate scrape configs for cluster components (i.e. API server, node)
1270       # and services to allow each to use different authentication configs.
1271       #
1272       # Kubernetes labels will be added as Prometheus labels on metrics via the
1273       # `labelmap` relabeling action.
1274
1275       # Scrape config for API servers.
1276       #
1277       # Kubernetes exposes API servers as endpoints to the default/kubernetes
1278       # service so this uses `endpoints` role and uses relabelling to only keep
1279       # the endpoints associated with the default/kubernetes service using the
1280       # default named port `https`. This works for single API server deployments as
1281       # well as HA API server deployments.
1282       - job_name: 'kubernetes-apiservers'
1283
1284         kubernetes_sd_configs:
1285           - role: endpoints
1286
1287         # Default to scraping over https. If required, just disable this or change to
1288         # `http`.
1289         scheme: https
1290
1291         # This TLS & bearer token file config is used to connect to the actual scrape
1292         # endpoints for cluster components. This is separate to discovery auth
1293         # configuration because discovery & scraping are two separate concerns in
1294         # Prometheus. The discovery auth config is automatic if Prometheus runs inside
1295         # the cluster. Otherwise, more config options have to be provided within the
1296         # <kubernetes_sd_config>.
1297         tls_config:
1298           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
1299           # If your node certificates are self-signed or use a different CA to the
1300           # master CA, then disable certificate verification below. Note that
1301           # certificate verification is an integral part of a secure infrastructure
1302           # so this should only be disabled in a controlled environment. You can
1303           # disable certificate verification by uncommenting the line below.
1304           #
1305           insecure_skip_verify: true
1306         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
1307
1308         # Keep only the default/kubernetes service endpoints for the https port. This
1309         # will add targets for each API server which Kubernetes adds an endpoint to
1310         # the default/kubernetes service.
1311         relabel_configs:
1312           - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
1313             action: keep
1314             regex: default;kubernetes;https
1315
1316       - job_name: 'kubernetes-nodes'
1317
1318         # Default to scraping over https. If required, just disable this or change to
1319         # `http`.
1320         scheme: https
1321
1322         # This TLS & bearer token file config is used to connect to the actual scrape
1323         # endpoints for cluster components. This is separate to discovery auth
1324         # configuration because discovery & scraping are two separate concerns in
1325         # Prometheus. The discovery auth config is automatic if Prometheus runs inside
1326         # the cluster. Otherwise, more config options have to be provided within the
1327         # <kubernetes_sd_config>.
1328         tls_config:
1329           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
1330           # If your node certificates are self-signed or use a different CA to the
1331           # master CA, then disable certificate verification below. Note that
1332           # certificate verification is an integral part of a secure infrastructure
1333           # so this should only be disabled in a controlled environment. You can
1334           # disable certificate verification by uncommenting the line below.
1335           #
1336           insecure_skip_verify: true
1337         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
1338
1339         kubernetes_sd_configs:
1340           - role: node
1341
1342         relabel_configs:
1343           - action: labelmap
1344             regex: __meta_kubernetes_node_label_(.+)
1345           - target_label: __address__
1346             replacement: kubernetes.default.svc:443
1347           - source_labels: [__meta_kubernetes_node_name]
1348             regex: (.+)
1349             target_label: __metrics_path__
1350             replacement: /api/v1/nodes/$1/proxy/metrics
1351
1352
1353       - job_name: 'kubernetes-nodes-cadvisor'
1354
1355         # Default to scraping over https. If required, just disable this or change to
1356         # `http`.
1357         scheme: https
1358
1359         # This TLS & bearer token file config is used to connect to the actual scrape
1360         # endpoints for cluster components. This is separate to discovery auth
1361         # configuration because discovery & scraping are two separate concerns in
1362         # Prometheus. The discovery auth config is automatic if Prometheus runs inside
1363         # the cluster. Otherwise, more config options have to be provided within the
1364         # <kubernetes_sd_config>.
1365         tls_config:
1366           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
1367           # If your node certificates are self-signed or use a different CA to the
1368           # master CA, then disable certificate verification below. Note that
1369           # certificate verification is an integral part of a secure infrastructure
1370           # so this should only be disabled in a controlled environment. You can
1371           # disable certificate verification by uncommenting the line below.
1372           #
1373           insecure_skip_verify: true
1374         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
1375
1376         kubernetes_sd_configs:
1377           - role: node
1378
1379         # This configuration will work only on kubelet 1.7.3+
1380         # As the scrape endpoints for cAdvisor have changed
1381         # if you are using older version you need to change the replacement to
1382         # replacement: /api/v1/nodes/$1:4194/proxy/metrics
1383         # more info here https://github.com/coreos/prometheus-operator/issues/633
1384         relabel_configs:
1385           - action: labelmap
1386             regex: __meta_kubernetes_node_label_(.+)
1387           - target_label: __address__
1388             replacement: kubernetes.default.svc:443
1389           - source_labels: [__meta_kubernetes_node_name]
1390             regex: (.+)
1391             target_label: __metrics_path__
1392             replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
1393
1394       # Scrape config for service endpoints.
1395       #
1396       # The relabeling allows the actual service scrape endpoint to be configured
1397       # via the following annotations:
1398       #
1399       # * `prometheus.io/scrape`: Only scrape services that have a value of `true`
1400       # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
1401       # to set this to `https` & most likely set the `tls_config` of the scrape config.
1402       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1403       # * `prometheus.io/port`: If the metrics are exposed on a different port to the
1404       # service then set this appropriately.
1405       - job_name: 'kubernetes-service-endpoints'
1406
1407         kubernetes_sd_configs:
1408           - role: endpoints
1409
1410         relabel_configs:
1411           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
1412             action: keep
1413             regex: true
1414           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
1415             action: replace
1416             target_label: __scheme__
1417             regex: (https?)
1418           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
1419             action: replace
1420             target_label: __metrics_path__
1421             regex: (.+)
1422           - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
1423             action: replace
1424             target_label: __address__
1425             regex: ([^:]+)(?::\d+)?;(\d+)
1426             replacement: $1:$2
1427           - action: labelmap
1428             regex: __meta_kubernetes_service_label_(.+)
1429           - source_labels: [__meta_kubernetes_namespace]
1430             action: replace
1431             target_label: kubernetes_namespace
1432           - source_labels: [__meta_kubernetes_service_name]
1433             action: replace
1434             target_label: kubernetes_name
1435           - source_labels: [__meta_kubernetes_pod_node_name]
1436             action: replace
1437             target_label: kubernetes_node
1438
1439       # Scrape config for slow service endpoints; same as above, but with a larger
1440       # timeout and a larger interval
1441       #
1442       # The relabeling allows the actual service scrape endpoint to be configured
1443       # via the following annotations:
1444       #
1445       # * `prometheus.io/scrape-slow`: Only scrape services that have a value of `true`
1446       # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
1447       # to set this to `https` & most likely set the `tls_config` of the scrape config.
1448       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1449       # * `prometheus.io/port`: If the metrics are exposed on a different port to the
1450       # service then set this appropriately.
1451       - job_name: 'kubernetes-service-endpoints-slow'
1452
1453         scrape_interval: 5m
1454         scrape_timeout: 30s
1455
1456         kubernetes_sd_configs:
1457           - role: endpoints
1458
1459         relabel_configs:
1460           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape_slow]
1461             action: keep
1462             regex: true
1463           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
1464             action: replace
1465             target_label: __scheme__
1466             regex: (https?)
1467           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
1468             action: replace
1469             target_label: __metrics_path__
1470             regex: (.+)
1471           - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
1472             action: replace
1473             target_label: __address__
1474             regex: ([^:]+)(?::\d+)?;(\d+)
1475             replacement: $1:$2
1476           - action: labelmap
1477             regex: __meta_kubernetes_service_label_(.+)
1478           - source_labels: [__meta_kubernetes_namespace]
1479             action: replace
1480             target_label: kubernetes_namespace
1481           - source_labels: [__meta_kubernetes_service_name]
1482             action: replace
1483             target_label: kubernetes_name
1484           - source_labels: [__meta_kubernetes_pod_node_name]
1485             action: replace
1486             target_label: kubernetes_node
1487
1488       - job_name: 'prometheus-pushgateway'
1489         honor_labels: true
1490
1491         kubernetes_sd_configs:
1492           - role: service
1493
1494         relabel_configs:
1495           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
1496             action: keep
1497             regex: pushgateway
1498
1499       # Example scrape config for probing services via the Blackbox Exporter.
1500       #
1501       # The relabeling allows the actual service scrape endpoint to be configured
1502       # via the following annotations:
1503       #
1504       # * `prometheus.io/probe`: Only probe services that have a value of `true`
1505       - job_name: 'kubernetes-services'
1506
1507         metrics_path: /probe
1508         params:
1509           module: [http_2xx]
1510
1511         kubernetes_sd_configs:
1512           - role: service
1513
1514         relabel_configs:
1515           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
1516             action: keep
1517             regex: true
1518           - source_labels: [__address__]
1519             target_label: __param_target
1520           - target_label: __address__
1521             replacement: blackbox
1522           - source_labels: [__param_target]
1523             target_label: instance
1524           - action: labelmap
1525             regex: __meta_kubernetes_service_label_(.+)
1526           - source_labels: [__meta_kubernetes_namespace]
1527             target_label: kubernetes_namespace
1528           - source_labels: [__meta_kubernetes_service_name]
1529             target_label: kubernetes_name
1530
1531       # Example scrape config for pods
1532       #
1533       # The relabeling allows the actual pod scrape endpoint to be configured via the
1534       # following annotations:
1535       #
1536       # * `prometheus.io/scrape`: Only scrape pods that have a value of `true`
1537       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1538       # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
1539       - job_name: 'kubernetes-pods'
1540
1541         kubernetes_sd_configs:
1542           - role: pod
1543
1544         relabel_configs:
1545           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
1546             action: keep
1547             regex: true
1548           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
1549             action: replace
1550             target_label: __metrics_path__
1551             regex: (.+)
1552           - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
1553             action: replace
1554             regex: ([^:]+)(?::\d+)?;(\d+)
1555             replacement: $1:$2
1556             target_label: __address__
1557           - action: labelmap
1558             regex: __meta_kubernetes_pod_label_(.+)
1559           - source_labels: [__meta_kubernetes_namespace]
1560             action: replace
1561             target_label: kubernetes_namespace
1562           - source_labels: [__meta_kubernetes_pod_name]
1563             action: replace
1564             target_label: kubernetes_pod_name
1565
1566       # Example Scrape config for pods which should be scraped slower. An useful example
1567       # would be stackriver-exporter which querys an API on every scrape of the pod
1568       #
1569       # The relabeling allows the actual pod scrape endpoint to be configured via the
1570       # following annotations:
1571       #
1572       # * `prometheus.io/scrape-slow`: Only scrape pods that have a value of `true`
1573       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1574       # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
1575       - job_name: 'kubernetes-pods-slow'
1576
1577         scrape_interval: 5m
1578         scrape_timeout: 30s
1579
1580         kubernetes_sd_configs:
1581           - role: pod
1582
1583         relabel_configs:
1584           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow]
1585             action: keep
1586             regex: true
1587           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
1588             action: replace
1589             target_label: __metrics_path__
1590             regex: (.+)
1591           - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
1592             action: replace
1593             regex: ([^:]+)(?::\d+)?;(\d+)
1594             replacement: $1:$2
1595             target_label: __address__
1596           - action: labelmap
1597             regex: __meta_kubernetes_pod_label_(.+)
1598           - source_labels: [__meta_kubernetes_namespace]
1599             action: replace
1600             target_label: kubernetes_namespace
1601           - source_labels: [__meta_kubernetes_pod_name]
1602             action: replace
1603             target_label: kubernetes_pod_name
1604
1605 # adds additional scrape configs to prometheus.yml
1606 # must be a string so you have to add a | after extraScrapeConfigs:
1607 # example adds prometheus-blackbox-exporter scrape config
1608 extraScrapeConfigs:
1609   # - job_name: 'prometheus-blackbox-exporter'
1610   #   metrics_path: /probe
1611   #   params:
1612   #     module: [http_2xx]
1613   #   static_configs:
1614   #     - targets:
1615   #       - https://example.com
1616   #   relabel_configs:
1617   #     - source_labels: [__address__]
1618   #       target_label: __param_target
1619   #     - source_labels: [__param_target]
1620   #       target_label: instance
1621   #     - target_label: __address__
1622   #       replacement: prometheus-blackbox-exporter:9115
1623
1624 # Adds option to add alert_relabel_configs to avoid duplicate alerts in alertmanager
1625 # useful in H/A prometheus with different external labels but the same alerts
1626 alertRelabelConfigs:
1627   # alert_relabel_configs:
1628   # - source_labels: [dc]
1629   #   regex: (.+)\d+
1630   #   target_label: dc
1631
1632 networkPolicy:
1633   ## Enable creation of NetworkPolicy resources.
1634   ##
1635   enabled: false
1636 {% endraw %}