DirectorySecurity AdvisoriesPricing
Sign in
Directory
victoria-metrics-agent logoHELM

victoria-metrics-agent

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-agent.
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
# -- Replica count
24
replicaCount: 1
25
# -- Specify pod lifecycle
26
lifecycle: {}
27
# -- Use an alternate scheduler, e.g. "stork". Check details [here](https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/)
28
schedulerName: ""
29
# -- VMAgent mode: daemonSet, deployment, statefulSet
30
mode: deployment
31
# -- [K8s DaemonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) specific variables
32
daemonSet:
33
spec: {}
34
# -- [K8s Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) specific variables
35
deployment:
36
spec:
37
# -- Deployment strategy. Check [here](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) for details
38
strategy: {}
39
# rollingUpdate:
40
# maxSurge: 25%
41
# maxUnavailable: 25%
42
# type: RollingUpdate
43
# -- [K8s StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) specific variables
44
statefulSet:
45
# -- create cluster of vmagents. Check [here](https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-big-number-of-targets)
46
# available since [v1.77.2](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.77.2)
47
clusterMode: false
48
# -- replication factor for vmagent in cluster mode
49
replicationFactor: 1
50
spec:
51
# -- StatefulSet update strategy. Check [here](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies) for details.
52
updateStrategy: {}
53
# type: RollingUpdate
54
image:
55
# -- Image registry
56
registry: cgr.dev
57
# -- Image repository
58
repository: scratch-images/test-tmp/victoriametrics-vmagent
59
# -- Image tag, set to `Chart.AppVersion` by default
60
tag: 1.151.0-r1@sha256:8031e22c9f700efba092a63d29800883c9373ac56b92a3ac1620808766d0aad2
61
# -- Variant of the image to use.
62
# e.g. enterprise, scratch
63
variant: ""
64
# -- Image pull policy
65
pullPolicy: IfNotPresent
66
# -- Override default container command. Use when the VictoriaMetrics binary is available at a custom path
67
command: []
68
# -- Image pull secrets
69
imagePullSecrets: []
70
# -- Add additional DNS entries to pods hosts file. Check [official documentation](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/)
71
hostAliases: []
72
# - ip: 192.168.1.1
73
# hostNames:
74
# - test.example.com
75
# - another.example.net
76
77
# -- Override chart name
78
nameOverride: ""
79
# -- Override resources fullname
80
fullnameOverride: ""
81
# -- Container working directory
82
containerWorkingDir: "/"
83
rbac:
84
# -- Enables Role/RoleBinding creation
85
create: true
86
# -- Role/RoleBinding annotations
87
annotations: {}
88
# -- Role/RoleBinding labels
89
extraLabels: {}
90
# -- If true and `rbac.enabled`, will deploy a Role/RoleBinding instead of a ClusterRole/ClusterRoleBinding
91
namespaced: false
92
# -- additional rules for a role
93
extraRules: []
94
serviceAccount:
95
# -- Specifies whether a service account should be created
96
create: true
97
# -- Annotations to add to the service account
98
annotations: {}
99
# -- The name of the service account to use.
100
# If not set and create is true, a name is generated using the fullname template
101
name:
102
# -- mount API token to pod directly
103
automountToken: true
104
# -- See `kubectl explain poddisruptionbudget.spec` for more or check [official documentation](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
105
podDisruptionBudget:
106
enabled: false
107
# -- min number or percentage of pods that can be unavailable
108
minAvailable: 0
109
# -- max number or percentage of pods that can be unavailable
110
maxUnavailable: 0
111
# -- Defines criteria when unhealthy pods should be considered for eviction
112
unhealthyPodEvictionPolicy:
113
labels: {}
114
# -- See `kubectl explain networkpolicy.spec` for more. Details are [here](https://kubernetes.io/docs/concepts/services-networking/network-policies/)
115
networkPolicy:
116
enabled: false
117
# -- Ingress rules
118
ingress: []
119
# -- Egress rules
120
egress: []
121
# -- Extra labels for NetworkPolicy
122
labels: {}
123
# -- Extra annotations for NetworkPolicy
124
annotations: {}
125
# -- Generates `remoteWrite.*` flags and config maps with value content for values, that are of type list of map.
126
# Each item should contain `url` param to pass validation.
127
remoteWrite: []
128
# - url: http://vm-insert:8480/insert/0/prometheus
129
# urlRelabelConfig:
130
# - action: keep
131
# source_labels: [env]
132
# regex: "dev"
133
# - url: http://prometheus:8480/insert/0/prometheus
134
135
# -- HTTP listen address configuration. See https://docs.victoriametrics.com/helm/victoria-metrics-agent/#http-listen-address for details.
136
http:
137
- name: http
138
value: :8429
139
primary: true
140
# -- VMAgent extra command line arguments
141
extraArgs:
142
envflag.enable: true
143
envflag.prefix: VM_
144
loggerFormat: json
145
# Enable IPv6 support. Useful for running in IPv6-only Kubernetes clusters
146
# enableTCP6: true
147
# promscrape.maxScrapeSize: "167772160"
148
# Uncomment and specify the port if you want to support any of the protocols:
149
# https://docs.victoriametrics.com/victoriametrics/vmagent/#features
150
# graphiteListenAddr: ":2003"
151
# influxListenAddr: ":8189"
152
# opentsdbHTTPListenAddr: ":4242"
153
# opentsdbListenAddr: ":4242"
154
155
# -- Additional environment variables (ex.: secret tokens, flags). Check [here](https://docs.victoriametrics.com/victoriametrics/#environment-variables) for more details.
156
env: []
157
# - name: VM_remoteWrite_basicAuth_password
158
# valueFrom:
159
# secretKeyRef:
160
# name: auth-secret
161
# key: password
162
163
# -- Specify alternative source for env variables
164
envFrom: []
165
#- configMapRef:
166
# name: special-config
167
168
# -- Extra labels for Deployment and Statefulset
169
extraLabels: {}
170
# -- Extra labels for Pods only
171
podLabels: {}
172
# -- Extra selector labels common for pod and service
173
selectorLabels: {}
174
# -- Additional hostPath mounts
175
extraHostPathMounts: []
176
# - name: certs-dir
177
# mountPath: /etc/kubernetes/certs
178
# subPath: ""
179
# hostPath: /etc/kubernetes/certs
180
# readOnly: true
181
182
# -- Extra Volumes for the pod
183
extraVolumes: []
184
# - name: example
185
# configMap:
186
# name: example
187
188
# -- Extra Volume Mounts for the container
189
extraVolumeMounts: []
190
# - name: example
191
# mountPath: /example
192
193
# -- Extra containers to run in a pod with vmagent
194
extraContainers: []
195
# - name: config-reloader
196
# image: reloader-image
197
198
# -- Init containers for vmagent
199
initContainers: []
200
# - name: example
201
# image: example-image
202
203
# -- Security context to be added to pod
204
podSecurityContext:
205
enabled: true
206
# fsGroup: 2000
207
# -- Security context to be added to pod's containers
208
securityContext:
209
enabled: true
210
# capabilities:
211
# drop:
212
# - ALL
213
# readOnlyRootFilesystem: true
214
# runAsNonRoot: true
215
# runAsUser: 1000
216
service:
217
# -- Enable agent service
218
enabled: false
219
# -- Service annotations
220
annotations: {}
221
# -- Service labels
222
extraLabels: {}
223
# -- Service ClusterIP
224
clusterIP: ""
225
# -- Service external IPs. Check [here](https://kubernetes.io/docs/concepts/services-networking/service/#external-ips) for details
226
externalIPs: []
227
# -- Service load balancer IP
228
loadBalancerIP: ""
229
# -- Load balancer source range
230
loadBalancerSourceRanges: []
231
# -- Service port
232
servicePort: ""
233
# nodePort: 30000
234
# -- Service type
235
type: ClusterIP
236
# -- Service IP family policy. Check [here](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) for details.
237
ipFamilyPolicy: ""
238
# -- List of service IP families. Check [here](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) for details.
239
ipFamilies: []
240
# -- 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
241
externalTrafficPolicy: ""
242
# -- Service internal traffic policy. Check [here](https://kubernetes.io/docs/concepts/services-networking/service/#traffic-policies) for details
243
internalTrafficPolicy: ""
244
# -- 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
245
healthCheckNodePort: ""
246
# -- Traffic Distribution. Check [Traffic distribution](https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution)
247
trafficDistribution: ""
248
# -- Extra selector labels common for service only
249
selectorLabels: {}
250
route:
251
# -- Enable deployment of HTTPRoute for VMAgent
252
enabled: false
253
# -- HTTPRoute annotations
254
annotations: {}
255
# -- HTTPRoute extra labels
256
extraLabels: {}
257
# -- HTTPGateway objects refs
258
parentRefs: []
259
# -- Array of hostnames
260
hostnames: []
261
# -- Extra rules to prepend to route. This is useful when working with annotation based services.
262
extraRules: []
263
# -- Filters for a default rule in HTTPRoute
264
filters: []
265
# -- Matches for a default rule in HTTPRoute
266
matches:
267
- path:
268
type: PathPrefix
269
value: /
270
ingress:
271
# -- Enable deployment of ingress for agent
272
enabled: false
273
# -- Ingress annotations
274
annotations: {}
275
# kubernetes.io/ingress.class: nginx
276
# kubernetes.io/tls-acme: 'true'
277
278
# -- Ingress extra labels
279
extraLabels: {}
280
# -- Array of host objects
281
hosts:
282
- name: vmagent.local
283
path:
284
- /
285
port: http
286
# -- Array of TLS objects
287
tls: []
288
# - secretName: vmagent-ingress-tls
289
# hosts:
290
# - vmagent.local
291
292
# -- Ingress controller class name
293
ingressClassName: ""
294
# -- Ingress path type
295
pathType: Prefix
296
# -- Resource object. Details are [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
297
resources: {}
298
# We usually recommend not to specify default resources and to leave this as a conscious
299
# choice for the user. This also increases chances charts run on environments with little
300
# resources, such as Minikube. If you do want to specify resources, uncomment the following
301
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
302
# limits:
303
# cpu: 100m
304
# memory: 128Mi
305
# requests:
306
# cpu: 100m
307
# memory: 128Mi
308
309
# -- Annotations to be added to the deployment
310
annotations: {}
311
# -- Annotations to be added to pod
312
podAnnotations: {}
313
# -- Pod's node selector. Details are [here](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)
314
nodeSelector: {}
315
# -- Node tolerations for server scheduling to nodes with taints. Details are [here](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/)
316
tolerations: []
317
# -- Pod topologySpreadConstraints
318
topologySpreadConstraints: []
319
# - maxSkew: 1
320
# topologyKey: topology.kubernetes.io/zone
321
# whenUnsatisfiable: DoNotSchedule
322
323
# -- Pod affinity
324
affinity: {}
325
# -- VMAgent [scraping configuration](https://docs.victoriametrics.com/victoriametrics/vmagent/#how-to-collect-metrics-in-prometheus-format)
326
# use existing configmap if specified
327
# otherwise .config values will be used
328
configMap: ""
329
# -- Priority class to be assigned to the pod(s)
330
priorityClassName: ""
331
# -- Name of the [RuntimeClass](https://kubernetes.io/docs/concepts/containers/runtime-class/) used to run the pod, e.g. "gvisor"
332
runtimeClassName: ""
333
# -- Enable the host network
334
hostNetwork: false
335
# -- Custom DNS config for pod. Details are [here](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-config)
336
dnsConfig: {}
337
# -- DNS policy for pod. If not set and hostNetwork is enabled, defaults to ClusterFirstWithHostNet.
338
# @default -- ""
339
dnsPolicy: ""
340
serviceMonitor:
341
# -- Enable deployment of Service Monitor for server component. This is Prometheus operator object
342
enabled: false
343
# -- Service Monitor labels
344
extraLabels: {}
345
# -- Service Monitor annotations
346
annotations: {}
347
# -- Service Monitor relabelings
348
relabelings: []
349
# -- Basic auth params for Service Monitor
350
basicAuth: {}
351
# -- Service Monitor metricRelabelings
352
metricRelabelings: []
353
# -- Service Monitor port. Uses primary http item name by default
354
port: ""
355
# -- Service Monitor target port. Overrides port when set
356
targetPort: ""
357
# interval: 15s
358
# scrapeTimeout: 5s
359
# -- Commented. HTTP scheme to use for scraping.
360
# scheme: https
361
# -- Commented. TLS configuration to use when scraping the endpoint
362
# tlsConfig:
363
# insecureSkipVerify: true
364
# -- Empty dir configuration for a case, when persistence is disabled
365
emptyDir: {}
366
persistentVolume:
367
# -- Create/use Persistent Volume Claim for server component. Empty dir if false
368
enabled: false
369
# -- Override Persistent Volume Claim name
370
name: ""
371
# -- StorageClass to use for persistent volume. Requires server.persistentVolume.enabled: true. If defined, PVC created automatically
372
storageClassName: ""
373
# -- Array of access modes. Must match those of existing PV or dynamic provisioner. Details are [here](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
374
accessModes:
375
- ReadWriteOnce
376
# -- VolumeClassAttribute to user for persistent volume
377
volumeAttributesClassName:
378
# -- Size of the volume. Should be calculated based on the logs you send and retention policy you set.
379
size: 10Gi
380
# -- Persistent volume annotations
381
annotations: {}
382
# -- Persistent volume additional labels
383
extraLabels: {}
384
# -- Existing Claim name. If defined, PVC must be created manually before volume will be bound
385
existingClaim: ""
386
# -- Bind Persistent Volume by labels. Must match all labels of targeted PV.
387
matchLabels: {}
388
# -- Horizontal Pod Autoscaler.
389
# Note that it is not intended to be used for vmagents which perform scraping.
390
# In order to scale scraping vmagents check [here](https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-big-number-of-targets)
391
horizontalPodAutoscaler:
392
# -- Use HPA for vmagent
393
enabled: false
394
# -- Maximum replicas for HPA to use to to scale vmagent
395
maxReplicas: 10
396
# -- Minimum replicas for HPA to use to scale vmagent
397
minReplicas: 1
398
# -- Metric for HPA to use to scale vmagent
399
metrics: []
400
# -- Vertical Pod Autoscaler.
401
# Requires VPA CRD (`autoscaling.k8s.io/v1`) to be installed in the cluster.
402
# Note that VPA should not be used together with HPA on the same resource metrics (CPU/memory).
403
verticalPodAutoscaler:
404
# -- Use VPA for vmagent
405
enabled: false
406
# -- List of custom recommenders to use
407
# recommenders:
408
# - name: 'alternative'
409
# -- Update policy for VPA
410
# updatePolicy:
411
# updateMode: "Auto"
412
# minReplicas: 1
413
# -- Resource policy for VPA
414
# resourcePolicy:
415
# containerPolicies:
416
# - containerName: '*'
417
# minAllowed:
418
# cpu: 100m
419
# memory: 128Mi
420
# maxAllowed:
421
# cpu: 1
422
# memory: 500Mi
423
# controlledResources: ["cpu", "memory"]
424
# -- VMAgent scrape configuration
425
config:
426
# -- Enable config templating
427
useTpl: false
428
global:
429
scrape_interval: 10s
430
scrape_configs:
431
- job_name: vmagent
432
static_configs:
433
- targets: ["localhost:8429"]
434
## COPY from Prometheus helm chart https://github.com/helm/charts/blob/master/stable/prometheus/values.yaml
435
436
# Scrape config for API servers.
437
#
438
# Kubernetes exposes API servers as endpoints to the default/kubernetes
439
# service so this uses `endpoints` role and uses relabelling to only keep
440
# the endpoints associated with the default/kubernetes service using the
441
# default named port `https`. This works for single API server deployments as
442
# well as HA API server deployments.
443
- job_name: "kubernetes-apiservers"
444
kubernetes_sd_configs:
445
- role: endpoints
446
# Default to scraping over https. If required, just disable this or change to
447
# `http`.
448
scheme: https
449
# This TLS & bearer token file config is used to connect to the actual scrape
450
# endpoints for cluster components. This is separate to discovery auth
451
# configuration because discovery & scraping are two separate concerns in
452
# Prometheus. The discovery auth config is automatic if Prometheus runs inside
453
# the cluster. Otherwise, more config options have to be provided within the
454
# <kubernetes_sd_config>.
455
tls_config:
456
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
457
# If your node certificates are self-signed or use a different CA to the
458
# master CA, then you need to disable certificate verification. Note that
459
# certificate verification is an integral part of a secure infrastructure
460
# so this should only be disabled in a controlled environment. You can
461
# enable certificate verification by commenting the line below.
462
#
463
insecure_skip_verify: true
464
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
465
# Keep only the default/kubernetes service endpoints for the https port. This
466
# will add targets for each API server which Kubernetes adds an endpoint to
467
# the default/kubernetes service.
468
relabel_configs:
469
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
470
action: keep
471
regex: default;kubernetes;https
472
- job_name: "kubernetes-nodes"
473
# Default to scraping over https. If required, just disable this or change to
474
# `http`.
475
scheme: https
476
# This TLS & bearer token file config is used to connect to the actual scrape
477
# endpoints for cluster components. This is separate to discovery auth
478
# configuration because discovery & scraping are two separate concerns in
479
# Prometheus. The discovery auth config is automatic if Prometheus runs inside
480
# the cluster. Otherwise, more config options have to be provided within the
481
# <kubernetes_sd_config>.
482
tls_config:
483
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
484
# If your node certificates are self-signed or use a different CA to the
485
# master CA, then you need to disable certificate verification. Note that
486
# certificate verification is an integral part of a secure infrastructure
487
# so this should only be disabled in a controlled environment. You can
488
# enable certificate verification by commenting the line below.
489
#
490
insecure_skip_verify: true
491
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
492
kubernetes_sd_configs:
493
- role: node
494
relabel_configs:
495
- action: labelmap
496
regex: __meta_kubernetes_node_label_(.+)
497
- job_name: "kubernetes-nodes-cadvisor"
498
# Default to scraping over https. If required, just disable this or change to
499
# `http`.
500
scheme: https
501
# This TLS & bearer token file config is used to connect to the actual scrape
502
# endpoints for cluster components. This is separate to discovery auth
503
# configuration because discovery & scraping are two separate concerns in
504
# Prometheus. The discovery auth config is automatic if Prometheus runs inside
505
# the cluster. Otherwise, more config options have to be provided within the
506
# <kubernetes_sd_config>.
507
tls_config:
508
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
509
# If your node certificates are self-signed or use a different CA to the
510
# master CA, then you need to disable certificate verification. Note that
511
# certificate verification is an integral part of a secure infrastructure
512
# so this should only be disabled in a controlled environment. You can
513
# enable certificate verification by commenting the line below.
514
#
515
insecure_skip_verify: true
516
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
517
kubernetes_sd_configs:
518
- role: node
519
# This configuration will work only on kubelet 1.7.3+
520
# As the scrape endpoints for cAdvisor have changed
521
# if you are using older version you need to change the replacement to
522
# replacement: /api/v1/nodes/$1:4194/proxy/metrics
523
# more info here https://github.com/coreos/prometheus-operator/issues/633
524
metrics_path: /metrics/cadvisor
525
relabel_configs:
526
- action: labelmap
527
regex: __meta_kubernetes_node_label_(.+)
528
# ignore timestamps of cadvisor's metrics by default
529
# more info here https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4697#issuecomment-1656540535
530
honor_timestamps: false
531
# Scrape config for service endpoints.
532
#
533
# The relabeling allows the actual service scrape endpoint to be configured
534
# via the following annotations:
535
#
536
# * `prometheus.io/scrape`: Only scrape services that have a value of `true`
537
# * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
538
# to set this to `https` & most likely set the `tls_config` of the scrape config.
539
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
540
# * `prometheus.io/port`: If the metrics are exposed on a different port to the
541
# service then set this appropriately.
542
#
543
- job_name: "kubernetes-service-endpoints"
544
kubernetes_sd_configs:
545
- role: endpointslices
546
relabel_configs:
547
- action: drop
548
source_labels: [__meta_kubernetes_pod_container_init]
549
regex: true
550
- action: keep_if_equal
551
source_labels: [__meta_kubernetes_service_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number]
552
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
553
action: keep
554
regex: true
555
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
556
action: replace
557
target_label: __scheme__
558
regex: (https?)
559
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
560
action: replace
561
target_label: __metrics_path__
562
regex: (.+)
563
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
564
action: replace
565
target_label: __address__
566
regex: ([^:]+)(?::\d+)?;(\d+)
567
replacement: $1:$2
568
- action: labelmap
569
regex: __meta_kubernetes_service_label_(.+)
570
- source_labels: [__meta_kubernetes_pod_name]
571
target_label: pod
572
- source_labels: [__meta_kubernetes_pod_container_name]
573
target_label: container
574
- source_labels: [__meta_kubernetes_namespace]
575
target_label: namespace
576
- source_labels: [__meta_kubernetes_service_name]
577
target_label: service
578
- source_labels: [__meta_kubernetes_service_name]
579
target_label: job
580
replacement: ${1}
581
- source_labels: [__meta_kubernetes_pod_node_name]
582
action: replace
583
target_label: node
584
# Scrape config for slow service endpoints; same as above, but with a larger
585
# timeout and a larger interval
586
#
587
# The relabeling allows the actual service scrape endpoint to be configured
588
# via the following annotations:
589
#
590
# * `prometheus.io/scrape-slow`: Only scrape services that have a value of `true`
591
# * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
592
# to set this to `https` & most likely set the `tls_config` of the scrape config.
593
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
594
# * `prometheus.io/port`: If the metrics are exposed on a different port to the
595
# service then set this appropriately.
596
#
597
- job_name: "kubernetes-service-endpoints-slow"
598
scrape_interval: 5m
599
scrape_timeout: 30s
600
kubernetes_sd_configs:
601
- role: endpointslices
602
relabel_configs:
603
- action: drop
604
source_labels: [__meta_kubernetes_pod_container_init]
605
regex: true
606
- action: keep_if_equal
607
source_labels: [__meta_kubernetes_service_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number]
608
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape_slow]
609
action: keep
610
regex: true
611
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
612
action: replace
613
target_label: __scheme__
614
regex: (https?)
615
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
616
action: replace
617
target_label: __metrics_path__
618
regex: (.+)
619
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
620
action: replace
621
target_label: __address__
622
regex: ([^:]+)(?::\d+)?;(\d+)
623
replacement: $1:$2
624
- action: labelmap
625
regex: __meta_kubernetes_service_label_(.+)
626
- source_labels: [__meta_kubernetes_pod_name]
627
target_label: pod
628
- source_labels: [__meta_kubernetes_pod_container_name]
629
target_label: container
630
- source_labels: [__meta_kubernetes_namespace]
631
target_label: namespace
632
- source_labels: [__meta_kubernetes_service_name]
633
target_label: service
634
- source_labels: [__meta_kubernetes_service_name]
635
target_label: job
636
replacement: ${1}
637
- source_labels: [__meta_kubernetes_pod_node_name]
638
action: replace
639
target_label: node
640
# Example scrape config for probing services via the Blackbox Exporter.
641
#
642
# The relabeling allows the actual service scrape endpoint to be configured
643
# via the following annotations:
644
#
645
# * `prometheus.io/probe`: Only probe services that have a value of `true`
646
#
647
- job_name: "kubernetes-services"
648
metrics_path: /probe
649
params:
650
module: [http_2xx]
651
kubernetes_sd_configs:
652
- role: service
653
relabel_configs:
654
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
655
action: keep
656
regex: true
657
- source_labels: [__address__]
658
target_label: __param_target
659
- target_label: __address__
660
replacement: blackbox
661
- source_labels: [__param_target]
662
target_label: instance
663
- action: labelmap
664
regex: __meta_kubernetes_service_label_(.+)
665
- source_labels: [__meta_kubernetes_namespace]
666
target_label: namespace
667
- source_labels: [__meta_kubernetes_service_name]
668
target_label: service
669
# Example scrape config for pods
670
#
671
# The relabeling allows the actual pod scrape endpoint to be configured via the
672
# following annotations:
673
#
674
# * `prometheus.io/scrape`: Only scrape pods that have a value of `true`
675
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
676
# * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
677
#
678
- job_name: "kubernetes-pods"
679
kubernetes_sd_configs:
680
- role: pod
681
relabel_configs:
682
- action: drop
683
source_labels: [__meta_kubernetes_pod_container_init]
684
regex: true
685
- action: keep_if_equal
686
source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number]
687
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
688
action: keep
689
regex: true
690
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
691
action: replace
692
target_label: __metrics_path__
693
regex: (.+)
694
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
695
action: replace
696
regex: ([^:]+)(?::\d+)?;(\d+)
697
replacement: $1:$2
698
target_label: __address__
699
- action: labelmap
700
regex: __meta_kubernetes_pod_label_(.+)
701
- source_labels: [__meta_kubernetes_pod_name]
702
target_label: pod
703
- source_labels: [__meta_kubernetes_pod_container_name]
704
target_label: container
705
- source_labels: [__meta_kubernetes_namespace]
706
target_label: namespace
707
- source_labels: [__meta_kubernetes_pod_node_name]
708
action: replace
709
target_label: node
710
## End of COPY
711
# -- Extra scrape configs that will be appended to `config`
712
extraScrapeConfigs: []
713
probe:
714
# -- Readiness probe
715
readiness:
716
httpGet: {}
717
initialDelaySeconds: 5
718
periodSeconds: 15
719
# -- Liveness probe
720
liveness:
721
tcpSocket: {}
722
initialDelaySeconds: 5
723
periodSeconds: 15
724
timeoutSeconds: 5
725
# -- Startup probe
726
startup: {}
727
# -- Add extra specs dynamically to this chart
728
extraObjects: []
729
allowedMetricsEndpoints:
730
- /metrics
731
# -- Enterprise license key configuration for VictoriaMetrics enterprise.
732
# Required only for VictoriaMetrics enterprise. Check docs [here](https://docs.victoriametrics.com/victoriametrics/enterprise/),
733
# for more information, visit [site](https://victoriametrics.com/products/enterprise/).
734
# Request a trial license [here](https://victoriametrics.com/products/enterprise/trial/)
735
# Supported starting from VictoriaMetrics v1.94.0
736
license:
737
# -- License key
738
key: ""
739
# -- Use existing secret with license key
740
secret:
741
# -- Existing secret name
742
name: ""
743
# -- Key in secret with license key
744
key: ""
745

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.