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