Type: application Version: 0.13.2 Artifact Hub

Victoria Metrics Single version - high-performance, cost-effective and scalable TSDB, long-term remote storage for Prometheus

Prerequisites #

  • Install the follow packages: git, kubectl, helm, helm-docs. See this tutorial.
  • PV support on underlying infrastructure.

Chart Details #

This chart will do the following:

  • Rollout Victoria Metrics Single.

How to install #

Access a Kubernetes cluster.

Setup chart repository (can be omitted for OCI repositories) #

Add a chart helm repository with follow commands:

helm repo add vm https://victoriametrics.github.io/helm-charts/

helm repo update

List versions of vm/victoria-metrics-single chart available to installation:

helm search repo vm/victoria-metrics-single -l

Install victoria-metrics-single chart #

Export default values of victoria-metrics-single chart to file values.yaml:

  • For HTTPS repository

    helm show values vm/victoria-metrics-single > values.yaml
    
  • For OCI repository

    helm show values oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-single > values.yaml
    

Change the values according to the need of the environment in values.yaml file.

Test the installation with command:

  • For HTTPS repository

    helm install vms vm/victoria-metrics-single -f values.yaml -n NAMESPACE --debug --dry-run
    
  • For OCI repository

    helm install vms oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-single -f values.yaml -n NAMESPACE --debug --dry-run
    

Install chart with command:

  • For HTTPS repository

    helm install vms vm/victoria-metrics-single -f values.yaml -n NAMESPACE
    
  • For OCI repository

    helm install vms oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-single -f values.yaml -n NAMESPACE
    

Get the pods lists by running this commands:

kubectl get pods -A | grep 'vms'

Get the application by running this command:

helm list -f vms -n NAMESPACE

See the history of versions of vms application with command.

helm history vms -n NAMESPACE

How to uninstall #

Remove application with command.

helm uninstall vms -n NAMESPACE

Documentation of Helm Chart #

Install helm-docs following the instructions on this tutorial.

Generate docs with helm-docs command.

cd charts/victoria-metrics-single

helm-docs

The markdown generation is entirely go template driven. The tool parses metadata from charts and generates a number of sub-templates that can be referenced in a template file (by default README.md.gotmpl). If no template file is provided, the tool has a default internal template that will generate a reasonably formatted README.

Parameters #

The following tables lists the configurable parameters of the chart and their default values.

Change the values according to the need of the environment in victoria-metrics-single/values.yaml file.

KeyTypeDefaultDescription
extraObjectslist
[]

Add extra specs dynamically to this chart

global.cluster.dnsDomainstring
cluster.local.

K8s cluster domain suffix, uses for building storage pods’ FQDN. Details are here

global.compatibilityobject
openshift:
    adaptSecurityContext: auto

Openshift security context compatibility configuration

global.image.registrystring
""

Image registry, that can be shared across multiple helm charts

global.imagePullSecretslist
[]

Image pull secrets, that can be shared across multiple helm charts

licenseobject
key: ""
secret:
    key: ""
    name: ""

Enterprise license key configuration for VictoriaMetrics enterprise. Required only for VictoriaMetrics enterprise. Check docs here, for more information, visit site. Request a trial license here Supported starting from VictoriaMetrics v1.94.0

license.keystring
""

License key

license.secretobject
key: ""
name: ""

Use existing secret with license key

license.secret.keystring
""

Key in secret with license key

license.secret.namestring
""

Existing secret name

podDisruptionBudgetobject
enabled: false
extraLabels: {}

See kubectl explain poddisruptionbudget.spec for more. Details are here

printNotesbool
true

Print chart notes

rbac.annotationsobject
{}

Role/RoleBinding annotations

rbac.createbool
true

Enables Role/RoleBinding creation

rbac.extraLabelsobject
{}

Role/RoleBinding labels

rbac.namespacedbool
false

If true and rbac.enabled, will deploy a Role/RoleBinding instead of a ClusterRole/ClusterRoleBinding

server.affinityobject
{}

Pod affinity

server.containerWorkingDirstring
""

Container workdir

server.emptyDirobject
{}

Use an alternate scheduler, e.g. “stork”. Check here for more details schedulerName:

server.enabledbool
true

Enable deployment of server component. Deployed as StatefulSet

server.envlist
[]

Additional environment variables (ex.: secret tokens, flags). Check here for more details

server.envFromlist
[]

Specify alternative source for env variables

server.extraArgsobject
envflag.enable: true
envflag.prefix: VM_
httpListenAddr: :8428
loggerFormat: json

Extra command line arguments for container of component

server.extraContainerslist
[]

Extra containers to run in a pod with VM single

server.extraHostPathMountslist
[]

server.extraLabelsobject
{}

Sts/Deploy additional labels

server.extraVolumeMountslist
[]

Extra Volume Mounts for the container

server.extraVolumeslist
[]

server.fullnameOverridestring
null

Overrides the full name of server component

server.image.pullPolicystring
IfNotPresent

Image pull policy

server.image.registrystring
""

Image registry

server.image.repositorystring
victoriametrics/victoria-metrics

Image repository

server.image.tagstring
""

Image tag

server.image.variantstring
""

server.imagePullSecretslist
[]

Image pull secrets

server.ingress.annotationsobject
{}

Ingress annotations

server.ingress.enabledbool
false

Enable deployment of ingress for server component

server.ingress.extraLabelsobject
{}

Ingress extra labels

server.ingress.hostslist
- name: vmsingle.local
  path:
    - /
  port: http

Array of host objects

server.ingress.pathTypestring
Prefix

server.ingress.tlslist
[]

Array of TLS objects

server.initContainerslist
[]

Init containers for VM single pod

server.namestring
null

Override default app label name

server.nodeSelectorobject
{}

Pod’s node selector. Details are here

server.persistentVolume.accessModeslist
- ReadWriteOnce

Array of access modes. Must match those of existing PV or dynamic provisioner. Details are here

server.persistentVolume.annotationsobject
{}

Persistant volume annotations

server.persistentVolume.enabledbool
true

Create/use Persistent Volume Claim for server component. Empty dir if false

server.persistentVolume.existingClaimstring
""

Existing Claim name. If defined, PVC must be created manually before volume will be bound

server.persistentVolume.matchLabelsobject
{}

Bind Persistent Volume by labels. Must match all labels of targeted PV.

server.persistentVolume.mountPathstring
/storage

Mount path. Server data Persistent Volume mount root path.

server.persistentVolume.namestring
""

Override Persistent Volume Claim name

server.persistentVolume.sizestring
16Gi

Size of the volume. Should be calculated based on the metrics you send and retention policy you set.

server.persistentVolume.storageClassNamestring
""

StorageClass to use for persistent volume. Requires server.persistentVolume.enabled: true. If defined, PVC created automatically

server.persistentVolume.subPathstring
""

Mount subpath

server.podAnnotationsobject
{}

Pod’s annotations

server.podLabelsobject
{}

Pod’s additional labels

server.podManagementPolicystring
OrderedReady

Pod’s management policy

server.podSecurityContextobject
enabled: true

Pod’s security context. Details are here

server.priorityClassNamestring
""

Name of Priority Class

server.probeobject
liveness:
    failureThreshold: 10
    initialDelaySeconds: 30
    periodSeconds: 30
    tcpSocket: {}
    timeoutSeconds: 5
readiness:
    failureThreshold: 3
    httpGet: {}
    initialDelaySeconds: 5
    periodSeconds: 15
    timeoutSeconds: 5
startup: {}

Readiness & Liveness probes

server.probe.livenessobject
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 30
tcpSocket: {}
timeoutSeconds: 5

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.

server.probe.readinessobject
failureThreshold: 3
httpGet: {}
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5

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.

server.probe.startupobject
{}

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.

server.relabelobject
config: []
configMap: ""
enabled: false

Global relabel configuration

server.relabel.configMapstring
""

Use existing configmap if specified otherwise .config values will be used. Relabel config should reside under relabel.yml key

server.replicaCountint
1

Number of victoriametrics single replicas

server.resourcesobject
{}

Resource object. Details are here

server.retentionPeriodint
1

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

server.scrape.configobject
global:
    scrape_interval: 15s
scrape_configs:
    - job_name: victoriametrics
      static_configs:
        - targets:
            - localhost:8428
    - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      job_name: kubernetes-apiservers
      kubernetes_sd_configs:
        - role: endpoints
      relabel_configs:
        - action: keep
          regex: default;kubernetes;https
          source_labels:
            - __meta_kubernetes_namespace
            - __meta_kubernetes_service_name
            - __meta_kubernetes_endpoint_port_name
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        insecure_skip_verify: true
    - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      job_name: kubernetes-nodes
      kubernetes_sd_configs:
        - role: node
      relabel_configs:
        - action: labelmap
          regex: __meta_kubernetes_node_label_(.+)
        - replacement: kubernetes.default.svc:443
          target_label: __address__
        - regex: (.+)
          replacement: /api/v1/nodes/$1/proxy/metrics
          source_labels:
            - __meta_kubernetes_node_name
          target_label: __metrics_path__
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        insecure_skip_verify: true
    - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      honor_timestamps: false
      job_name: kubernetes-nodes-cadvisor
      kubernetes_sd_configs:
        - role: node
      relabel_configs:
        - action: labelmap
          regex: __meta_kubernetes_node_label_(.+)
        - replacement: kubernetes.default.svc:443
          target_label: __address__
        - regex: (.+)
          replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
          source_labels:
            - __meta_kubernetes_node_name
          target_label: __metrics_path__
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        insecure_skip_verify: true
    - job_name: kubernetes-service-endpoints
      kubernetes_sd_configs:
        - role: endpoints
      relabel_configs:
        - action: drop
          regex: true
          source_labels:
            - __meta_kubernetes_pod_container_init
        - action: keep_if_equal
          source_labels:
            - __meta_kubernetes_service_annotation_prometheus_io_port
            - __meta_kubernetes_pod_container_port_number
        - action: keep
          regex: true
          source_labels:
            - __meta_kubernetes_service_annotation_prometheus_io_scrape
        - action: replace
          regex: (https?)
          source_labels:
            - __meta_kubernetes_service_annotation_prometheus_io_scheme
          target_label: __scheme__
        - action: replace
          regex: (.+)
          source_labels:
            - __meta_kubernetes_service_annotation_prometheus_io_path
          target_label: __metrics_path__
        - action: replace
          regex: ([^:]+)(?::\d+)?;(\d+)
          replacement: $1:$2
          source_labels:
            - __address__
            - __meta_kubernetes_service_annotation_prometheus_io_port
          target_label: __address__
        - action: labelmap
          regex: __meta_kubernetes_service_label_(.+)
        - action: replace
          source_labels:
            - __meta_kubernetes_namespace
          target_label: namespace
        - action: replace
          source_labels:
            - __meta_kubernetes_service_name
          target_label: service
        - action: replace
          source_labels:
            - __meta_kubernetes_pod_node_name
          target_label: node
    - job_name: kubernetes-service-endpoints-slow
      kubernetes_sd_configs:
        - role: endpoints
      relabel_configs:
        - action: drop
          regex: true
          source_labels:
            - __meta_kubernetes_pod_container_init
        - action: keep_if_equal
          source_labels:
            - __meta_kubernetes_service_annotation_prometheus_io_port
            - __meta_kubernetes_pod_container_port_number
        - action: keep
          regex: true
          source_labels:
            - __meta_kubernetes_service_annotation_prometheus_io_scrape_slow
        - action: replace
          regex: (https?)
          source_labels:
            - __meta_kubernetes_service_annotation_prometheus_io_scheme
          target_label: __scheme__
        - action: replace
          regex: (.+)
          source_labels:
            - __meta_kubernetes_service_annotation_prometheus_io_path
          target_label: __metrics_path__
        - action: replace
          regex: ([^:]+)(?::\d+)?;(\d+)
          replacement: $1:$2
          source_labels:
            - __address__
            - __meta_kubernetes_service_annotation_prometheus_io_port
          target_label: __address__
        - action: labelmap
          regex: __meta_kubernetes_service_label_(.+)
        - action: replace
          source_labels:
            - __meta_kubernetes_namespace
          target_label: namespace
        - action: replace
          source_labels:
            - __meta_kubernetes_service_name
          target_label: service
        - action: replace
          source_labels:
            - __meta_kubernetes_pod_node_name
          target_label: node
      scrape_interval: 5m
      scrape_timeout: 30s
    - job_name: kubernetes-services
      kubernetes_sd_configs:
        - role: service
      metrics_path: /probe
      params:
        module:
            - http_2xx
      relabel_configs:
        - action: keep
          regex: true
          source_labels:
            - __meta_kubernetes_service_annotation_prometheus_io_probe
        - source_labels:
            - __address__
          target_label: __param_target
        - replacement: blackbox
          target_label: __address__
        - source_labels:
            - __param_target
          target_label: instance
        - action: labelmap
          regex: __meta_kubernetes_service_label_(.+)
        - source_labels:
            - __meta_kubernetes_namespace
          target_label: namespace
        - source_labels:
            - __meta_kubernetes_service_name
          target_label: service
    - job_name: kubernetes-pods
      kubernetes_sd_configs:
        - role: pod
      relabel_configs:
        - action: drop
          regex: true
          source_labels:
            - __meta_kubernetes_pod_container_init
        - action: keep_if_equal
          source_labels:
            - __meta_kubernetes_pod_annotation_prometheus_io_port
            - __meta_kubernetes_pod_container_port_number
        - action: keep
          regex: true
          source_labels:
            - __meta_kubernetes_pod_annotation_prometheus_io_scrape
        - action: replace
          regex: (.+)
          source_labels:
            - __meta_kubernetes_pod_annotation_prometheus_io_path
          target_label: __metrics_path__
        - action: replace
          regex: ([^:]+)(?::\d+)?;(\d+)
          replacement: $1:$2
          source_labels:
            - __address__
            - __meta_kubernetes_pod_annotation_prometheus_io_port
          target_label: __address__
        - action: labelmap
          regex: __meta_kubernetes_pod_label_(.+)
        - action: replace
          source_labels:
            - __meta_kubernetes_namespace
          target_label: namespace
        - action: replace
          source_labels:
            - __meta_kubernetes_pod_name
          target_label: pod

Scrape config

server.scrape.configMapstring
""

Use existing configmap if specified otherwise .config values will be used. Scrape config should reside under scrape.yml key

server.scrape.enabledbool
false

If true scrapes targets, creates config map or use specified one with scrape targets

server.scrape.extraScrapeConfigslist
[]

Extra scrape configs that will be appended to server.scrape.config

server.securityContextobject
enabled: true

Security context to be added to server pods

server.service.annotationsobject
{}

Service annotations

server.service.clusterIPstring
""

Service ClusterIP

server.service.externalIPslist
[]

Service external IPs. Details are here

server.service.externalTrafficPolicystring
""

Service external traffic policy. Check here for details

server.service.healthCheckNodePortstring
""

Health check node port for a service. Check here for details

server.service.ipFamilieslist
[]

List of service IP families. Check here for details.

server.service.ipFamilyPolicystring
""

Service IP family policy. Check here for details.

server.service.labelsobject
{}

Service labels

server.service.loadBalancerIPstring
""

Service load balancer IP

server.service.loadBalancerSourceRangeslist
[]

Load balancer source range

server.service.servicePortint
8428

Service port

server.service.targetPortstring
http

Target port

server.service.typestring
ClusterIP

Service type

server.serviceMonitor.annotationsobject
{}

Service Monitor annotations

server.serviceMonitor.basicAuthobject
{}

Basic auth params for Service Monitor

server.serviceMonitor.enabledbool
false

Enable deployment of Service Monitor for server component. This is Prometheus operator object

server.serviceMonitor.extraLabelsobject
{}

Service Monitor labels

server.serviceMonitor.metricRelabelingslist
[]

Service Monitor metricRelabelings

server.serviceMonitor.relabelingslist
[]

Service Monitor relabelings

server.serviceMonitor.targetPortstring
http

Service Monitor target port

server.statefulSet.enabledbool
true

Creates statefulset instead of deployment, useful when you want to keep the cache

server.statefulSet.podManagementPolicystring
OrderedReady

Deploy order policy for StatefulSet pods

server.terminationGracePeriodSecondsint
60

Pod’s termination grace period in seconds

server.tolerationslist
[]

Node tolerations for server scheduling to nodes with taints. Details are here

server.vmbackupmanager.destinationstring
""

Backup destination at S3, GCS or local filesystem. Release name will be included to path!

server.vmbackupmanager.disableDailybool
false

Disable daily backups

server.vmbackupmanager.disableHourlybool
false

Disable hourly backups

server.vmbackupmanager.disableMonthlybool
false

Disable monthly backups

server.vmbackupmanager.disableWeeklybool
false

Disable weekly backups

server.vmbackupmanager.enabledbool
false

Enable automatic creation of backup via vmbackupmanager. vmbackupmanager is part of Enterprise packages

server.vmbackupmanager.envlist
[]

Additional environment variables (ex.: secret tokens, flags). Check here

server.vmbackupmanager.extraArgsobject
envflag.enable: true
envflag.prefix: VM_
loggerFormat: json

Extra command line arguments for container of component

server.vmbackupmanager.extraVolumeMountslist
[]

server.vmbackupmanager.image.registrystring
""

VMBackupManager image registry

server.vmbackupmanager.image.repositorystring
victoriametrics/vmbackupmanager

VMBackupManager image repository

server.vmbackupmanager.image.tagstring
""

VMBackupManager image tag

server.vmbackupmanager.image.variantstring
""

server.vmbackupmanager.probeobject
liveness:
    failureThreshold: 10
    initialDelaySeconds: 30
    periodSeconds: 30
    tcpSocket:
        port: manager-http
    timeoutSeconds: 5
readiness:
    failureThreshold: 3
    httpGet:
        port: manager-http
    initialDelaySeconds: 5
    periodSeconds: 15
    timeoutSeconds: 5
startup:
    httpGet:
        port: manager-http

Readiness & Liveness probes

server.vmbackupmanager.probe.livenessobject
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 30
tcpSocket:
    port: manager-http
timeoutSeconds: 5

VMBackupManager liveness probe

server.vmbackupmanager.probe.readinessobject
failureThreshold: 3
httpGet:
    port: manager-http
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5

VMBackupManager readiness probe

server.vmbackupmanager.probe.startupobject
httpGet:
    port: manager-http

VMBackupManager startup probe

server.vmbackupmanager.resourcesobject
{}

Resource object. Details are here

server.vmbackupmanager.restoreobject
onStart:
    enabled: false

Allows to enable restore options for pod. Read more here

server.vmbackupmanager.retentionobject
keepLastDaily: 2
keepLastHourly: 2
keepLastMonthly: 2
keepLastWeekly: 2

Backups’ retention settings

server.vmbackupmanager.retention.keepLastDailyint
2

Keep last N daily backups. 0 means delete all existing daily backups. Specify -1 to turn off

server.vmbackupmanager.retention.keepLastHourlyint
2

Keep last N hourly backups. 0 means delete all existing hourly backups. Specify -1 to turn off

server.vmbackupmanager.retention.keepLastMonthlyint
2

Keep last N monthly backups. 0 means delete all existing monthly backups. Specify -1 to turn off

server.vmbackupmanager.retention.keepLastWeeklyint
2

Keep last N weekly backups. 0 means delete all existing weekly backups. Specify -1 to turn off

serviceAccount.annotationsobject
{}

ServiceAccount annotations

serviceAccount.automountTokenbool
true

Mount API token to pod directly

serviceAccount.createbool
true

Create service account.

serviceAccount.extraLabelsobject
{}

ServiceAccount labels

serviceAccount.namestring
null

The name of the service account to use. If not set and create is true, a name is generated using the fullname template