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 |
| K8s cluster domain suffix, uses for building storage pods’ FQDN. Details are here |
global.compatibility | object |
| 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 |
| 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 |
| 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 |
| See |
printNotes | bool |
| Print chart notes |
rbac.annotations | object |
| Role/RoleBinding annotations |
rbac.create | bool |
| Enables Role/RoleBinding creation |
rbac.extraLabels | object |
| Role/RoleBinding labels |
rbac.namespaced | bool |
| If true and |
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 |
| 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 |
| 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 |
| Overrides the full name of server component |
server.image.pullPolicy | string |
| Image pull policy |
server.image.registry | string |
| Image registry |
server.image.repository | string |
| 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 |
| 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 |
| |
server.ingress.tls | list |
| Array of TLS objects |
server.initContainers | list |
| Init containers for VM single pod |
server.name | string |
| Override default |
server.nodeSelector | object |
| Pod’s node selector. Details are here |
server.persistentVolume.accessModes | list |
| 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 |
| 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 |
| Mount path. Server data Persistent Volume mount root path. |
server.persistentVolume.name | string |
| Override Persistent Volume Claim name |
server.persistentVolume.size | string |
| 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 |
| Pod’s annotations |
server.podLabels | object |
| Pod’s additional labels |
server.podManagementPolicy | string |
| Pod’s management policy |
server.podSecurityContext | object |
| Pod’s security context. Details are here |
server.priorityClassName | string |
| Name of Priority Class |
server.probe | object |
| Readiness & Liveness probes |
server.probe.liveness | object |
| 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 |
| 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.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 |
| Global relabel configuration |
server.relabel.configMap | string |
| Use existing configmap if specified otherwise .config values will be used. Relabel config should reside under |
server.replicaCount | int |
| Number of victoriametrics single replicas |
server.resources | object |
| Resource object. Details are here |
server.retentionPeriod | int |
| 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.config | object |
| Scrape config |
server.scrape.configMap | string |
| Use existing configmap if specified otherwise .config values will be used. Scrape config should reside under |
server.scrape.enabled | bool |
| 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.securityContext | object |
| 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 balancer IP |
server.service.loadBalancerSourceRanges | list |
| Load balancer source range |
server.service.servicePort | int |
| Service port |
server.service.targetPort | string |
| Target port |
server.service.type | string |
| Service type |
server.serviceMonitor.annotations | object |
| Service Monitor annotations |
server.serviceMonitor.basicAuth | object |
| Basic auth params for Service Monitor |
server.serviceMonitor.enabled | bool |
| 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.serviceMonitor.targetPort | string |
| Service Monitor target port |
server.statefulSet.enabled | bool |
| Creates statefulset instead of deployment, useful when you want to keep the cache |
server.statefulSet.podManagementPolicy | string |
| Deploy order policy for StatefulSet pods |
server.terminationGracePeriodSeconds | int |
| Pod’s 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 |
| Disable daily backups |
server.vmbackupmanager.disableHourly | bool |
| Disable hourly backups |
server.vmbackupmanager.disableMonthly | bool |
| Disable monthly backups |
server.vmbackupmanager.disableWeekly | bool |
| Disable weekly backups |
server.vmbackupmanager.enabled | bool |
| 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 |
| 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 |
| VMBackupManager image repository |
server.vmbackupmanager.image.tag | string |
| VMBackupManager image tag |
server.vmbackupmanager.image.variant | string |
| |
server.vmbackupmanager.probe | object |
| Readiness & Liveness probes |
server.vmbackupmanager.probe.liveness | object |
| VMBackupManager liveness probe |
server.vmbackupmanager.probe.readiness | object |
| VMBackupManager readiness probe |
server.vmbackupmanager.probe.startup | object |
| VMBackupManager startup probe |
server.vmbackupmanager.resources | object |
| Resource object. Details are here |
server.vmbackupmanager.restore | object |
| Allows to enable restore options for pod. Read more here |
server.vmbackupmanager.retention | object |
| Backups’ retention settings |
server.vmbackupmanager.retention.keepLastDaily | int |
| Keep last N daily backups. 0 means delete all existing daily backups. Specify -1 to turn off |
server.vmbackupmanager.retention.keepLastHourly | int |
| Keep last N hourly backups. 0 means delete all existing hourly backups. Specify -1 to turn off |
server.vmbackupmanager.retention.keepLastMonthly | int |
| Keep last N monthly backups. 0 means delete all existing monthly backups. Specify -1 to turn off |
server.vmbackupmanager.retention.keepLastWeekly | int |
| 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 |
| Mount API token to pod directly |
serviceAccount.create | bool |
| Create service account. |
serviceAccount.extraLabels | object |
| ServiceAccount labels |
serviceAccount.name | string |
| The name of the service account to use. If not set and create is true, a name is generated using the fullname template |