VictoriaMetrics/docs/helm/victoria-metrics-single
Github Actions a8c5035d3d
Automatic update helm docs from VictoriaMetrics/helm-charts@131846f (#7581)
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action

Signed-off-by: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com>
Co-authored-by: AndrewChubatiuk <3162380+AndrewChubatiuk@users.noreply.github.com>
2024-11-19 16:40:20 +01:00
..
_changelog.md Automatic update helm docs from VictoriaMetrics/helm-charts@f0e007f (#7059) 2024-09-20 16:11:23 +02:00
_index.md Automatic update helm docs from VictoriaMetrics/helm-charts@f0e007f (#7059) 2024-09-20 16:11:23 +02:00
CHANGELOG.md Automatic update helm docs from VictoriaMetrics/helm-charts@131846f (#7581) 2024-11-19 16:40:20 +01:00
README.md Automatic update helm docs from VictoriaMetrics/helm-charts@131846f (#7581) 2024-11-19 16:40:20 +01:00

Type: application Version: 0.12.7 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.

Key Type Default Description
extraObjects list
[]

Add extra specs dynamically to this chart

global.cluster.dnsDomain string
cluster.local.

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

global.compatibility object
openshift:
    adaptSecurityContext: auto

Openshift security context compatibility configuration

global.image.registry string
""

Image registry, that can be shared across multiple helm charts

global.imagePullSecrets list
[]

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

license object
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.key string
""

License key

license.secret object
key: ""
name: ""

Use existing secret with license key

license.secret.key string
""

Key in secret with license key

license.secret.name string
""

Existing secret name

podDisruptionBudget object
enabled: false
extraLabels: {}

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

printNotes bool
true

Print chart notes

rbac.annotations object
{}

Role/RoleBinding annotations

rbac.create bool
true

Enables Role/RoleBinding creation

rbac.extraLabels object
{}

Role/RoleBinding labels

rbac.namespaced bool
false

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

server.affinity object
{}

Pod affinity

server.containerWorkingDir string
""

Container workdir

server.emptyDir object
{}

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

server.enabled bool
true

Enable deployment of server component. Deployed as StatefulSet

server.env list
[]

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

server.envFrom list
[]

Specify alternative source for env variables

server.extraArgs object
envflag.enable: "true"
envflag.prefix: VM_
loggerFormat: json

Extra command line arguments for container of component

server.extraContainers list
[]

Extra containers to run in a pod with VM single

server.extraHostPathMounts list
[]

server.extraLabels object
{}

Sts/Deploy additional labels

server.extraVolumeMounts list
[]

Extra Volume Mounts for the container

server.extraVolumes list
[]

server.fullnameOverride string
null

Overrides the full name of server component

server.image.pullPolicy string
IfNotPresent

Image pull policy

server.image.registry string
""

Image registry

server.image.repository string
victoriametrics/victoria-metrics

Image repository

server.image.tag string
""

Image tag

server.image.variant string
""

server.imagePullSecrets list
[]

Image pull secrets

server.ingress.annotations object
{}

Ingress annotations

server.ingress.enabled bool
false

Enable deployment of ingress for server component

server.ingress.extraLabels object
{}

Ingress extra labels

server.ingress.hosts list
[]

Array of host objects

server.ingress.pathType string
Prefix

server.ingress.tls list
[]

Array of TLS objects

server.initContainers list
[]

Init containers for VM single pod

server.name string
null

Override default app label name

server.nodeSelector object
{}

Pods node selector. Details are here

server.persistentVolume.accessModes list
- ReadWriteOnce

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

server.persistentVolume.annotations object
{}

Persistant volume annotations

server.persistentVolume.enabled bool
true

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

server.persistentVolume.existingClaim string
""

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

server.persistentVolume.matchLabels object
{}

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

server.persistentVolume.mountPath string
/storage

Mount path. Server data Persistent Volume mount root path.

server.persistentVolume.name string
""

Override Persistent Volume Claim name

server.persistentVolume.size string
16Gi

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

server.persistentVolume.storageClassName string
""

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

server.persistentVolume.subPath string
""

Mount subpath

server.podAnnotations object
{}

Pods annotations

server.podLabels object
{}

Pods additional labels

server.podManagementPolicy string
OrderedReady

Pods management policy

server.podSecurityContext object
enabled: true

Pods security context. Details are here

server.priorityClassName string
""

Name of Priority Class

server.probe object
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.liveness object
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.readiness object
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 Pods 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.startup object
{}

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.relabel object
config: []
configMap: ""
enabled: false

Global relabel configuration

server.relabel.configMap string
""

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

server.replicaCount int
1

Number of victoriametrics single replicas

server.resources object
{}

Resource object. Details are here

server.retentionPeriod int
1

Data retention period in month

server.scrape.config object
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.configMap string
""

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

server.scrape.enabled bool
false

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

server.scrape.extraScrapeConfigs list
[]

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

server.securityContext object
enabled: true

Security context to be added to server pods

server.service.annotations object
{}

Service annotations

server.service.clusterIP string
""

Service ClusterIP

server.service.externalIPs list
[]

Service external IPs. Details are here

server.service.externalTrafficPolicy string
""

Service external traffic policy. Check here for details

server.service.healthCheckNodePort string
""

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

server.service.ipFamilies list
[]

List of service IP families. Check here for details.

server.service.ipFamilyPolicy string
""

Service IP family policy. Check here for details.

server.service.labels object
{}

Service labels

server.service.loadBalancerIP string
""

Service load balacner IP

server.service.loadBalancerSourceRanges list
[]

Load balancer source range

server.service.servicePort int
8428

Service port

server.service.type string
ClusterIP

Service type

server.serviceMonitor.annotations object
{}

Service Monitor annotations

server.serviceMonitor.basicAuth object
{}

Basic auth params for Service Monitor

server.serviceMonitor.enabled bool
false

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

server.serviceMonitor.extraLabels object
{}

Service Monitor labels

server.serviceMonitor.metricRelabelings list
[]

Service Monitor metricRelabelings

server.serviceMonitor.relabelings list
[]

Service Monitor relabelings

server.statefulSet.enabled bool
true

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

server.statefulSet.podManagementPolicy string
OrderedReady

Deploy order policy for StatefulSet pods

server.terminationGracePeriodSeconds int
60

Pods termination grace period in seconds

server.tolerations list
[]

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

server.vmbackupmanager.destination string
""

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

server.vmbackupmanager.disableDaily bool
false

Disable daily backups

server.vmbackupmanager.disableHourly bool
false

Disable hourly backups

server.vmbackupmanager.disableMonthly bool
false

Disable monthly backups

server.vmbackupmanager.disableWeekly bool
false

Disable weekly backups

server.vmbackupmanager.enabled bool
false

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

server.vmbackupmanager.env list
[]

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

server.vmbackupmanager.extraArgs object
envflag.enable: "true"
envflag.prefix: VM_
loggerFormat: json

Extra command line arguments for container of component

server.vmbackupmanager.extraVolumeMounts list
[]

server.vmbackupmanager.image.registry string
""

VMBackupManager image registry

server.vmbackupmanager.image.repository string
victoriametrics/vmbackupmanager

VMBackupManager image repository

server.vmbackupmanager.image.tag string
""

VMBackupManager image tag

server.vmbackupmanager.image.variant string
""

server.vmbackupmanager.probe object
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.liveness object
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 30
tcpSocket:
    port: manager-http
timeoutSeconds: 5

VMBackupManager liveness probe

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

VMBackupManager readiness probe

server.vmbackupmanager.probe.startup object
httpGet:
    port: manager-http

VMBackupManager startup probe

server.vmbackupmanager.resources object
{}

Resource object. Details are here

server.vmbackupmanager.restore object
onStart:
    enabled: false

Allows to enable restore options for pod. Read more here

server.vmbackupmanager.retention object
keepLastDaily: 2
keepLastHourly: 2
keepLastMonthly: 2
keepLastWeekly: 2

Backups retention settings

server.vmbackupmanager.retention.keepLastDaily int
2

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

server.vmbackupmanager.retention.keepLastHourly int
2

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

server.vmbackupmanager.retention.keepLastMonthly int
2

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

server.vmbackupmanager.retention.keepLastWeekly int
2

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

serviceAccount.annotations object
{}

ServiceAccount annotations

serviceAccount.automountToken bool
true

Mount API token to pod directly

serviceAccount.create bool
true

Create service account.

serviceAccount.extraLabels object
{}

ServiceAccount labels

serviceAccount.name string
null

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