1# Default values for victoria-metrics-agent.
2# This is a YAML-formatted file.
3# Declare variables to be passed into your templates.
5 # -- Image pull secrets, that can be shared across multiple helm charts
8 # -- Image registry, that can be shared across multiple helm charts
10 # -- Openshift security context compatibility configuration
13 adaptSecurityContext: "auto"
14 # -- Automount OpenShift service signing CA into the pod
15 automountServiceSigningCA: "auto"
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
21 # -- Annotations added to all resources
25# -- Specify pod lifecycle
27# -- Use an alternate scheduler, e.g. "stork". Check details [here](https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/)
29# -- VMAgent mode: daemonSet, deployment, statefulSet
31# -- [K8s DaemonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) specific variables
34# -- [K8s Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) specific variables
37 # -- Deployment strategy. Check [here](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) for details
43# -- [K8s StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) specific variables
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)
48 # -- replication factor for vmagent in cluster mode
51 # -- StatefulSet update strategy. Check [here](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies) for details.
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
64 # -- Image pull policy
65 pullPolicy: IfNotPresent
66# -- Override default container command. Use when the VictoriaMetrics binary is available at a custom path
68# -- Image pull secrets
70# -- Add additional DNS entries to pods hosts file. Check [official documentation](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/)
75# - another.example.net
77# -- Override chart name
79# -- Override resources fullname
81# -- Container working directory
82containerWorkingDir: "/"
84 # -- Enables Role/RoleBinding creation
86 # -- Role/RoleBinding annotations
88 # -- Role/RoleBinding labels
90 # -- If true and `rbac.enabled`, will deploy a Role/RoleBinding instead of a ClusterRole/ClusterRoleBinding
92 # -- additional rules for a role
95 # -- Specifies whether a service account should be created
97 # -- Annotations to add to the service account
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
102 # -- mount API token to pod directly
104# -- See `kubectl explain poddisruptionbudget.spec` for more or check [official documentation](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
107 # -- min number or percentage of pods that can be unavailable
109 # -- max number or percentage of pods that can be unavailable
111 # -- Defines criteria when unhealthy pods should be considered for eviction
112 unhealthyPodEvictionPolicy:
114# -- See `kubectl explain networkpolicy.spec` for more. Details are [here](https://kubernetes.io/docs/concepts/services-networking/network-policies/)
121 # -- Extra labels for NetworkPolicy
123 # -- Extra annotations for NetworkPolicy
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.
128# - url: http://vm-insert:8480/insert/0/prometheus
131# source_labels: [env]
133# - url: http://prometheus:8480/insert/0/prometheus
135# -- HTTP listen address configuration. See https://docs.victoriametrics.com/helm/victoria-metrics-agent/#http-listen-address for details.
140# -- VMAgent extra command line arguments
145 # Enable IPv6 support. Useful for running in IPv6-only Kubernetes clusters
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"
155# -- Additional environment variables (ex.: secret tokens, flags). Check [here](https://docs.victoriametrics.com/victoriametrics/#environment-variables) for more details.
157# - name: VM_remoteWrite_basicAuth_password
163# -- Specify alternative source for env variables
166# name: special-config
168# -- Extra labels for Deployment and Statefulset
170# -- Extra labels for Pods only
172# -- Extra selector labels common for pod and service
174# -- Additional hostPath mounts
175extraHostPathMounts: []
177# mountPath: /etc/kubernetes/certs
179# hostPath: /etc/kubernetes/certs
182# -- Extra Volumes for the pod
188# -- Extra Volume Mounts for the container
193# -- Extra containers to run in a pod with vmagent
195# - name: config-reloader
196# image: reloader-image
198# -- Init containers for vmagent
201# image: example-image
203# -- Security context to be added to pod
207# -- Security context to be added to pod's containers
213 # readOnlyRootFilesystem: true
217 # -- Enable agent service
219 # -- Service annotations
223 # -- Service ClusterIP
225 # -- Service external IPs. Check [here](https://kubernetes.io/docs/concepts/services-networking/service/#external-ips) for details
227 # -- Service load balancer IP
229 # -- Load balancer source range
230 loadBalancerSourceRanges: []
236 # -- Service IP family policy. Check [here](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) for details.
238 # -- List of service IP families. Check [here](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) for details.
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
251 # -- Enable deployment of HTTPRoute for VMAgent
253 # -- HTTPRoute annotations
255 # -- HTTPRoute extra labels
257 # -- HTTPGateway objects refs
259 # -- Array of hostnames
261 # -- Extra rules to prepend to route. This is useful when working with annotation based services.
263 # -- Filters for a default rule in HTTPRoute
265 # -- Matches for a default rule in HTTPRoute
271 # -- Enable deployment of ingress for agent
273 # -- Ingress annotations
275 # kubernetes.io/ingress.class: nginx
276 # kubernetes.io/tls-acme: 'true'
278 # -- Ingress extra labels
280 # -- Array of host objects
282 - name: vmagent.local
286 # -- Array of TLS objects
288 # - secretName: vmagent-ingress-tls
292 # -- Ingress controller class name
294 # -- Ingress path type
296# -- Resource object. Details are [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
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:'.
309# -- Annotations to be added to the deployment
311# -- Annotations to be added to pod
313# -- Pod's node selector. Details are [here](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)
315# -- Node tolerations for server scheduling to nodes with taints. Details are [here](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/)
317# -- Pod topologySpreadConstraints
318topologySpreadConstraints: []
320# topologyKey: topology.kubernetes.io/zone
321# whenUnsatisfiable: DoNotSchedule
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
329# -- Priority class to be assigned to the pod(s)
331# -- Name of the [RuntimeClass](https://kubernetes.io/docs/concepts/containers/runtime-class/) used to run the pod, e.g. "gvisor"
333# -- Enable the host network
335# -- Custom DNS config for pod. Details are [here](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-config)
337# -- DNS policy for pod. If not set and hostNetwork is enabled, defaults to ClusterFirstWithHostNet.
341 # -- Enable deployment of Service Monitor for server component. This is Prometheus operator object
343 # -- Service Monitor labels
345 # -- Service Monitor annotations
347 # -- Service Monitor relabelings
349 # -- Basic auth params for Service Monitor
351 # -- Service Monitor metricRelabelings
352 metricRelabelings: []
353 # -- Service Monitor port. Uses primary http item name by default
355 # -- Service Monitor target port. Overrides port when set
359 # -- Commented. HTTP scheme to use for scraping.
361 # -- Commented. TLS configuration to use when scraping the endpoint
363 # insecureSkipVerify: true
364# -- Empty dir configuration for a case, when persistence is disabled
367 # -- Create/use Persistent Volume Claim for server component. Empty dir if false
369 # -- Override Persistent Volume Claim name
371 # -- StorageClass to use for persistent volume. Requires server.persistentVolume.enabled: true. If defined, PVC created automatically
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/)
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.
380 # -- Persistent volume annotations
382 # -- Persistent volume additional labels
384 # -- Existing Claim name. If defined, PVC must be created manually before volume will be bound
386 # -- Bind Persistent Volume by labels. Must match all labels of targeted PV.
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)
391horizontalPodAutoscaler:
392 # -- Use HPA for vmagent
394 # -- Maximum replicas for HPA to use to to scale vmagent
396 # -- Minimum replicas for HPA to use to scale vmagent
398 # -- Metric for HPA to use to scale vmagent
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).
403verticalPodAutoscaler:
404 # -- Use VPA for vmagent
406 # -- List of custom recommenders to use
408 # - name: 'alternative'
409 # -- Update policy for VPA
413 # -- Resource policy for VPA
416 # - containerName: '*'
423 # controlledResources: ["cpu", "memory"]
424# -- VMAgent scrape configuration
426 # -- Enable config templating
433 - targets: ["localhost:8429"]
434 ## COPY from Prometheus helm chart https://github.com/helm/charts/blob/master/stable/prometheus/values.yaml
436 # Scrape config for API servers.
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:
446 # Default to scraping over https. If required, just disable this or change to
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>.
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.
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.
469 - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
471 regex: default;kubernetes;https
472 - job_name: "kubernetes-nodes"
473 # Default to scraping over https. If required, just disable this or change to
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>.
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.
490 insecure_skip_verify: true
491 bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
492 kubernetes_sd_configs:
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
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>.
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.
515 insecure_skip_verify: true
516 bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
517 kubernetes_sd_configs:
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
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.
533 # The relabeling allows the actual service scrape endpoint to be configured
534 # via the following annotations:
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.
543 - job_name: "kubernetes-service-endpoints"
544 kubernetes_sd_configs:
545 - role: endpointslices
548 source_labels: [__meta_kubernetes_pod_container_init]
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]
555 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
557 target_label: __scheme__
559 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
561 target_label: __metrics_path__
563 - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
565 target_label: __address__
566 regex: ([^:]+)(?::\d+)?;(\d+)
569 regex: __meta_kubernetes_service_label_(.+)
570 - source_labels: [__meta_kubernetes_pod_name]
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]
581 - source_labels: [__meta_kubernetes_pod_node_name]
584 # Scrape config for slow service endpoints; same as above, but with a larger
585 # timeout and a larger interval
587 # The relabeling allows the actual service scrape endpoint to be configured
588 # via the following annotations:
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.
597 - job_name: "kubernetes-service-endpoints-slow"
600 kubernetes_sd_configs:
601 - role: endpointslices
604 source_labels: [__meta_kubernetes_pod_container_init]
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]
611 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
613 target_label: __scheme__
615 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
617 target_label: __metrics_path__
619 - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
621 target_label: __address__
622 regex: ([^:]+)(?::\d+)?;(\d+)
625 regex: __meta_kubernetes_service_label_(.+)
626 - source_labels: [__meta_kubernetes_pod_name]
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]
637 - source_labels: [__meta_kubernetes_pod_node_name]
640 # Example scrape config for probing services via the Blackbox Exporter.
642 # The relabeling allows the actual service scrape endpoint to be configured
643 # via the following annotations:
645 # * `prometheus.io/probe`: Only probe services that have a value of `true`
647 - job_name: "kubernetes-services"
651 kubernetes_sd_configs:
654 - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
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
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
671 # The relabeling allows the actual pod scrape endpoint to be configured via the
672 # following annotations:
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`.
678 - job_name: "kubernetes-pods"
679 kubernetes_sd_configs:
683 source_labels: [__meta_kubernetes_pod_container_init]
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]
690 - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
692 target_label: __metrics_path__
694 - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
696 regex: ([^:]+)(?::\d+)?;(\d+)
698 target_label: __address__
700 regex: __meta_kubernetes_pod_label_(.+)
701 - source_labels: [__meta_kubernetes_pod_name]
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]
711# -- Extra scrape configs that will be appended to `config`
712extraScrapeConfigs: []
717 initialDelaySeconds: 5
722 initialDelaySeconds: 5
727# -- Add extra specs dynamically to this chart
729allowedMetricsEndpoints:
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
739 # -- Use existing secret with license key
741 # -- Existing secret name
743 # -- Key in secret with license key