Fix for RIC alarm flow
[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: true
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: false
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       resolve_timeout: 5m
1122     route:
1123       group_wait: 5s
1124       group_interval: 3m
1125       repeat_interval: 1h
1126       group_by: ['alertname', 'severity', 'instance', 'job']
1127       receiver: vespa
1128       routes:
1129       #  - receiver: echo
1130       #    continue: true
1131         - receiver: vespa
1132           continue: true
1133     receivers:
1134     #  - name: echo
1135     #    webhook_configs:
1136     #      - url: 'http://10.244.0.1:5001'
1137       - name: vespa
1138         webhook_configs:
1139           - url: 'http://service-ricplt-vespamgr-http:9095/alerts'
1140
1141
1142 ## Prometheus server ConfigMap entries
1143 ##
1144 serverFiles:
1145
1146   ## Alerts configuration
1147   ## Ref: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
1148   alerting_rules.yml: {}
1149   # groups:
1150   #   - name: Instances
1151   #     rules:
1152   #       - alert: InstanceDown
1153   #         expr: up == 0
1154   #         for: 5m
1155   #         labels:
1156   #           severity: page
1157   #         annotations:
1158   #           description: '{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes.'
1159   #           summary: 'Instance {{ $labels.instance }} down'
1160   ## DEPRECATED DEFAULT VALUE, unless explicitly naming your files, please use alerting_rules.yml
1161   alerts: {}
1162
1163   ## Records configuration
1164   ## Ref: https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/
1165   recording_rules.yml: {}
1166   ## DEPRECATED DEFAULT VALUE, unless explicitly naming your files, please use recording_rules.yml
1167   rules: {}
1168
1169   prometheus.yml:
1170     rule_files:
1171       - /etc/config/recording_rules.yml
1172       - /etc/config/alerting_rules.yml
1173     ## Below two files are DEPRECATED will be removed from this default values file
1174       - /etc/config/rules
1175       - /etc/config/alerts
1176
1177     scrape_configs:
1178       - job_name: prometheus
1179         static_configs:
1180           - targets:
1181             - localhost:9090
1182
1183       # A scrape configuration for running Prometheus on a Kubernetes cluster.
1184       # This uses separate scrape configs for cluster components (i.e. API server, node)
1185       # and services to allow each to use different authentication configs.
1186       #
1187       # Kubernetes labels will be added as Prometheus labels on metrics via the
1188       # `labelmap` relabeling action.
1189
1190       # Scrape config for API servers.
1191       #
1192       # Kubernetes exposes API servers as endpoints to the default/kubernetes
1193       # service so this uses `endpoints` role and uses relabelling to only keep
1194       # the endpoints associated with the default/kubernetes service using the
1195       # default named port `https`. This works for single API server deployments as
1196       # well as HA API server deployments.
1197       - job_name: 'kubernetes-apiservers'
1198
1199         kubernetes_sd_configs:
1200           - role: endpoints
1201
1202         # Default to scraping over https. If required, just disable this or change to
1203         # `http`.
1204         scheme: https
1205
1206         # This TLS & bearer token file config is used to connect to the actual scrape
1207         # endpoints for cluster components. This is separate to discovery auth
1208         # configuration because discovery & scraping are two separate concerns in
1209         # Prometheus. The discovery auth config is automatic if Prometheus runs inside
1210         # the cluster. Otherwise, more config options have to be provided within the
1211         # <kubernetes_sd_config>.
1212         tls_config:
1213           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
1214           # If your node certificates are self-signed or use a different CA to the
1215           # master CA, then disable certificate verification below. Note that
1216           # certificate verification is an integral part of a secure infrastructure
1217           # so this should only be disabled in a controlled environment. You can
1218           # disable certificate verification by uncommenting the line below.
1219           #
1220           insecure_skip_verify: true
1221         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
1222
1223         # Keep only the default/kubernetes service endpoints for the https port. This
1224         # will add targets for each API server which Kubernetes adds an endpoint to
1225         # the default/kubernetes service.
1226         relabel_configs:
1227           - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
1228             action: keep
1229             regex: default;kubernetes;https
1230
1231       - job_name: 'kubernetes-nodes'
1232
1233         # Default to scraping over https. If required, just disable this or change to
1234         # `http`.
1235         scheme: https
1236
1237         # This TLS & bearer token file config is used to connect to the actual scrape
1238         # endpoints for cluster components. This is separate to discovery auth
1239         # configuration because discovery & scraping are two separate concerns in
1240         # Prometheus. The discovery auth config is automatic if Prometheus runs inside
1241         # the cluster. Otherwise, more config options have to be provided within the
1242         # <kubernetes_sd_config>.
1243         tls_config:
1244           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
1245           # If your node certificates are self-signed or use a different CA to the
1246           # master CA, then disable certificate verification below. Note that
1247           # certificate verification is an integral part of a secure infrastructure
1248           # so this should only be disabled in a controlled environment. You can
1249           # disable certificate verification by uncommenting the line below.
1250           #
1251           insecure_skip_verify: true
1252         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
1253
1254         kubernetes_sd_configs:
1255           - role: node
1256
1257         relabel_configs:
1258           - action: labelmap
1259             regex: __meta_kubernetes_node_label_(.+)
1260           - target_label: __address__
1261             replacement: kubernetes.default.svc:443
1262           - source_labels: [__meta_kubernetes_node_name]
1263             regex: (.+)
1264             target_label: __metrics_path__
1265             replacement: /api/v1/nodes/$1/proxy/metrics
1266
1267
1268       - job_name: 'kubernetes-nodes-cadvisor'
1269
1270         # Default to scraping over https. If required, just disable this or change to
1271         # `http`.
1272         scheme: https
1273
1274         # This TLS & bearer token file config is used to connect to the actual scrape
1275         # endpoints for cluster components. This is separate to discovery auth
1276         # configuration because discovery & scraping are two separate concerns in
1277         # Prometheus. The discovery auth config is automatic if Prometheus runs inside
1278         # the cluster. Otherwise, more config options have to be provided within the
1279         # <kubernetes_sd_config>.
1280         tls_config:
1281           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
1282           # If your node certificates are self-signed or use a different CA to the
1283           # master CA, then disable certificate verification below. Note that
1284           # certificate verification is an integral part of a secure infrastructure
1285           # so this should only be disabled in a controlled environment. You can
1286           # disable certificate verification by uncommenting the line below.
1287           #
1288           insecure_skip_verify: true
1289         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
1290
1291         kubernetes_sd_configs:
1292           - role: node
1293
1294         # This configuration will work only on kubelet 1.7.3+
1295         # As the scrape endpoints for cAdvisor have changed
1296         # if you are using older version you need to change the replacement to
1297         # replacement: /api/v1/nodes/$1:4194/proxy/metrics
1298         # more info here https://github.com/coreos/prometheus-operator/issues/633
1299         relabel_configs:
1300           - action: labelmap
1301             regex: __meta_kubernetes_node_label_(.+)
1302           - target_label: __address__
1303             replacement: kubernetes.default.svc:443
1304           - source_labels: [__meta_kubernetes_node_name]
1305             regex: (.+)
1306             target_label: __metrics_path__
1307             replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
1308
1309       # Scrape config for service endpoints.
1310       #
1311       # The relabeling allows the actual service scrape endpoint to be configured
1312       # via the following annotations:
1313       #
1314       # * `prometheus.io/scrape`: Only scrape services that have a value of `true`
1315       # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
1316       # to set this to `https` & most likely set the `tls_config` of the scrape config.
1317       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1318       # * `prometheus.io/port`: If the metrics are exposed on a different port to the
1319       # service then set this appropriately.
1320       - job_name: 'kubernetes-service-endpoints'
1321
1322         kubernetes_sd_configs:
1323           - role: endpoints
1324
1325         relabel_configs:
1326           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
1327             action: keep
1328             regex: true
1329           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
1330             action: replace
1331             target_label: __scheme__
1332             regex: (https?)
1333           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
1334             action: replace
1335             target_label: __metrics_path__
1336             regex: (.+)
1337           - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
1338             action: replace
1339             target_label: __address__
1340             regex: ([^:]+)(?::\d+)?;(\d+)
1341             replacement: $1:$2
1342           - action: labelmap
1343             regex: __meta_kubernetes_service_label_(.+)
1344           - source_labels: [__meta_kubernetes_namespace]
1345             action: replace
1346             target_label: kubernetes_namespace
1347           - source_labels: [__meta_kubernetes_service_name]
1348             action: replace
1349             target_label: kubernetes_name
1350           - source_labels: [__meta_kubernetes_pod_node_name]
1351             action: replace
1352             target_label: kubernetes_node
1353
1354       # Scrape config for slow service endpoints; same as above, but with a larger
1355       # timeout and a larger interval
1356       #
1357       # The relabeling allows the actual service scrape endpoint to be configured
1358       # via the following annotations:
1359       #
1360       # * `prometheus.io/scrape-slow`: Only scrape services that have a value of `true`
1361       # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
1362       # to set this to `https` & most likely set the `tls_config` of the scrape config.
1363       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1364       # * `prometheus.io/port`: If the metrics are exposed on a different port to the
1365       # service then set this appropriately.
1366       - job_name: 'kubernetes-service-endpoints-slow'
1367
1368         scrape_interval: 5m
1369         scrape_timeout: 30s
1370
1371         kubernetes_sd_configs:
1372           - role: endpoints
1373
1374         relabel_configs:
1375           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape_slow]
1376             action: keep
1377             regex: true
1378           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
1379             action: replace
1380             target_label: __scheme__
1381             regex: (https?)
1382           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
1383             action: replace
1384             target_label: __metrics_path__
1385             regex: (.+)
1386           - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
1387             action: replace
1388             target_label: __address__
1389             regex: ([^:]+)(?::\d+)?;(\d+)
1390             replacement: $1:$2
1391           - action: labelmap
1392             regex: __meta_kubernetes_service_label_(.+)
1393           - source_labels: [__meta_kubernetes_namespace]
1394             action: replace
1395             target_label: kubernetes_namespace
1396           - source_labels: [__meta_kubernetes_service_name]
1397             action: replace
1398             target_label: kubernetes_name
1399           - source_labels: [__meta_kubernetes_pod_node_name]
1400             action: replace
1401             target_label: kubernetes_node
1402
1403       - job_name: 'prometheus-pushgateway'
1404         honor_labels: true
1405
1406         kubernetes_sd_configs:
1407           - role: service
1408
1409         relabel_configs:
1410           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
1411             action: keep
1412             regex: pushgateway
1413
1414       # Example scrape config for probing services via the Blackbox Exporter.
1415       #
1416       # The relabeling allows the actual service scrape endpoint to be configured
1417       # via the following annotations:
1418       #
1419       # * `prometheus.io/probe`: Only probe services that have a value of `true`
1420       - job_name: 'kubernetes-services'
1421
1422         metrics_path: /probe
1423         params:
1424           module: [http_2xx]
1425
1426         kubernetes_sd_configs:
1427           - role: service
1428
1429         relabel_configs:
1430           - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
1431             action: keep
1432             regex: true
1433           - source_labels: [__address__]
1434             target_label: __param_target
1435           - target_label: __address__
1436             replacement: blackbox
1437           - source_labels: [__param_target]
1438             target_label: instance
1439           - action: labelmap
1440             regex: __meta_kubernetes_service_label_(.+)
1441           - source_labels: [__meta_kubernetes_namespace]
1442             target_label: kubernetes_namespace
1443           - source_labels: [__meta_kubernetes_service_name]
1444             target_label: kubernetes_name
1445
1446       # Example scrape config for pods
1447       #
1448       # The relabeling allows the actual pod scrape endpoint to be configured via the
1449       # following annotations:
1450       #
1451       # * `prometheus.io/scrape`: Only scrape pods that have a value of `true`
1452       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1453       # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
1454       - job_name: 'kubernetes-pods'
1455
1456         kubernetes_sd_configs:
1457           - role: pod
1458
1459         relabel_configs:
1460           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
1461             action: keep
1462             regex: true
1463           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
1464             action: replace
1465             target_label: __metrics_path__
1466             regex: (.+)
1467           - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
1468             action: replace
1469             regex: ([^:]+)(?::\d+)?;(\d+)
1470             replacement: $1:$2
1471             target_label: __address__
1472           - action: labelmap
1473             regex: __meta_kubernetes_pod_label_(.+)
1474           - source_labels: [__meta_kubernetes_namespace]
1475             action: replace
1476             target_label: kubernetes_namespace
1477           - source_labels: [__meta_kubernetes_pod_name]
1478             action: replace
1479             target_label: kubernetes_pod_name
1480
1481       # Example Scrape config for pods which should be scraped slower. An useful example
1482       # would be stackriver-exporter which querys an API on every scrape of the pod
1483       #
1484       # The relabeling allows the actual pod scrape endpoint to be configured via the
1485       # following annotations:
1486       #
1487       # * `prometheus.io/scrape-slow`: Only scrape pods that have a value of `true`
1488       # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
1489       # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
1490       - job_name: 'kubernetes-pods-slow'
1491
1492         scrape_interval: 5m
1493         scrape_timeout: 30s
1494
1495         kubernetes_sd_configs:
1496           - role: pod
1497
1498         relabel_configs:
1499           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow]
1500             action: keep
1501             regex: true
1502           - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
1503             action: replace
1504             target_label: __metrics_path__
1505             regex: (.+)
1506           - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
1507             action: replace
1508             regex: ([^:]+)(?::\d+)?;(\d+)
1509             replacement: $1:$2
1510             target_label: __address__
1511           - action: labelmap
1512             regex: __meta_kubernetes_pod_label_(.+)
1513           - source_labels: [__meta_kubernetes_namespace]
1514             action: replace
1515             target_label: kubernetes_namespace
1516           - source_labels: [__meta_kubernetes_pod_name]
1517             action: replace
1518             target_label: kubernetes_pod_name
1519
1520 # adds additional scrape configs to prometheus.yml
1521 # must be a string so you have to add a | after extraScrapeConfigs:
1522 # example adds prometheus-blackbox-exporter scrape config
1523 extraScrapeConfigs:
1524   # - job_name: 'prometheus-blackbox-exporter'
1525   #   metrics_path: /probe
1526   #   params:
1527   #     module: [http_2xx]
1528   #   static_configs:
1529   #     - targets:
1530   #       - https://example.com
1531   #   relabel_configs:
1532   #     - source_labels: [__address__]
1533   #       target_label: __param_target
1534   #     - source_labels: [__param_target]
1535   #       target_label: instance
1536   #     - target_label: __address__
1537   #       replacement: prometheus-blackbox-exporter:9115
1538
1539 # Adds option to add alert_relabel_configs to avoid duplicate alerts in alertmanager
1540 # useful in H/A prometheus with different external labels but the same alerts
1541 alertRelabelConfigs:
1542   # alert_relabel_configs:
1543   # - source_labels: [dc]
1544   #   regex: (.+)\d+
1545   #   target_label: dc
1546
1547 networkPolicy:
1548   ## Enable creation of NetworkPolicy resources.
1549   ##
1550   enabled: false
1551
1552 # Force namespace of namespaced resources
1553 forceNamespace: null