DirectorySecurity AdvisoriesPricing
Sign in
Directory
victoria-metrics-single logoHELM

victoria-metrics-single

Helm chart
Last changed
Request a free trial

Contact our team to test out this Helm chart and related images for free. Please also indicate any other images you would like to evaluate.

Overview
Chart versions
Default values
Chart metadata
Images

Tag:
Compare:

1
# Default values for victoria-metrics.
2
# This is a YAML-formatted file.
3
# Declare variables to be passed into your templates.
4
global:
5
# -- Image pull secrets, that can be shared across multiple helm charts
6
imagePullSecrets: []
7
image:
8
# -- Image registry, that can be shared across multiple helm charts
9
registry: ""
10
# -- Openshift security context compatibility configuration
11
compatibility:
12
openshift:
13
adaptSecurityContext: "auto"
14
# -- Automount OpenShift service signing CA into the pod
15
automountServiceSigningCA: "auto"
16
cluster:
17
# -- K8s cluster domain suffix, uses for building storage pods' FQDN. Details are [here](https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/)
18
dnsDomain: cluster.local.
19
# -- Labels added to all resources
20
extraLabels: {}
21
# -- Annotations added to all resources
22
extraAnnotations: {}
23
rbac:
24
# -- Enables Role/RoleBinding creation
25
create: true
26
# -- If true and `rbac.enabled`, will deploy a Role/RoleBinding instead of a ClusterRole/ClusterRoleBinding
27
namespaced: false
28
# -- Role/RoleBinding labels
29
extraLabels: {}
30
# -- Role/RoleBinding annotations
31
annotations: {}
32
# -- Override chart name
33
nameOverride: ""
34
# -- Print chart notes
35
printNotes: true
36
serviceAccount:
37
# -- Create service account.
38
create: true
39
# -- The name of the service account to use.
40
# If not set and create is true, a name is generated using the fullname template
41
name:
42
# -- ServiceAccount labels
43
extraLabels: {}
44
# -- ServiceAccount annotations
45
annotations: {}
46
# -- Mount API token to pod directly
47
automountToken: true
48
# -- See `kubectl explain poddisruptionbudget.spec` for more. Details are [here](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
49
podDisruptionBudget:
50
enabled: false
51
# -- min number or percentage of pods that can be unavailable
52
minAvailable: 0
53
# -- max number or percentage of pods that can be unavailable
54
maxUnavailable: 0
55
# -- Defines criteria when unhealthy pods should be considered for eviction
56
unhealthyPodEvictionPolicy:
57
labels: {}
58
# -- See `kubectl explain networkpolicy.spec` for more. Details are [here](https://kubernetes.io/docs/concepts/services-networking/network-policies/)
59
networkPolicy:
60
enabled: false
61
# -- Ingress rules
62
ingress: []
63
# -- Egress rules
64
egress: []
65
# -- Extra labels for NetworkPolicy
66
labels: {}
67
# -- Extra annotations for NetworkPolicy
68
annotations: {}
69
server:
70
# -- Enable deployment of server component. Deployed as StatefulSet
71
enabled: true
72
# -- Override default `app` label name
73
name:
74
image:
75
# -- Image registry
76
registry: cgr.dev
77
# -- Image repository
78
repository: chainguard-private/victoria-metrics
79
# -- Image tag
80
tag: 1.151.0@sha256:f032404c57abbb010ffe32ab5494aa18f2abc377cb6fec75f543584ed00e5af4
81
# Variant of the image tag to use.
82
# e.g. enterprise.
83
variant: ""
84
# -- Image pull policy
85
pullPolicy: IfNotPresent
86
# -- Override default container command. Use when the VictoriaMetrics binary is available at a custom path
87
command: []
88
# -- Image pull secrets
89
imagePullSecrets: []
90
# -- Specify pod lifecycle
91
lifecycle: {}
92
# -- Number of victoriametrics single replicas
93
replicaCount: 1
94
# -- Name of Priority Class
95
priorityClassName: ""
96
# -- Name of the [RuntimeClass](https://kubernetes.io/docs/concepts/containers/runtime-class/) used to run the pod, e.g. "gvisor"
97
runtimeClassName: ""
98
# -- Overrides the full name of server component
99
fullnameOverride:
100
# -- Data retention period. Possible units character: h(ours), d(ays), w(eeks), y(ears), if no unit character specified - month. The minimum retention period is 24h. See these [docs](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#retention)
101
retentionPeriod: 1
102
# -- HTTP listen address configuration. See https://docs.victoriametrics.com/helm/victoria-metrics-single/#http-listen-address for details.
103
http:
104
- name: http
105
value: :8428
106
primary: true
107
tls: false
108
tlsCertFile: ""
109
tlsKeyFile: ""
110
tlsMinVersion: ""
111
tlsAutocertHosts: ""
112
tlsAutocertEmail: ""
113
tlsAutocertCacheDir: ""
114
mtls: false
115
mtlsCAFile: ""
116
# -- Extra command line arguments for container of component
117
extraArgs:
118
envflag.enable: true
119
envflag.prefix: VM_
120
loggerFormat: json
121
# Enable IPv6 support. Useful for running in IPv6-only Kubernetes clusters
122
# enableTCP6: true
123
# Additional hostPath mounts
124
extraHostPathMounts: []
125
#- name: certs-dir
126
# mountPath: /etc/kubernetes/certs
127
# subPath: ""
128
# hostPath: /etc/kubernetes/certs
129
# readOnly: true
130
131
# Extra Volumes for the pod
132
extraVolumes: []
133
#- name: example
134
# configMap:
135
# name: example
136
137
# -- Extra Volume Mounts for the container
138
extraVolumeMounts: []
139
# - name: example
140
# mountPath: /example
141
142
# -- Extra containers to run in a pod with VM single
143
extraContainers: []
144
#- name: config-reloader
145
# image: reloader-image
146
147
# -- Init containers for VM single pod
148
initContainers: []
149
# - name: vmrestore
150
# image: victoriametrics/vmrestore:latest
151
# volumeMounts:
152
# - mountPath: /storage
153
# name: vmstorage-volume
154
# - mountPath: /etc/vm/creds
155
# name: secret-remote-storage-keys
156
# readOnly: true
157
# args:
158
# - -storageDataPath=/storage
159
# - -src=s3://your_bucket/folder/latest
160
# - -credsFilePath=/etc/vm/creds/credentials
161
162
# -- Node tolerations for server scheduling to nodes with taints. Details are [here](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/)
163
tolerations: []
164
# - key: "key"
165
# operator: "Equal|Exists"
166
# value: "value"
167
# effect: "NoSchedule|PreferNoSchedule"
168
169
# -- Pod's node selector. Details are [here](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)
170
nodeSelector: {}
171
# -- Pod affinity
172
affinity: {}
173
# -- Env variables
174
# -- Additional environment variables (ex.: secret tokens, flags). Check [here](https://docs.victoriametrics.com/victoriametrics/#environment-variables) for more details
175
env: []
176
# -- Specify alternative source for env variables
177
envFrom: []
178
#- configMapRef:
179
# name: special-config
180
181
# -- Container workdir
182
containerWorkingDir: ""
183
# -- Use an alternate scheduler, e.g. "stork". Check [here](https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/) for more details
184
schedulerName: ""
185
emptyDir: {}
186
persistentVolume:
187
# -- Create/use Persistent Volume Claim for server component. Empty dir if false
188
enabled: true
189
# -- Override Persistent Volume Claim name
190
name: ""
191
# -- Array of access modes. Must match those of existing PV or dynamic provisioner. Details are [here](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
192
accessModes:
193
- ReadWriteOnce
194
# -- VolumeClassAttribute to user for persistent volume
195
volumeAttributesClassName:
196
# -- Persistent volume annotations
197
annotations: {}
198
# PVC extra labels
199
extraLabels: {}
200
# -- StorageClass to use for persistent volume. Requires server.persistentVolume.enabled: true. If defined, PVC created automatically
201
storageClassName: ""
202
# -- Existing Claim name. If defined, PVC must be created manually before volume will be bound
203
existingClaim: ""
204
# -- Bind Persistent Volume by labels. Must match all labels of targeted PV.
205
matchLabels: {}
206
# -- Mount path. Server data Persistent Volume mount root path.
207
mountPath: /storage
208
# -- Mount subpath
209
subPath: ""
210
# -- Size of the volume. Should be calculated based on the metrics you send and retention policy you set.
211
size: 16Gi
212
# -- Sts/Deploy additional labels
213
extraLabels: {}
214
# -- Pod's additional labels
215
podLabels: {}
216
# -- Pod's annotations
217
podAnnotations: {}
218
# -- Resource object. Details are [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
219
resources: {}
220
# limits:
221
# cpu: 500m
222
# memory: 512Mi
223
# requests:
224
# cpu: 500m
225
# memory: 512Mi
226
227
# -- Readiness & Liveness probes
228
probe:
229
# -- Indicates whether the Container is ready to service requests. If the readiness probe fails, the endpoints controller removes the Pod's IP address from the endpoints of all Services that match the Pod. The default state of readiness before the initial delay is Failure. If a Container does not provide a readiness probe, the default state is Success.
230
readiness:
231
httpGet: {}
232
initialDelaySeconds: 5
233
periodSeconds: 15
234
timeoutSeconds: 5
235
failureThreshold: 3
236
# -- Indicates whether the Container is running. If the liveness probe fails, the kubelet kills the Container, and the Container is subjected to its restart policy. If a Container does not provide a liveness probe, the default state is Success.
237
liveness:
238
tcpSocket: {}
239
initialDelaySeconds: 30
240
periodSeconds: 30
241
timeoutSeconds: 5
242
failureThreshold: 10
243
# -- Indicates whether the Container is done with potentially costly initialization. If set it is executed first. If it fails Container is restarted. If it succeeds liveness and readiness probes takes over.
244
startup: {}
245
#failureThreshold: 30
246
#periodSeconds: 15
247
#successThreshold: 1
248
#timeoutSeconds: 5
249
# -- Security context to be added to server pods
250
securityContext:
251
enabled: true
252
# -- Pod's security context. Details are [here](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
253
podSecurityContext:
254
enabled: true
255
ingress:
256
# -- Enable deployment of ingress for server component
257
enabled: false
258
# -- Ingress annotations
259
annotations: {}
260
# kubernetes.io/ingress.class: nginx
261
# kubernetes.io/tls-acme: 'true'
262
263
# -- Ingress extra labels
264
extraLabels: {}
265
# -- Array of host objects
266
hosts:
267
- name: vmsingle.local
268
path:
269
- /
270
port: http
271
# -- Array of TLS objects
272
tls: []
273
# - secretName: vmselect-ingress-tls
274
# hosts:
275
# - vmselect.local
276
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
277
# See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
278
# ingressClassName: nginx
279
pathType: Prefix
280
route:
281
# -- Enable deployment of HTTPRoute for single component
282
enabled: false
283
# -- HTTPRoute annotations
284
annotations: {}
285
# -- HTTPRoute extra labels
286
extraLabels: {}
287
# -- HTTPGateway objects refs
288
parentRefs: []
289
# -- Array of hostnames
290
hostnames: []
291
# -- Extra rules to prepend to route. This is useful when working with annotation based services.
292
extraRules: []
293
# -- Filters for a default rule in HTTPRoute
294
filters: []
295
# -- Matches for a default rule in HTTPRoute
296
matches:
297
- path:
298
type: PathPrefix
299
value: '{{ dig "extraArgs" "http.pathPrefix" "/" .Values.server }}'
300
vmbackupmanager:
301
# -- Enable automatic creation of backup via vmbackupmanager. vmbackupmanager is part of Enterprise packages
302
enabled: false
303
image:
304
# -- VMBackupManager image registry
305
registry: ""
306
# -- VMBackupManager image repository
307
repository: victoriametrics/vmbackupmanager
308
# -- VMBackupManager image tag
309
tag: ""
310
# Variant of the image tag to use.
311
# e.g. enterprise.
312
variant: ""
313
# -- Disable hourly backups
314
disableHourly: false
315
# -- Disable daily backups
316
disableDaily: false
317
# -- Disable weekly backups
318
disableWeekly: false
319
# -- Disable monthly backups
320
disableMonthly: false
321
# -- Backup destination at S3, GCS or local filesystem. Release name will be included to path!
322
destination: ""
323
# -- Backups' retention settings
324
retention:
325
# -- Keep last N hourly backups. 0 means delete all existing hourly backups. Specify -1 to turn off
326
keepLastHourly: 2
327
# -- Keep last N daily backups. 0 means delete all existing daily backups. Specify -1 to turn off
328
keepLastDaily: 2
329
# -- Keep last N weekly backups. 0 means delete all existing weekly backups. Specify -1 to turn off
330
keepLastWeekly: 2
331
# -- Keep last N monthly backups. 0 means delete all existing monthly backups. Specify -1 to turn off
332
keepLastMonthly: 2
333
# -- Extra command line arguments for container of component
334
extraArgs:
335
envflag.enable: true
336
envflag.prefix: VM_
337
loggerFormat: json
338
# Extra Volume Mounts for the container
339
extraVolumeMounts: []
340
# - name: example
341
# mountPath: /example
342
# -- Allows to enable restore options for pod.
343
# Read more [here](https://docs.victoriametrics.com/victoriametrics/vmbackupmanager/#restore-commands)
344
restore:
345
onStart:
346
enabled: false
347
# -- Resource object. Details are [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
348
resources: {}
349
# -- Additional environment variables (ex.: secret tokens, flags). Check [here](https://docs.victoriametrics.com/victoriametrics/#environment-variables)
350
env: []
351
# -- Readiness & Liveness probes
352
probe:
353
# -- VMBackupManager readiness probe
354
readiness:
355
httpGet:
356
port: manager-http
357
initialDelaySeconds: 5
358
periodSeconds: 15
359
timeoutSeconds: 5
360
failureThreshold: 3
361
# -- VMBackupManager liveness probe
362
liveness:
363
tcpSocket:
364
port: manager-http
365
initialDelaySeconds: 30
366
periodSeconds: 30
367
timeoutSeconds: 5
368
failureThreshold: 10
369
# -- VMBackupManager startup probe
370
startup:
371
httpGet:
372
port: manager-http
373
service:
374
# -- Service traffic distribution. Details are [here](https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution)
375
trafficDistribution: ""
376
# -- Service annotations
377
annotations: {}
378
# -- Service labels
379
labels: {}
380
# -- Service ClusterIP
381
clusterIP: "None"
382
# -- Service external IPs. Details are [here](https://kubernetes.io/docs/concepts/services-networking/service/#external-ips)
383
externalIPs: []
384
# -- Service load balancer IP
385
loadBalancerIP: ""
386
# -- Load balancer source range
387
loadBalancerSourceRanges: []
388
# -- Service port
389
servicePort: ""
390
# -- Node port
391
# nodePort: 30000
392
# -- Service type
393
type: ClusterIP
394
# -- Service external traffic policy. Check [here](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip) for details
395
externalTrafficPolicy: ""
396
# -- Health check node port for a service. Check [here](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip) for details
397
healthCheckNodePort: ""
398
# -- Service IP family policy. Check [here](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) for details.
399
ipFamilyPolicy: ""
400
# -- List of service IP families. Check [here](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) for details.
401
ipFamilies: []
402
# -- VictoriaMetrics mode: deployment, statefulSet
403
mode: statefulSet
404
# -- [K8s Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) specific variables
405
deployment:
406
spec:
407
strategy:
408
# Must be "Recreate" when we have a persistent volume
409
type: Recreate
410
# -- [K8s StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) specific variables
411
statefulSet:
412
spec:
413
# -- Deploy order policy for StatefulSet pods
414
podManagementPolicy: OrderedReady
415
# -- StatefulSet update strategy. Check [here](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies) for details.
416
updateStrategy: {}
417
# type: RollingUpdate
418
# -- Pod's termination grace period in seconds
419
terminationGracePeriodSeconds: 60
420
serviceMonitor:
421
# -- Enable deployment of Service Monitor for server component. This is Prometheus operator object
422
enabled: false
423
# -- Service Monitor labels
424
extraLabels: {}
425
# -- Service Monitor annotations
426
annotations: {}
427
# -- Service Monitor path
428
path: ""
429
# -- Basic auth params for Service Monitor
430
basicAuth: {}
431
# -- Commented. Prometheus scrape interval for server component
432
433
# interval: 15s
434
# -- Commented. Prometheus pre-scrape timeout for server component
435
# scrapeTimeout: 5s
436
# -- Commented. HTTP scheme to use for scraping.
437
# scheme: https
438
# -- Commented. TLS configuration to use when scraping the endpoint
439
# tlsConfig:
440
# insecureSkipVerify: true
441
# -- Service Monitor relabelings
442
relabelings: []
443
# -- Service Monitor metricRelabelings
444
metricRelabelings: []
445
# -- Service Monitor port. Uses primary http item name by default
446
port: ""
447
# -- Service Monitor target port. Overrides port when set
448
targetPort: ""
449
# -- Global relabel configuration
450
relabel:
451
enabled: false
452
config: []
453
# -- Use existing configmap if specified
454
# otherwise .config values will be used. Relabel config **should** reside under `relabel.yml` key
455
configMap: ""
456
# Scrape configuration for victoriametrics
457
scrape:
458
# -- If true scrapes targets, creates config map or use specified one with scrape targets
459
enabled: false
460
# -- Use existing configmap if specified
461
# otherwise .config values will be used. Scrape config **should** reside under `scrape.yml` key
462
configMap: ""
463
# -- Scrape config
464
config:
465
global:
466
scrape_interval: 15s
467
# Scrape targets
468
scrape_configs:
469
# Scrape rule for scrape victoriametrics
470
- job_name: victoriametrics
471
static_configs:
472
- targets: ["localhost:8428"]
473
# COPY from Prometheus helm chart https://github.com/helm/charts/blob/master/stable/prometheus/values.yaml
474
475
# Scrape config for API servers.
476
#
477
# Kubernetes exposes API servers as endpoints to the default/kubernetes
478
# service so this uses `endpoints` role and uses relabelling to only keep
479
# the endpoints associated with the default/kubernetes service using the
480
# default named port `https`. This works for single API server deployments as
481
# well as HA API server deployments.
482
- job_name: "kubernetes-apiservers"
483
kubernetes_sd_configs:
484
- role: endpoints
485
# Default to scraping over https. If required, just disable this or change to
486
# `http`.
487
scheme: https
488
# This TLS & bearer token file config is used to connect to the actual scrape
489
# endpoints for cluster components. This is separate to discovery auth
490
# configuration because discovery & scraping are two separate concerns in
491
# Prometheus. The discovery auth config is automatic if Prometheus runs inside
492
# the cluster. Otherwise, more config options have to be provided within the
493
# <kubernetes_sd_config>.
494
tls_config:
495
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
496
# If your node certificates are self-signed or use a different CA to the
497
# master CA, then you need to disable certificate verification. Note that
498
# certificate verification is an integral part of a secure infrastructure
499
# so this should only be disabled in a controlled environment. You can
500
# enable certificate verification by commenting the line below.
501
#
502
insecure_skip_verify: true
503
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
504
# Keep only the default/kubernetes service endpoints for the https port. This
505
# will add targets for each API server which Kubernetes adds an endpoint to
506
# the default/kubernetes service.
507
relabel_configs:
508
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
509
action: keep
510
regex: default;kubernetes;https
511
# Scrape rule using kubernetes service discovery for nodes
512
- job_name: "kubernetes-nodes"
513
# Default to scraping over https. If required, just disable this or change to
514
# `http`.
515
scheme: https
516
# This TLS & bearer token file config is used to connect to the actual scrape
517
# endpoints for cluster components. This is separate to discovery auth
518
# configuration because discovery & scraping are two separate concerns in
519
# Prometheus. The discovery auth config is automatic if Prometheus runs inside
520
# the cluster. Otherwise, more config options have to be provided within the
521
# <kubernetes_sd_config>.
522
tls_config:
523
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
524
# If your node certificates are self-signed or use a different CA to the
525
# master CA, then you need to disable certificate verification. Note that
526
# certificate verification is an integral part of a secure infrastructure
527
# so this should only be disabled in a controlled environment. You can
528
# enable certificate verification by commenting the line below.
529
#
530
insecure_skip_verify: true
531
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
532
kubernetes_sd_configs:
533
- role: node
534
relabel_configs:
535
- action: labelmap
536
regex: __meta_kubernetes_node_label_(.+)
537
# Scrape rule using kubernetes service discovery for cadvisor
538
- job_name: "kubernetes-nodes-cadvisor"
539
# Default to scraping over https. If required, just disable this or change to
540
# `http`.
541
scheme: https
542
# This TLS & bearer token file config is used to connect to the actual scrape
543
# endpoints for cluster components. This is separate to discovery auth
544
# configuration because discovery & scraping are two separate concerns in
545
# Prometheus. The discovery auth config is automatic if Prometheus runs inside
546
# the cluster. Otherwise, more config options have to be provided within the
547
# <kubernetes_sd_config>.
548
tls_config:
549
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
550
# If your node certificates are self-signed or use a different CA to the
551
# master CA, then you need to disable certificate verification. Note that
552
# certificate verification is an integral part of a secure infrastructure
553
# so this should only be disabled in a controlled environment. You can
554
# enable certificate verification by commenting the line below.
555
#
556
insecure_skip_verify: true
557
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
558
kubernetes_sd_configs:
559
- role: node
560
metrics_path: /metrics/cadvisor
561
relabel_configs:
562
- action: labelmap
563
regex: __meta_kubernetes_node_label_(.+)
564
- source_labels: [__metrics_path__]
565
target_label: metrics_path
566
# ignore timestamps of cadvisor's metrics by default
567
# more info here https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4697#issuecomment-1656540535
568
honor_timestamps: false
569
# Scrape config for service endpoints.
570
#
571
# The relabeling allows the actual service scrape endpoint to be configured
572
# via the following annotations:
573
#
574
# * `prometheus.io/scrape`: Only scrape services that have a value of `true`
575
# * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
576
# to set this to `https` & most likely set the `tls_config` of the scrape config.
577
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
578
# * `prometheus.io/port`: If the metrics are exposed on a different port to the
579
# service then set this appropriately.
580
#
581
# Scrape rule using kubernetes service discovery for endpoints
582
- job_name: "kubernetes-service-endpoints"
583
kubernetes_sd_configs:
584
- role: endpoints
585
relabel_configs:
586
- action: drop
587
source_labels: [__meta_kubernetes_pod_container_init]
588
regex: true
589
- action: keep_if_equal
590
source_labels: [__meta_kubernetes_service_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number]
591
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
592
action: keep
593
regex: true
594
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
595
action: replace
596
target_label: __scheme__
597
regex: (https?)
598
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
599
action: replace
600
target_label: __metrics_path__
601
regex: (.+)
602
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
603
action: replace
604
target_label: __address__
605
regex: ([^:]+)(?::\d+)?;(\d+)
606
replacement: $1:$2
607
- action: labelmap
608
regex: __meta_kubernetes_service_label_(.+)
609
- source_labels: [__meta_kubernetes_namespace]
610
action: replace
611
target_label: namespace
612
- source_labels: [__meta_kubernetes_service_name]
613
action: replace
614
target_label: service
615
- source_labels: [__meta_kubernetes_pod_node_name]
616
action: replace
617
target_label: node
618
# Scrape config for slow service endpoints; same as above, but with a larger
619
# timeout and a larger interval
620
#
621
# The relabeling allows the actual service scrape endpoint to be configured
622
# via the following annotations:
623
#
624
# * `prometheus.io/scrape-slow`: Only scrape services that have a value of `true`
625
# * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
626
# to set this to `https` & most likely set the `tls_config` of the scrape config.
627
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
628
# * `prometheus.io/port`: If the metrics are exposed on a different port to the
629
# service then set this appropriately.
630
#
631
- job_name: "kubernetes-service-endpoints-slow"
632
scrape_interval: 5m
633
scrape_timeout: 30s
634
kubernetes_sd_configs:
635
- role: endpoints
636
relabel_configs:
637
- action: drop
638
source_labels: [__meta_kubernetes_pod_container_init]
639
regex: true
640
- action: keep_if_equal
641
source_labels: [__meta_kubernetes_service_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number]
642
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape_slow]
643
action: keep
644
regex: true
645
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
646
action: replace
647
target_label: __scheme__
648
regex: (https?)
649
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
650
action: replace
651
target_label: __metrics_path__
652
regex: (.+)
653
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
654
action: replace
655
target_label: __address__
656
regex: ([^:]+)(?::\d+)?;(\d+)
657
replacement: $1:$2
658
- action: labelmap
659
regex: __meta_kubernetes_service_label_(.+)
660
- source_labels: [__meta_kubernetes_namespace]
661
action: replace
662
target_label: namespace
663
- source_labels: [__meta_kubernetes_service_name]
664
action: replace
665
target_label: service
666
- source_labels: [__meta_kubernetes_pod_node_name]
667
action: replace
668
target_label: node
669
# Example scrape config for probing services via the Blackbox Exporter.
670
#
671
# The relabeling allows the actual service scrape endpoint to be configured
672
# via the following annotations:
673
#
674
# * `prometheus.io/probe`: Only probe services that have a value of `true`
675
#
676
- job_name: "kubernetes-services"
677
metrics_path: /probe
678
params:
679
module: [http_2xx]
680
kubernetes_sd_configs:
681
- role: service
682
relabel_configs:
683
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
684
action: keep
685
regex: true
686
- source_labels: [__address__]
687
target_label: __param_target
688
- target_label: __address__
689
replacement: blackbox
690
- source_labels: [__param_target]
691
target_label: instance
692
- action: labelmap
693
regex: __meta_kubernetes_service_label_(.+)
694
- source_labels: [__meta_kubernetes_namespace]
695
target_label: namespace
696
- source_labels: [__meta_kubernetes_service_name]
697
target_label: service
698
# Example scrape config for pods
699
#
700
# The relabeling allows the actual pod scrape endpoint to be configured via the
701
# following annotations:
702
#
703
# * `prometheus.io/scrape`: Only scrape pods that have a value of `true`
704
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
705
# * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
706
#
707
- job_name: "kubernetes-pods"
708
kubernetes_sd_configs:
709
- role: pod
710
relabel_configs:
711
- action: drop
712
source_labels: [__meta_kubernetes_pod_container_init]
713
regex: true
714
- action: keep_if_equal
715
source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number]
716
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
717
action: keep
718
regex: true
719
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
720
action: replace
721
target_label: __metrics_path__
722
regex: (.+)
723
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
724
action: replace
725
regex: ([^:]+)(?::\d+)?;(\d+)
726
replacement: $1:$2
727
target_label: __address__
728
- action: labelmap
729
regex: __meta_kubernetes_pod_label_(.+)
730
- source_labels: [__meta_kubernetes_namespace]
731
action: replace
732
target_label: namespace
733
- source_labels: [__meta_kubernetes_pod_name]
734
action: replace
735
target_label: pod
736
# End of COPY
737
# -- Extra scrape configs that will be appended to `server.scrape.config`
738
extraScrapeConfigs: []
739
# - job_name: 'prometheus-blackbox-exporter'
740
# metrics_path: /probe
741
# params:
742
# module: [http_2xx]
743
# static_configs:
744
# - targets:
745
# - https://example.com
746
# relabel_configs:
747
# - source_labels: [__address__]
748
# target_label: __param_target
749
# - source_labels: [__param_target]
750
# target_label: instance
751
# - target_label: __address__
752
# replacement: prometheus-blackbox-exporter:9115
753
# -- Add extra specs dynamically to this chart
754
extraObjects: []
755
# -- Enterprise license key configuration for VictoriaMetrics enterprise.
756
# Required only for VictoriaMetrics enterprise. Check docs [here](https://docs.victoriametrics.com/victoriametrics/enterprise/),
757
# for more information, visit [site](https://victoriametrics.com/products/enterprise/).
758
# Request a trial license [here](https://victoriametrics.com/products/enterprise/trial/)
759
# Supported starting from VictoriaMetrics v1.94.0
760
license:
761
# -- License key
762
key: ""
763
# -- Use existing secret with license key
764
secret:
765
# -- Existing secret name
766
name: ""
767
# -- Key in secret with license key
768
key: ""
769

The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.