added repo
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
appVersion: v1.91.3
|
||||
description: Victoria Metrics Cluster version - high-performance, cost-effective and scalable TSDB, long-term remote storage for Prometheus
|
||||
name: victoria-metrics-cluster
|
||||
version: 0.9.73
|
||||
sources:
|
||||
- https://github.com/VictoriaMetrics/helm-charts
|
||||
@@ -0,0 +1,356 @@
|
||||
# Victoria Metrics Helm Chart for Cluster Version
|
||||
|
||||

|
||||
|
||||
Victoria Metrics Cluster 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](../../REQUIREMENTS.md).
|
||||
|
||||
* PV support on underlying infrastructure
|
||||
|
||||
# Chart Details
|
||||
|
||||
Note: this chart installs VictoriaMetrics cluster components such as vminsert, vmselect and vmstorage. It doesn't create or configure metrics scraping. If you are looking for a chart to configure monitoring stack in cluster check out [victoria-metrics-k8s-stack chart](https://github.com/VictoriaMetrics/helm-charts/tree/master/charts/victoria-metrics-k8s-stack#helm-chart-for-victoria-metrics-kubernetes-monitoring-stack).
|
||||
|
||||
# How to install
|
||||
|
||||
Access a Kubernetes cluster.
|
||||
|
||||
Add a chart helm repository with follow commands:
|
||||
|
||||
```console
|
||||
helm repo add vm https://victoriametrics.github.io/helm-charts/
|
||||
|
||||
helm repo update
|
||||
```
|
||||
|
||||
List versions of ``vm/victoria-metrics-cluster`` chart available to installation:
|
||||
|
||||
##### for helm v3
|
||||
|
||||
```console
|
||||
helm search repo vm/victoria-metrics-cluster -l
|
||||
```
|
||||
|
||||
Export default values of ``victoria-metrics-cluster`` chart to file ``values.yaml``:
|
||||
|
||||
```console
|
||||
helm show values vm/victoria-metrics-cluster > values.yaml
|
||||
```
|
||||
|
||||
Change the values according to the need of the environment in ``values.yaml`` file.
|
||||
|
||||
Test the installation with command:
|
||||
|
||||
```console
|
||||
helm install vmcluster vm/victoria-metrics-cluster -f values.yaml -n NAMESPACE --debug --dry-run
|
||||
```
|
||||
|
||||
Install chart with command:
|
||||
|
||||
##### for helm v3
|
||||
|
||||
```console
|
||||
helm install vmcluster vm/victoria-metrics-cluster -f values.yaml -n NAMESPACE
|
||||
```
|
||||
|
||||
Get the pods lists by running this commands:
|
||||
|
||||
```console
|
||||
kubectl get pods -A | grep 'vminsert\|vmselect\|vmstorage'
|
||||
```
|
||||
|
||||
Get the application by running this command:
|
||||
|
||||
```console
|
||||
helm list -f vmcluster -n NAMESPACE
|
||||
```
|
||||
|
||||
See the history of versions of ``vmcluster`` application with command.
|
||||
|
||||
```console
|
||||
helm history vmcluster -n NAMESPACE
|
||||
```
|
||||
|
||||
# How to uninstall
|
||||
|
||||
Remove application with command.
|
||||
|
||||
```console
|
||||
helm uninstall vmcluster -n NAMESPACE
|
||||
```
|
||||
|
||||
# Documentation of Helm Chart
|
||||
|
||||
Install ``helm-docs`` following the instructions on this [tutorial](../../REQUIREMENTS.md).
|
||||
|
||||
Generate docs with ``helm-docs`` command.
|
||||
|
||||
```bash
|
||||
cd charts/victoria-metrics-cluster
|
||||
|
||||
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-cluster/values.yaml`` file.
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| clusterDomainSuffix | string | `"cluster.local"` | k8s cluster domain suffix, uses for building storage pods' FQDN. Ref: [https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/](https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/) |
|
||||
| extraSecrets | list | `[]` | |
|
||||
| printNotes | bool | `true` | |
|
||||
| rbac.create | bool | `true` | |
|
||||
| rbac.extraLabels | object | `{}` | |
|
||||
| rbac.namespaced | bool | `false` | |
|
||||
| rbac.pspEnabled | bool | `true` | |
|
||||
| serviceAccount.automountToken | bool | `true` | |
|
||||
| serviceAccount.create | bool | `true` | |
|
||||
| serviceAccount.extraLabels | object | `{}` | |
|
||||
| vminsert.affinity | object | `{}` | Pod affinity |
|
||||
| vminsert.annotations | object | `{}` | |
|
||||
| vminsert.automountServiceAccountToken | bool | `true` | |
|
||||
| vminsert.containerWorkingDir | string | `""` | Container workdir |
|
||||
| vminsert.enabled | bool | `true` | Enable deployment of vminsert component. Deployment is used |
|
||||
| vminsert.env | list | `[]` | Additional environment variables (ex.: secret tokens, flags) https://github.com/VictoriaMetrics/VictoriaMetrics#environment-variables |
|
||||
| vminsert.extraArgs."envflag.enable" | string | `"true"` | |
|
||||
| vminsert.extraArgs."envflag.prefix" | string | `"VM_"` | |
|
||||
| vminsert.extraArgs.loggerFormat | string | `"json"` | |
|
||||
| vminsert.extraContainers | list | `[]` | |
|
||||
| vminsert.extraLabels | object | `{}` | |
|
||||
| vminsert.extraVolumeMounts | list | `[]` | |
|
||||
| vminsert.extraVolumes | list | `[]` | |
|
||||
| vminsert.fullnameOverride | string | `""` | Overrides the full name of vminsert component |
|
||||
| vminsert.horizontalPodAutoscaler.enabled | bool | `false` | Use HPA for vminsert component |
|
||||
| vminsert.horizontalPodAutoscaler.maxReplicas | int | `10` | Maximum replicas for HPA to use to to scale the vminsert component |
|
||||
| vminsert.horizontalPodAutoscaler.metrics | list | `[]` | Metric for HPA to use to scale the vminsert component |
|
||||
| vminsert.horizontalPodAutoscaler.minReplicas | int | `2` | Minimum replicas for HPA to use to scale the vminsert component |
|
||||
| vminsert.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
|
||||
| vminsert.image.repository | string | `"victoriametrics/vminsert"` | Image repository |
|
||||
| vminsert.image.tag | string | `"v1.91.2-cluster"` | Image tag |
|
||||
| vminsert.ingress.annotations | object | `{}` | Ingress annotations |
|
||||
| vminsert.ingress.enabled | bool | `false` | Enable deployment of ingress for vminsert component |
|
||||
| vminsert.ingress.extraLabels | object | `{}` | |
|
||||
| vminsert.ingress.hosts | list | `[]` | Array of host objects |
|
||||
| vminsert.ingress.pathType | string | `"Prefix"` | pathType is only for k8s >= 1.1= |
|
||||
| vminsert.ingress.tls | list | `[]` | Array of TLS objects |
|
||||
| vminsert.initContainers | list | `[]` | |
|
||||
| vminsert.name | string | `"vminsert"` | vminsert container name |
|
||||
| vminsert.nodeSelector | object | `{}` | Pod's node selector. Ref: [https://kubernetes.io/docs/user-guide/node-selection/](https://kubernetes.io/docs/user-guide/node-selection/) |
|
||||
| vminsert.podAnnotations | object | `{}` | Pod's annotations |
|
||||
| vminsert.podDisruptionBudget.enabled | bool | `false` | See `kubectl explain poddisruptionbudget.spec` for more. Ref: [https://kubernetes.io/docs/tasks/run-application/configure-pdb/](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) |
|
||||
| vminsert.podDisruptionBudget.labels | object | `{}` | |
|
||||
| vminsert.podSecurityContext | object | `{}` | |
|
||||
| vminsert.priorityClassName | string | `""` | Name of Priority Class |
|
||||
| vminsert.probe.liveness.failureThreshold | int | `3` | |
|
||||
| vminsert.probe.liveness.initialDelaySeconds | int | `5` | |
|
||||
| vminsert.probe.liveness.periodSeconds | int | `15` | |
|
||||
| vminsert.probe.liveness.timeoutSeconds | int | `5` | |
|
||||
| vminsert.probe.readiness.failureThreshold | int | `3` | |
|
||||
| vminsert.probe.readiness.initialDelaySeconds | int | `5` | |
|
||||
| vminsert.probe.readiness.periodSeconds | int | `15` | |
|
||||
| vminsert.probe.readiness.timeoutSeconds | int | `5` | |
|
||||
| vminsert.replicaCount | int | `2` | Count of vminsert pods |
|
||||
| vminsert.resources | object | `{}` | Resource object |
|
||||
| vminsert.securityContext | object | `{}` | Pod's security context. Ref: [https://kubernetes.io/docs/tasks/configure-pod-container/security-context/](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) |
|
||||
| vminsert.service.annotations | object | `{}` | Service annotations |
|
||||
| vminsert.service.clusterIP | string | `""` | Service ClusterIP |
|
||||
| vminsert.service.externalIPs | list | `[]` | Service External IPs. Ref: [https://kubernetes.io/docs/user-guide/services/#external-ips]( https://kubernetes.io/docs/user-guide/services/#external-ips) |
|
||||
| vminsert.service.extraServicePorts | list | `[]` | Extra service ports |
|
||||
| vminsert.service.labels | object | `{}` | Service labels |
|
||||
| vminsert.service.loadBalancerIP | string | `""` | Service load balancer IP |
|
||||
| vminsert.service.loadBalancerSourceRanges | list | `[]` | Load balancer source range |
|
||||
| vminsert.service.servicePort | int | `8480` | Service port |
|
||||
| vminsert.service.targetPort | string | `"http"` | Target port |
|
||||
| vminsert.service.type | string | `"ClusterIP"` | Service type |
|
||||
| vminsert.service.udp | bool | `false` | Make sure that service is not type "LoadBalancer", as it requires "MixedProtocolLBService" feature gate. ref: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/ |
|
||||
| vminsert.serviceMonitor.annotations | object | `{}` | Service Monitor annotations |
|
||||
| vminsert.serviceMonitor.enabled | bool | `false` | Enable deployment of Service Monitor for vminsert component. This is Prometheus operator object |
|
||||
| vminsert.serviceMonitor.extraLabels | object | `{}` | Service Monitor labels |
|
||||
| vminsert.serviceMonitor.namespace | string | `""` | Target namespace of ServiceMonitor manifest |
|
||||
| vminsert.serviceMonitor.relabelings | list | `[]` | Service Monitor relabelings |
|
||||
| vminsert.strategy | object | `{}` | |
|
||||
| vminsert.suppresStorageFQDNsRender | bool | `false` | Suppress rendering `--storageNode` FQDNs based on `vmstorage.replicaCount` value. If true suppress rendering `--storageNodes`, they can be re-defined in extraArgs |
|
||||
| vminsert.tolerations | list | `[]` | Array of tolerations object. Ref: [https://kubernetes.io/docs/concepts/configuration/assign-pod-node/](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) |
|
||||
| vmselect.affinity | object | `{}` | Pod affinity |
|
||||
| vmselect.annotations | object | `{}` | |
|
||||
| vmselect.automountServiceAccountToken | bool | `true` | |
|
||||
| vmselect.cacheMountPath | string | `"/cache"` | Cache root folder |
|
||||
| vmselect.containerWorkingDir | string | `""` | Container workdir |
|
||||
| vmselect.enabled | bool | `true` | Enable deployment of vmselect component. Can be deployed as Deployment(default) or StatefulSet |
|
||||
| vmselect.env | list | `[]` | Additional environment variables (ex.: secret tokens, flags) https://github.com/VictoriaMetrics/VictoriaMetrics#environment-variables |
|
||||
| vmselect.extraArgs."envflag.enable" | string | `"true"` | |
|
||||
| vmselect.extraArgs."envflag.prefix" | string | `"VM_"` | |
|
||||
| vmselect.extraArgs.loggerFormat | string | `"json"` | |
|
||||
| vmselect.extraContainers | list | `[]` | |
|
||||
| vmselect.extraHostPathMounts | list | `[]` | |
|
||||
| vmselect.extraLabels | object | `{}` | |
|
||||
| vmselect.extraVolumeMounts | list | `[]` | |
|
||||
| vmselect.extraVolumes | list | `[]` | |
|
||||
| vmselect.fullnameOverride | string | `""` | Overrides the full name of vmselect component |
|
||||
| vmselect.horizontalPodAutoscaler.enabled | bool | `false` | Use HPA for vmselect component |
|
||||
| vmselect.horizontalPodAutoscaler.maxReplicas | int | `10` | Maximum replicas for HPA to use to to scale the vmselect component |
|
||||
| vmselect.horizontalPodAutoscaler.metrics | list | `[]` | Metric for HPA to use to scale the vmselect component |
|
||||
| vmselect.horizontalPodAutoscaler.minReplicas | int | `2` | Minimum replicas for HPA to use to scale the vmselect component |
|
||||
| vmselect.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
|
||||
| vmselect.image.repository | string | `"victoriametrics/vmselect"` | Image repository |
|
||||
| vmselect.image.tag | string | `"v1.91.2-cluster"` | Image tag |
|
||||
| vmselect.ingress.annotations | object | `{}` | Ingress annotations |
|
||||
| vmselect.ingress.enabled | bool | `false` | Enable deployment of ingress for vmselect component |
|
||||
| vmselect.ingress.extraLabels | object | `{}` | |
|
||||
| vmselect.ingress.hosts | list | `[]` | Array of host objects |
|
||||
| vmselect.ingress.pathType | string | `"Prefix"` | pathType is only for k8s >= 1.1= |
|
||||
| vmselect.ingress.tls | list | `[]` | Array of TLS objects |
|
||||
| vmselect.initContainers | list | `[]` | |
|
||||
| vmselect.name | string | `"vmselect"` | Vmselect container name |
|
||||
| vmselect.nodeSelector | object | `{}` | Pod's node selector. Ref: [https://kubernetes.io/docs/user-guide/node-selection/](https://kubernetes.io/docs/user-guide/node-selection/) |
|
||||
| vmselect.persistentVolume.accessModes | list | `["ReadWriteOnce"]` | Array of access mode. Must match those of existing PV or dynamic provisioner. Ref: [http://kubernetes.io/docs/user-guide/persistent-volumes/](http://kubernetes.io/docs/user-guide/persistent-volumes/) |
|
||||
| vmselect.persistentVolume.annotations | object | `{}` | Persistent volume annotations |
|
||||
| vmselect.persistentVolume.enabled | bool | `false` | Create/use Persistent Volume Claim for vmselect component. Empty dir if false. If true, vmselect will create/use a Persistent Volume Claim |
|
||||
| vmselect.persistentVolume.existingClaim | string | `""` | Existing Claim name. Requires vmselect.persistentVolume.enabled: true. If defined, PVC must be created manually before volume will be bound |
|
||||
| vmselect.persistentVolume.labels | object | `{}` | Persistent volume labels |
|
||||
| vmselect.persistentVolume.size | string | `"2Gi"` | Size of the volume. Better to set the same as resource limit memory property |
|
||||
| vmselect.persistentVolume.subPath | string | `""` | Mount subpath |
|
||||
| vmselect.podAnnotations | object | `{}` | Pod's annotations |
|
||||
| vmselect.podDisruptionBudget.enabled | bool | `false` | See `kubectl explain poddisruptionbudget.spec` for more. Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ |
|
||||
| vmselect.podDisruptionBudget.labels | object | `{}` | |
|
||||
| vmselect.podSecurityContext | object | `{}` | |
|
||||
| vmselect.priorityClassName | string | `""` | Name of Priority Class |
|
||||
| vmselect.probe.liveness.failureThreshold | int | `3` | |
|
||||
| vmselect.probe.liveness.initialDelaySeconds | int | `5` | |
|
||||
| vmselect.probe.liveness.periodSeconds | int | `15` | |
|
||||
| vmselect.probe.liveness.timeoutSeconds | int | `5` | |
|
||||
| vmselect.probe.readiness.failureThreshold | int | `3` | |
|
||||
| vmselect.probe.readiness.initialDelaySeconds | int | `5` | |
|
||||
| vmselect.probe.readiness.periodSeconds | int | `15` | |
|
||||
| vmselect.probe.readiness.timeoutSeconds | int | `5` | |
|
||||
| vmselect.replicaCount | int | `2` | Count of vmselect pods |
|
||||
| vmselect.resources | object | `{}` | Resource object |
|
||||
| vmselect.securityContext | object | `{}` | Pod's security context. Ref: [https://kubernetes.io/docs/tasks/configure-pod-container/security-context/](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
|
||||
| vmselect.service.annotations | object | `{}` | Service annotations |
|
||||
| vmselect.service.clusterIP | string | `""` | Service ClusterIP |
|
||||
| vmselect.service.externalIPs | list | `[]` | Service External IPs. Ref: [https://kubernetes.io/docs/user-guide/services/#external-ips](https://kubernetes.io/docs/user-guide/services/#external-ips) |
|
||||
| vmselect.service.extraServicePorts | list | `[]` | Extra service ports |
|
||||
| vmselect.service.labels | object | `{}` | Service labels |
|
||||
| vmselect.service.loadBalancerIP | string | `""` | Service load balacner IP |
|
||||
| vmselect.service.loadBalancerSourceRanges | list | `[]` | Load balancer source range |
|
||||
| vmselect.service.servicePort | int | `8481` | Service port |
|
||||
| vmselect.service.targetPort | string | `"http"` | Target port |
|
||||
| vmselect.service.type | string | `"ClusterIP"` | Service type |
|
||||
| vmselect.serviceMonitor.annotations | object | `{}` | Service Monitor annotations |
|
||||
| vmselect.serviceMonitor.enabled | bool | `false` | Enable deployment of Service Monitor for vmselect component. This is Prometheus operator object |
|
||||
| vmselect.serviceMonitor.extraLabels | object | `{}` | Service Monitor labels |
|
||||
| vmselect.serviceMonitor.namespace | string | `""` | Target namespace of ServiceMonitor manifest |
|
||||
| vmselect.serviceMonitor.relabelings | list | `[]` | Service Monitor relabelings |
|
||||
| vmselect.statefulSet.enabled | bool | `false` | Deploy StatefulSet instead of Deployment for vmselect. Useful if you want to keep cache data. |
|
||||
| vmselect.statefulSet.podManagementPolicy | string | `"OrderedReady"` | Deploy order policy for StatefulSet pods |
|
||||
| vmselect.statefulSet.service.annotations | object | `{}` | Headless service annotations |
|
||||
| vmselect.statefulSet.service.labels | object | `{}` | Headless service labels |
|
||||
| vmselect.statefulSet.service.servicePort | int | `8481` | Headless service port |
|
||||
| vmselect.strategy | object | `{}` | |
|
||||
| vmselect.suppresStorageFQDNsRender | bool | `false` | Suppress rendering `--storageNode` FQDNs based on `vmstorage.replicaCount` value. If true suppress rendering `--storageNodes`, they can be re-defined in extraArgs |
|
||||
| vmselect.tolerations | list | `[]` | Array of tolerations object. Ref: [https://kubernetes.io/docs/concepts/configuration/assign-pod-node/](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) |
|
||||
| vmselect.topologySpreadConstraints | list | `[]` | Pod topologySpreadConstraints |
|
||||
| vmstorage.affinity | object | `{}` | Pod affinity |
|
||||
| vmstorage.annotations | object | `{}` | |
|
||||
| vmstorage.automountServiceAccountToken | bool | `true` | |
|
||||
| vmstorage.containerWorkingDir | string | `""` | Container workdir |
|
||||
| vmstorage.enabled | bool | `true` | Enable deployment of vmstorage component. StatefulSet is used |
|
||||
| vmstorage.env | list | `[]` | Additional environment variables (ex.: secret tokens, flags) https://github.com/VictoriaMetrics/VictoriaMetrics#environment-variables |
|
||||
| vmstorage.extraArgs."envflag.enable" | string | `"true"` | |
|
||||
| vmstorage.extraArgs."envflag.prefix" | string | `"VM_"` | |
|
||||
| vmstorage.extraArgs.loggerFormat | string | `"json"` | |
|
||||
| vmstorage.extraContainers | list | `[]` | |
|
||||
| vmstorage.extraHostPathMounts | list | `[]` | |
|
||||
| vmstorage.extraLabels | object | `{}` | |
|
||||
| vmstorage.extraSecretMounts | list | `[]` | |
|
||||
| vmstorage.extraVolumeMounts | list | `[]` | |
|
||||
| vmstorage.extraVolumes | list | `[]` | |
|
||||
| vmstorage.fullnameOverride | string | `nil` | Overrides the full name of vmstorage component |
|
||||
| vmstorage.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
|
||||
| vmstorage.image.repository | string | `"victoriametrics/vmstorage"` | Image repository |
|
||||
| vmstorage.image.tag | string | `"v1.91.2-cluster"` | Image tag |
|
||||
| vmstorage.initContainers | list | `[]` | |
|
||||
| vmstorage.name | string | `"vmstorage"` | vmstorage container name |
|
||||
| vmstorage.nodeSelector | object | `{}` | Pod's node selector. Ref: [https://kubernetes.io/docs/user-guide/node-selection/](https://kubernetes.io/docs/user-guide/node-selection/) |
|
||||
| vmstorage.persistentVolume.accessModes | list | `["ReadWriteOnce"]` | Array of access modes. Must match those of existing PV or dynamic provisioner. Ref: [http://kubernetes.io/docs/user-guide/persistent-volumes/](http://kubernetes.io/docs/user-guide/persistent-volumes/) |
|
||||
| vmstorage.persistentVolume.annotations | object | `{}` | Persistent volume annotations |
|
||||
| vmstorage.persistentVolume.enabled | bool | `true` | Create/use Persistent Volume Claim for vmstorage component. Empty dir if false. If true, vmstorage will create/use a Persistent Volume Claim |
|
||||
| vmstorage.persistentVolume.existingClaim | string | `""` | Existing Claim name. Requires vmstorage.persistentVolume.enabled: true. If defined, PVC must be created manually before volume will be bound |
|
||||
| vmstorage.persistentVolume.labels | object | `{}` | Persistent volume labels |
|
||||
| vmstorage.persistentVolume.mountPath | string | `"/storage"` | Data root path. Vmstorage data Persistent Volume mount root path |
|
||||
| vmstorage.persistentVolume.size | string | `"8Gi"` | Size of the volume. Better to set the same as resource limit memory property |
|
||||
| vmstorage.persistentVolume.storageClass | string | `""` | Storage class name. Will be empty if not setted |
|
||||
| vmstorage.persistentVolume.subPath | string | `""` | Mount subpath |
|
||||
| vmstorage.podAnnotations | object | `{}` | Pod's annotations |
|
||||
| vmstorage.podDisruptionBudget | object | `{"enabled":false,"labels":{}}` | See `kubectl explain poddisruptionbudget.spec` for more. Ref: [https://kubernetes.io/docs/tasks/run-application/configure-pdb/](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) |
|
||||
| vmstorage.podManagementPolicy | string | `"OrderedReady"` | Deploy order policy for StatefulSet pods |
|
||||
| vmstorage.podSecurityContext | object | `{}` | |
|
||||
| vmstorage.priorityClassName | string | `""` | Name of Priority Class |
|
||||
| vmstorage.probe.liveness.failureThreshold | int | `10` | |
|
||||
| vmstorage.probe.liveness.initialDelaySeconds | int | `30` | |
|
||||
| vmstorage.probe.liveness.periodSeconds | int | `30` | |
|
||||
| vmstorage.probe.liveness.tcpSocket.port | string | `"http"` | |
|
||||
| vmstorage.probe.liveness.timeoutSeconds | int | `5` | |
|
||||
| vmstorage.probe.readiness.failureThreshold | int | `3` | |
|
||||
| vmstorage.probe.readiness.httpGet.path | string | `"/health"` | |
|
||||
| vmstorage.probe.readiness.httpGet.port | string | `"http"` | |
|
||||
| vmstorage.probe.readiness.initialDelaySeconds | int | `5` | |
|
||||
| vmstorage.probe.readiness.periodSeconds | int | `15` | |
|
||||
| vmstorage.probe.readiness.timeoutSeconds | int | `5` | |
|
||||
| vmstorage.replicaCount | int | `2` | Count of vmstorage pods |
|
||||
| vmstorage.resources | object | `{}` | Resource object. Ref: [https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
|
||||
| vmstorage.retentionPeriod | int | `1` | Data retention period. Supported values 1w, 1d, number without measurement means month, e.g. 2 = 2month |
|
||||
| vmstorage.securityContext | object | `{}` | Pod's security context. Ref: [https://kubernetes.io/docs/tasks/configure-pod-container/security-context/](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) |
|
||||
| vmstorage.service.annotations | object | `{}` | Service annotations |
|
||||
| vmstorage.service.extraServicePorts | list | `[]` | Extra service ports |
|
||||
| vmstorage.service.labels | object | `{}` | Service labels |
|
||||
| vmstorage.service.servicePort | int | `8482` | Service port |
|
||||
| vmstorage.service.vminsertPort | int | `8400` | Port for accepting connections from vminsert |
|
||||
| vmstorage.service.vmselectPort | int | `8401` | Port for accepting connections from vmselect |
|
||||
| vmstorage.serviceMonitor.annotations | object | `{}` | Service Monitor annotations |
|
||||
| vmstorage.serviceMonitor.enabled | bool | `false` | Enable deployment of Service Monitor for vmstorage component. This is Prometheus operator object |
|
||||
| vmstorage.serviceMonitor.extraLabels | object | `{}` | Service Monitor labels |
|
||||
| vmstorage.serviceMonitor.namespace | string | `""` | Target namespace of ServiceMonitor manifest |
|
||||
| vmstorage.serviceMonitor.relabelings | list | `[]` | Service Monitor relabelings |
|
||||
| vmstorage.terminationGracePeriodSeconds | int | `60` | Pod's termination grace period in seconds |
|
||||
| vmstorage.tolerations | list | `[]` | Array of tolerations object. Node tolerations for server scheduling to nodes with taints. Ref: [https://kubernetes.io/docs/concepts/configuration/assign-pod-node/](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) # |
|
||||
| vmstorage.vmbackupmanager.destination | string | `""` | backup destination at S3, GCS or local filesystem. Pod name will be included to path! |
|
||||
| vmstorage.vmbackupmanager.disableDaily | bool | `false` | disable daily backups |
|
||||
| vmstorage.vmbackupmanager.disableHourly | bool | `false` | disable hourly backups |
|
||||
| vmstorage.vmbackupmanager.disableMonthly | bool | `false` | disable monthly backups |
|
||||
| vmstorage.vmbackupmanager.disableWeekly | bool | `false` | disable weekly backups |
|
||||
| vmstorage.vmbackupmanager.enable | bool | `false` | enable automatic creation of backup via vmbackupmanager. vmbackupmanager is part of Enterprise packages |
|
||||
| vmstorage.vmbackupmanager.env | list | `[]` | Additional environment variables (ex.: secret tokens, flags) https://github.com/VictoriaMetrics/VictoriaMetrics#environment-variables |
|
||||
| vmstorage.vmbackupmanager.eula | bool | `false` | should be true and means that you have the legal right to run a backup manager that can either be a signed contract or an email with confirmation to run the service in a trial period # https://victoriametrics.com/legal/eula/ |
|
||||
| vmstorage.vmbackupmanager.extraArgs."envflag.enable" | string | `"true"` | |
|
||||
| vmstorage.vmbackupmanager.extraArgs."envflag.prefix" | string | `"VM_"` | |
|
||||
| vmstorage.vmbackupmanager.extraArgs.loggerFormat | string | `"json"` | |
|
||||
| vmstorage.vmbackupmanager.extraSecretMounts | list | `[]` | |
|
||||
| vmstorage.vmbackupmanager.image.repository | string | `"victoriametrics/vmbackupmanager"` | vmbackupmanager image repository |
|
||||
| vmstorage.vmbackupmanager.image.tag | string | `"v1.91.2-enterprise"` | vmbackupmanager image tag |
|
||||
| vmstorage.vmbackupmanager.livenessProbe.failureThreshold | int | `10` | |
|
||||
| vmstorage.vmbackupmanager.livenessProbe.initialDelaySeconds | int | `30` | |
|
||||
| vmstorage.vmbackupmanager.livenessProbe.periodSeconds | int | `30` | |
|
||||
| vmstorage.vmbackupmanager.livenessProbe.tcpSocket.port | string | `"manager-http"` | |
|
||||
| vmstorage.vmbackupmanager.livenessProbe.timeoutSeconds | int | `5` | |
|
||||
| vmstorage.vmbackupmanager.readinessProbe.failureThreshold | int | `3` | |
|
||||
| vmstorage.vmbackupmanager.readinessProbe.httpGet.path | string | `"/health"` | |
|
||||
| vmstorage.vmbackupmanager.readinessProbe.httpGet.port | string | `"manager-http"` | |
|
||||
| vmstorage.vmbackupmanager.readinessProbe.initialDelaySeconds | int | `5` | |
|
||||
| vmstorage.vmbackupmanager.readinessProbe.periodSeconds | int | `15` | |
|
||||
| vmstorage.vmbackupmanager.readinessProbe.timeoutSeconds | int | `5` | |
|
||||
| vmstorage.vmbackupmanager.resources | object | `{}` | |
|
||||
| vmstorage.vmbackupmanager.restore | object | `{"onStart":{"enabled":false}}` | Allows to enable restore options for pod. Read more: https://docs.victoriametrics.com/vmbackupmanager.html#restore-commands |
|
||||
| vmstorage.vmbackupmanager.retention | object | `{"keepLastDaily":2,"keepLastHourly":2,"keepLastMonthly":2,"keepLastWeekly":2}` | backups' retention settings |
|
||||
| vmstorage.vmbackupmanager.retention.keepLastDaily | int | `2` | keep last N daily backups. 0 means delete all existing daily backups. Specify -1 to turn off |
|
||||
| vmstorage.vmbackupmanager.retention.keepLastHourly | int | `2` | keep last N hourly backups. 0 means delete all existing hourly backups. Specify -1 to turn off |
|
||||
| vmstorage.vmbackupmanager.retention.keepLastMonthly | int | `2` | keep last N monthly backups. 0 means delete all existing monthly backups. Specify -1 to turn off |
|
||||
| vmstorage.vmbackupmanager.retention.keepLastWeekly | int | `2` | keep last N weekly backups. 0 means delete all existing weekly backups. Specify -1 to turn off |
|
||||
@@ -0,0 +1,105 @@
|
||||
# Victoria Metrics Helm Chart for Cluster Version
|
||||
|
||||
{{ template "chart.typeBadge" . }} {{ template "chart.versionBadge" . }}
|
||||
|
||||
{{ template "chart.description" . }}
|
||||
|
||||
# Prerequisites
|
||||
|
||||
* Install the follow packages: ``git``, ``kubectl``, ``helm``, ``helm-docs``. See this [tutorial](../../REQUIREMENTS.md).
|
||||
|
||||
* PV support on underlying infrastructure
|
||||
|
||||
# Chart Details
|
||||
|
||||
Note: this chart installs VictoriaMetrics cluster components such as vminsert, vmselect and vmstorage. It doesn't create or configure metrics scraping. If you are looking for a chart to configure monitoring stack in cluster check out [victoria-metrics-k8s-stack chart](https://github.com/VictoriaMetrics/helm-charts/tree/master/charts/victoria-metrics-k8s-stack#helm-chart-for-victoria-metrics-kubernetes-monitoring-stack).
|
||||
|
||||
# How to install
|
||||
|
||||
Access a Kubernetes cluster.
|
||||
|
||||
Add a chart helm repository with follow commands:
|
||||
|
||||
```console
|
||||
helm repo add vm https://victoriametrics.github.io/helm-charts/
|
||||
|
||||
helm repo update
|
||||
```
|
||||
|
||||
List versions of ``vm/victoria-metrics-cluster`` chart available to installation:
|
||||
|
||||
##### for helm v3
|
||||
|
||||
```console
|
||||
helm search repo vm/victoria-metrics-cluster -l
|
||||
```
|
||||
|
||||
Export default values of ``victoria-metrics-cluster`` chart to file ``values.yaml``:
|
||||
|
||||
```console
|
||||
helm show values vm/victoria-metrics-cluster > values.yaml
|
||||
```
|
||||
|
||||
Change the values according to the need of the environment in ``values.yaml`` file.
|
||||
|
||||
Test the installation with command:
|
||||
|
||||
```console
|
||||
helm install vmcluster vm/victoria-metrics-cluster -f values.yaml -n NAMESPACE --debug --dry-run
|
||||
```
|
||||
|
||||
Install chart with command:
|
||||
|
||||
##### for helm v3
|
||||
|
||||
```console
|
||||
helm install vmcluster vm/victoria-metrics-cluster -f values.yaml -n NAMESPACE
|
||||
```
|
||||
|
||||
Get the pods lists by running this commands:
|
||||
|
||||
```console
|
||||
kubectl get pods -A | grep 'vminsert\|vmselect\|vmstorage'
|
||||
```
|
||||
|
||||
Get the application by running this command:
|
||||
|
||||
```console
|
||||
helm list -f vmcluster -n NAMESPACE
|
||||
```
|
||||
|
||||
See the history of versions of ``vmcluster`` application with command.
|
||||
|
||||
```console
|
||||
helm history vmcluster -n NAMESPACE
|
||||
```
|
||||
|
||||
# How to uninstall
|
||||
|
||||
Remove application with command.
|
||||
|
||||
```console
|
||||
helm uninstall vmcluster -n NAMESPACE
|
||||
```
|
||||
|
||||
# Documentation of Helm Chart
|
||||
|
||||
Install ``helm-docs`` following the instructions on this [tutorial](../../REQUIREMENTS.md).
|
||||
|
||||
Generate docs with ``helm-docs`` command.
|
||||
|
||||
```bash
|
||||
cd charts/victoria-metrics-cluster
|
||||
|
||||
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-cluster/values.yaml`` file.
|
||||
|
||||
{{ template "chart.valuesTable" . }}
|
||||
@@ -0,0 +1,76 @@
|
||||
{{ if .Values.printNotes }}
|
||||
{{ if .Values.vminsert.enabled }}
|
||||
Write API:
|
||||
|
||||
The Victoria Metrics write api can be accessed via port {{ .Values.vminsert.service.servicePort }} with the following DNS name from within your cluster:
|
||||
{{ template "victoria-metrics.vminsert.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomainSuffix }}
|
||||
|
||||
Get the Victoria Metrics insert service URL by running these commands in the same shell:
|
||||
{{- if contains "NodePort" .Values.vminsert.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "victoria-metrics.vminsert.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.vminsert.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "victoria-metrics.vminsert.fullname" . }}'
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "victoria-metrics.vminsert.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo http://$SERVICE_IP:{{ .Values.vminsert.service.servicePort }}
|
||||
{{- else if contains "ClusterIP" .Values.vminsert.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ .Values.vminsert.name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME {{ .Values.vminsert.service.servicePort }}
|
||||
{{- end }}
|
||||
|
||||
You need to update your Prometheus configuration file and add the following lines to it:
|
||||
|
||||
prometheus.yml
|
||||
|
||||
remote_write:
|
||||
- url: "http://<insert-service>/insert/0/prometheus/"
|
||||
|
||||
|
||||
|
||||
for example - inside the Kubernetes cluster:
|
||||
|
||||
remote_write:
|
||||
- url: "http://{{ template "victoria-metrics.vminsert.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomainSuffix }}:{{ .Values.vminsert.service.servicePort }}/insert/0/prometheus/"
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.vmselect.enabled }}
|
||||
Read API:
|
||||
|
||||
The VictoriaMetrics read api can be accessed via port {{ .Values.vmselect.service.servicePort }} with the following DNS name from within your cluster:
|
||||
{{ template "victoria-metrics.vmselect.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomainSuffix }}
|
||||
|
||||
Get the VictoriaMetrics select service URL by running these commands in the same shell:
|
||||
{{- if contains "NodePort" .Values.vmselect.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "victoria-metrics.vminsert.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.vmselect.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "victoria-metrics.vminsert.fullname" . }}'
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "victoria-metrics.vmselect.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo http://$SERVICE_IP:{{ .Values.vmselect.service.servicePort }}
|
||||
{{- else if contains "ClusterIP" .Values.vmselect.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ .Values.vmselect.name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME {{ .Values.vmselect.service.servicePort }}
|
||||
{{- end }}
|
||||
|
||||
You need to specify select service URL into your Grafana:
|
||||
NOTE: you need to use the Prometheus Data Source
|
||||
|
||||
Input this URL field into Grafana
|
||||
|
||||
http://<select-service>/select/0/prometheus/
|
||||
|
||||
|
||||
for example - inside the Kubernetes cluster:
|
||||
|
||||
http://{{ template "victoria-metrics.vmselect.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomainSuffix }}:{{ .Values.vmselect.service.servicePort }}/select/0/prometheus/
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,438 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "victoria-metrics.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Maintainer - Akshay Gupta
|
||||
Tolerations and nodeSelector via Resources Requests.
|
||||
*/}}
|
||||
{{- define "meesho.vminsert.getCpu" -}}
|
||||
{{- $cpu := toString .Values.vminsert.resources.requests.cpu -}}
|
||||
{{- if contains "m" $cpu -}}
|
||||
{{- $cpu := trimAll "m" $cpu | float64 -}}
|
||||
{{- $cpu := $cpu | float64 -}}
|
||||
{{- printf "%f" $cpu -}}
|
||||
{{- else -}}
|
||||
{{- $cpu := mulf $cpu 1000.000 -}}
|
||||
{{- printf "%f" $cpu -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "meesho.vminsert.getMem" -}}
|
||||
{{- $mem := toString .Values.vminsert.resources.requests.memory -}}
|
||||
{{- if contains "Mi" $mem -}}
|
||||
{{- $mem := trimAll "Mi" $mem | float64 -}}
|
||||
{{- printf "%f" $mem -}}
|
||||
{{- else if contains "Gi" $mem -}}
|
||||
{{- $mem := trimAll "Gi" $mem | float64 -}}
|
||||
{{- $mem := mulf $mem 1024.000 -}}
|
||||
{{- printf "%f" $mem -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "meesho.vminsert.getRatio" -}}
|
||||
{{- $cpu := (include "meesho.vminsert.getCpu" .) -}}
|
||||
{{- $mem := (include "meesho.vminsert.getMem" .) -}}
|
||||
{{- $ratio := divf $mem $cpu -}}
|
||||
{{- if gt $ratio 4.00 -}}
|
||||
{{- printf "1to8" -}}
|
||||
{{- else if gt $ratio 2.00 -}}
|
||||
{{- printf "1to4" -}}
|
||||
{{- else -}}
|
||||
{{- printf "1to2" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "meesho.vminsert.dedicatedValue" -}}
|
||||
{{- if (index .Values.vminsert.extraLabels "arch") -}}
|
||||
{{- if (index .Values.vminsert.extraLabels "runpod") -}}
|
||||
{{- $cpu := (include "meesho.vminsert.getCpu" .) -}}
|
||||
{{- $mem := (include "meesho.vminsert.getMem" .) -}}
|
||||
{{- $ratio := (include "meesho.vminsert.getRatio" .) -}}
|
||||
{{- $arch := .Values.vminsert.extraLabels.arch -}}
|
||||
{{- $runPod := .Values.vminsert.extraLabels.runpod -}}
|
||||
{{- printf "%s-%s-%s" $ratio $arch $runPod -}}
|
||||
{{- else -}}
|
||||
{{- printf "missing-runpod-label" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "missing-arch-label" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Maintainer - Akshay Gupta
|
||||
Tolerations and nodeSelector via Resources Requests.
|
||||
*/}}
|
||||
{{- define "meesho.vmselect.getCpu" -}}
|
||||
{{- $cpu := toString .Values.vmselect.resources.requests.cpu -}}
|
||||
{{- if contains "m" $cpu -}}
|
||||
{{- $cpu := trimAll "m" $cpu | float64 -}}
|
||||
{{- $cpu := $cpu | float64 -}}
|
||||
{{- printf "%f" $cpu -}}
|
||||
{{- else -}}
|
||||
{{- $cpu := mulf $cpu 1000.000 -}}
|
||||
{{- printf "%f" $cpu -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "meesho.vmselect.getMem" -}}
|
||||
{{- $mem := toString .Values.vmselect.resources.requests.memory -}}
|
||||
{{- if contains "Mi" $mem -}}
|
||||
{{- $mem := trimAll "Mi" $mem | float64 -}}
|
||||
{{- printf "%f" $mem -}}
|
||||
{{- else if contains "Gi" $mem -}}
|
||||
{{- $mem := trimAll "Gi" $mem | float64 -}}
|
||||
{{- $mem := mulf $mem 1024.000 -}}
|
||||
{{- printf "%f" $mem -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "meesho.vmselect.getRatio" -}}
|
||||
{{- $cpu := (include "meesho.vmselect.getCpu" .) -}}
|
||||
{{- $mem := (include "meesho.vmselect.getMem" .) -}}
|
||||
{{- $ratio := divf $mem $cpu -}}
|
||||
{{- if gt $ratio 4.00 -}}
|
||||
{{- printf "1to8" -}}
|
||||
{{- else if gt $ratio 2.00 -}}
|
||||
{{- printf "1to4" -}}
|
||||
{{- else -}}
|
||||
{{- printf "1to2" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "meesho.vmselect.dedicatedValue" -}}
|
||||
{{- if (index .Values.vmselect.extraLabels "arch") -}}
|
||||
{{- if (index .Values.vmselect.extraLabels "runpod") -}}
|
||||
{{- $cpu := (include "meesho.vmselect.getCpu" .) -}}
|
||||
{{- $mem := (include "meesho.vmselect.getMem" .) -}}
|
||||
{{- $ratio := (include "meesho.vmselect.getRatio" .) -}}
|
||||
{{- $arch := .Values.vmselect.extraLabels.arch -}}
|
||||
{{- $runPod := .Values.vmselect.extraLabels.runpod -}}
|
||||
{{- printf "%s-%s-%s" $ratio $arch $runPod -}}
|
||||
{{- else -}}
|
||||
{{- printf "missing-runpod-label" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "missing-arch-label" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Maintainer - Akshay Gupta
|
||||
Tolerations and nodeSelector via Resources Requests.
|
||||
*/}}
|
||||
{{- define "meesho.vmstorage.getCpu" -}}
|
||||
{{- $cpu := toString .Values.vmstorage.resources.requests.cpu -}}
|
||||
{{- if contains "m" $cpu -}}
|
||||
{{- $cpu := trimAll "m" $cpu | float64 -}}
|
||||
{{- $cpu := $cpu | float64 -}}
|
||||
{{- printf "%f" $cpu -}}
|
||||
{{- else -}}
|
||||
{{- $cpu := mulf $cpu 1000.000 -}}
|
||||
{{- printf "%f" $cpu -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "meesho.vmstorage.getMem" -}}
|
||||
{{- $mem := toString .Values.vmstorage.resources.requests.memory -}}
|
||||
{{- if contains "Mi" $mem -}}
|
||||
{{- $mem := trimAll "Mi" $mem | float64 -}}
|
||||
{{- printf "%f" $mem -}}
|
||||
{{- else if contains "Gi" $mem -}}
|
||||
{{- $mem := trimAll "Gi" $mem | float64 -}}
|
||||
{{- $mem := mulf $mem 1024.000 -}}
|
||||
{{- printf "%f" $mem -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "meesho.vmstorage.getRatio" -}}
|
||||
{{- $cpu := (include "meesho.vmstorage.getCpu" .) -}}
|
||||
{{- $mem := (include "meesho.vmstorage.getMem" .) -}}
|
||||
{{- $ratio := divf $mem $cpu -}}
|
||||
{{- if gt $ratio 4.00 -}}
|
||||
{{- printf "1to8" -}}
|
||||
{{- else if gt $ratio 2.00 -}}
|
||||
{{- printf "1to4" -}}
|
||||
{{- else -}}
|
||||
{{- printf "1to2" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "meesho.vmstorage.dedicatedValue" -}}
|
||||
{{- if (index .Values.vmstorage.extraLabels "arch") -}}
|
||||
{{- if (index .Values.vmstorage.extraLabels "runpod") -}}
|
||||
{{- $cpu := (include "meesho.vmstorage.getCpu" .) -}}
|
||||
{{- $mem := (include "meesho.vmstorage.getMem" .) -}}
|
||||
{{- $ratio := (include "meesho.vmstorage.getRatio" .) -}}
|
||||
{{- $arch := .Values.vmstorage.extraLabels.arch -}}
|
||||
{{- $runPod := .Values.vmstorage.extraLabels.runpod -}}
|
||||
{{- printf "%s-%s-%s" $ratio $arch $runPod -}}
|
||||
{{- else -}}
|
||||
{{- printf "missing-runpod-label" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "missing-arch-label" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "victoria-metrics.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "victoria-metrics.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account
|
||||
*/}}
|
||||
{{- define "victoria-metrics.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "victoria-metrics.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create unified labels for victoria-metrics components
|
||||
*/}}
|
||||
{{- define "victoria-metrics.common.matchLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "victoria-metrics.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.common.metaLabels" -}}
|
||||
helm.sh/chart: {{ include "victoria-metrics.chart" . }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.vmstorage.labels" -}}
|
||||
{{ include "victoria-metrics.vmstorage.matchLabels" . }}
|
||||
{{ include "victoria-metrics.common.metaLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.vmstorage.matchLabels" -}}
|
||||
app: {{ .Values.vmstorage.name }}
|
||||
{{ include "victoria-metrics.common.matchLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.vmselect.labels" -}}
|
||||
{{ include "victoria-metrics.vmselect.matchLabels" . }}
|
||||
{{ include "victoria-metrics.common.metaLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.vmselect.matchLabels" -}}
|
||||
app: {{ .Values.vmselect.name }}
|
||||
{{ include "victoria-metrics.common.matchLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.vminsert.labels" -}}
|
||||
{{ include "victoria-metrics.vminsert.matchLabels" . }}
|
||||
{{ include "victoria-metrics.common.metaLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.vminsert.matchLabels" -}}
|
||||
app: {{ .Values.vminsert.name }}
|
||||
{{ include "victoria-metrics.common.matchLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a fully qualified vmstorage name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "victoria-metrics.vmstorage.fullname" -}}
|
||||
{{- if .Values.vmstorage.fullnameOverride -}}
|
||||
{{- .Values.vmstorage.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- printf "%s-%s" .Release.Name .Values.vmstorage.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.vmstorage.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a fully qualified vmselect name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "victoria-metrics.vmselect.fullname" -}}
|
||||
{{- if .Values.vmselect.fullnameOverride -}}
|
||||
{{- .Values.vmselect.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- printf "%s-%s" .Release.Name .Values.vmselect.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.vmselect.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a fully qualified vmselect name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "victoria-metrics.vminsert.fullname" -}}
|
||||
{{- if .Values.vminsert.fullnameOverride -}}
|
||||
{{- .Values.vminsert.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- printf "%s-%s" .Release.Name .Values.vminsert.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.vminsert.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.vminsert.vmstorage-pod-fqdn" -}}
|
||||
{{- $pod := include "victoria-metrics.vmstorage.fullname" . -}}
|
||||
{{- $svc := include "victoria-metrics.vmstorage.fullname" . -}}
|
||||
{{- $namespace := .Release.Namespace -}}
|
||||
{{- $dnsSuffix := .Values.clusterDomainSuffix -}}
|
||||
{{- range $i := until (.Values.vmstorage.replicaCount | int) -}}
|
||||
{{- printf "- --storageNode=%s-%d.%s.%s.svc.%s:8400\n" $pod $i $svc $namespace $dnsSuffix -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.vmselect.vmstorage-pod-fqdn" -}}
|
||||
{{- $pod := include "victoria-metrics.vmstorage.fullname" . -}}
|
||||
{{- $svc := include "victoria-metrics.vmstorage.fullname" . -}}
|
||||
{{- $namespace := .Release.Namespace -}}
|
||||
{{- $dnsSuffix := .Values.clusterDomainSuffix -}}
|
||||
{{- $bu := .Values.vmselect.extraLabels.bu -}}
|
||||
{{- $zoneExt := .Values.vmselect.extraLabels.zone_extended | default "" -}}
|
||||
{{- range $i := until (.Values.vmstorage.replicaCount | int) -}}
|
||||
{{- printf "- --storageNode=%s-%d.%s.%s.svc.%s:8401\n" $pod $i $svc $namespace $dnsSuffix -}}
|
||||
{{- end }}
|
||||
{{- if and (eq $zoneExt "") (ne $bu "infra") -}}
|
||||
{{- printf "- --storageNode=vmselect-%s-ase1c-prd.meeshogcp.in:8401\n" $bu }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.vmselect.vmselect-pod-fqdn" -}}
|
||||
{{- $pod := include "victoria-metrics.vmselect.fullname" . -}}
|
||||
{{- $svc := include "victoria-metrics.vmselect.fullname" . -}}
|
||||
{{- $namespace := .Release.Namespace -}}
|
||||
{{- $dnsSuffix := .Values.clusterDomainSuffix -}}
|
||||
{{- range $i := until (.Values.vmselect.replicaCount | int) -}}
|
||||
{{- printf "- --selectNode=%s-%d.%s.%s.svc.%s:8481\n" $pod $i $svc $namespace $dnsSuffix -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "split-host-port" -}}
|
||||
{{- $hp := split ":" . -}}
|
||||
{{- printf "%s" $hp._1 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for ingress.
|
||||
*/}}
|
||||
{{- define "victoria-metrics.ingress.apiVersion" -}}
|
||||
{{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") -}}
|
||||
{{- print "networking.k8s.io/v1" -}}
|
||||
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
|
||||
{{- print "networking.k8s.io/v1beta1" -}}
|
||||
{{- else -}}
|
||||
{{- print "extensions/v1beta1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return if ingress is stable.
|
||||
*/}}
|
||||
{{- define "victoria-metrics.ingress.isStable" -}}
|
||||
{{- eq (include "victoria-metrics.ingress.apiVersion" .) "networking.k8s.io/v1" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return if ingress supports ingressClassName.
|
||||
*/}}
|
||||
{{- define "victoria-metrics.ingress.supportsIngressClassName" -}}
|
||||
{{- or (eq (include "victoria-metrics.ingress.isStable" .) "true") (and (eq (include "victoria-metrics.ingress.apiVersion" .) "networking.k8s.io/v1beta1")) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return if ingress supports pathType.
|
||||
*/}}
|
||||
{{- define "victoria-metrics.ingress.supportsPathType" -}}
|
||||
{{- or (eq (include "victoria-metrics.ingress.isStable" .) "true") (and (eq (include "victoria-metrics.ingress.apiVersion" .) "networking.k8s.io/v1beta1")) -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "victoria-metrics.storage.hasInitContainer" -}}
|
||||
{{- or (gt (len .Values.vmstorage.initContainers) 0) .Values.vmstorage.vmbackupmanager.restore.onStart.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "victoria-metrics.storage.initContiners" -}}
|
||||
{{- if eq (include "victoria-metrics.storage.hasInitContainer" . ) "true" -}}
|
||||
{{- with .Values.vmstorage.initContainers -}}
|
||||
{{ toYaml . }}
|
||||
{{- end -}}
|
||||
{{- if .Values.vmstorage.vmbackupmanager.restore.onStart.enabled }}
|
||||
- name: {{ template "victoria-metrics.name" . }}-vmbackupmanager-restore
|
||||
image: "{{ .Values.vmstorage.vmbackupmanager.image.repository }}:{{ .Values.vmstorage.vmbackupmanager.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.vmstorage.image.pullPolicy }}"
|
||||
{{- with .Values.vmstorage.podSecurityContext }}
|
||||
securityContext: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
args:
|
||||
- restore
|
||||
- {{ printf "%s=%t" "--eula" .Values.vmstorage.vmbackupmanager.eula | quote}}
|
||||
- {{ printf "%s=%s" "--storageDataPath" .Values.vmstorage.persistentVolume.mountPath | quote}}
|
||||
{{- range $key, $value := .Values.vmstorage.vmbackupmanager.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmstorage.vmbackupmanager.resources }}
|
||||
resources: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
{{- with .Values.vmstorage.vmbackupmanager.env }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: manager-http
|
||||
containerPort: 8300
|
||||
volumeMounts:
|
||||
- name: vmstorage-volume
|
||||
mountPath: {{ .Values.vmstorage.persistentVolume.mountPath }}
|
||||
subPath: {{ .Values.vmstorage.persistentVolume.subPath }}
|
||||
{{- range .Values.vmstorage.vmbackupmanager.extraSecretMounts }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .mountPath }}
|
||||
subPath: {{ .subPath }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else -}}
|
||||
[]
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,24 @@
|
||||
{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }}
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ template "victoria-metrics.fullname" . }}-clusterrole
|
||||
labels:
|
||||
{{- include "victoria-metrics.common.metaLabels" . | nindent 4 }}
|
||||
{{- if .Values.rbac.extraLabels }}
|
||||
{{ toYaml .Values.rbac.extraLabels | indent 4}}
|
||||
{{- end }}
|
||||
{{- with .Values.rbac.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
|
||||
rules:
|
||||
- apiGroups: ['extensions']
|
||||
resources: ['podsecuritypolicies']
|
||||
verbs: ['use']
|
||||
resourceNames: [{{ template "victoria-metrics.fullname" . }}]
|
||||
{{- else }}
|
||||
rules: []
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,23 @@
|
||||
{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }}
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ template "victoria-metrics.fullname" . }}-clusterrolebinding
|
||||
labels:
|
||||
{{- include "victoria-metrics.common.metaLabels" . | nindent 4 }}
|
||||
{{- if .Values.rbac.extraLabels }}
|
||||
{{ toYaml .Values.rbac.extraLabels | indent 4}}
|
||||
{{- end }}
|
||||
{{- with .Values.rbac.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "victoria-metrics.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ template "victoria-metrics.fullname" . }}-clusterrole
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,24 @@
|
||||
{{- if .Values.extraSecrets }}
|
||||
{{- range .Values.extraSecrets }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
{{- if .annotations }}
|
||||
annotations:
|
||||
{{ toYaml .annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.common.metaLabels" $ | nindent 4 }}
|
||||
{{- if .labels }}
|
||||
{{ toYaml .labels | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ .name }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- with .data }}
|
||||
{{- tpl . $ | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,42 @@
|
||||
{{- if and .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: {{ template "victoria-metrics.fullname" . }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.common.metaLabels" . | nindent 4 }}
|
||||
{{- if .Values.rbac.extraLabels }}
|
||||
{{ toYaml .Values.rbac.extraLabels | indent 4}}
|
||||
{{- end }}
|
||||
annotations:
|
||||
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
|
||||
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
|
||||
{{- if .Values.rbac.annotations }}
|
||||
{{ toYaml .Values.rbac.annotations | indent 4}}
|
||||
{{- end }}
|
||||
spec:
|
||||
privileged: false
|
||||
allowPrivilegeEscalation: false
|
||||
requiredDropCapabilities:
|
||||
# Default set from Docker, with DAC_OVERRIDE and CHOWN
|
||||
- ALL
|
||||
volumes:
|
||||
- 'configMap'
|
||||
- 'emptyDir'
|
||||
- 'projected'
|
||||
- 'secret'
|
||||
- 'downwardAPI'
|
||||
- 'persistentVolumeClaim'
|
||||
hostNetwork: false
|
||||
hostIPC: false
|
||||
hostPID: false
|
||||
runAsUser:
|
||||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
supplementalGroups:
|
||||
rule: 'RunAsAny'
|
||||
fsGroup:
|
||||
rule: 'RunAsAny'
|
||||
readOnlyRootFilesystem: false
|
||||
{{- end }}
|
||||
@@ -0,0 +1,25 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "victoria-metrics.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.common.metaLabels" . | nindent 4 }}
|
||||
{{- if .Values.rbac.extraLabels }}
|
||||
{{ toYaml .Values.rbac.extraLabels | indent 4}}
|
||||
{{- end }}
|
||||
{{- with .Values.rbac.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
|
||||
rules:
|
||||
- apiGroups: ['extensions']
|
||||
resources: ['podsecuritypolicies']
|
||||
verbs: ['use']
|
||||
resourceNames: [{{ template "victoria-metrics.fullname" . }}]
|
||||
{{- else }}
|
||||
rules: []
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,24 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "victoria-metrics.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.common.metaLabels" . | nindent 4 }}
|
||||
{{- if .Values.rbac.extraLabels }}
|
||||
{{ toYaml .Values.rbac.extraLabels | indent 4}}
|
||||
{{- end }}
|
||||
{{- with .Values.rbac.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "victoria-metrics.fullname" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "victoria-metrics.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "victoria-metrics.common.metaLabels" . | nindent 4 }}
|
||||
{{- if .Values.serviceAccount.extraLabels }}
|
||||
{{ toYaml .Values.serviceAccount.extraLabels | indent 4}}
|
||||
{{- end }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,182 @@
|
||||
{{- if .Values.vminsert.enabled -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
{{- with .Values.vminsert.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vminsert.labels" . | nindent 4 }}
|
||||
{{- with .Values.vminsert.extraLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vminsert.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "victoria-metrics.vminsert.matchLabels" . | nindent 6 }}
|
||||
{{- if not .Values.vminsert.horizontalPodAutoscaler.enabled }}
|
||||
replicas: {{ .Values.vminsert.replicaCount }}
|
||||
{{- end }}
|
||||
{{- with .Values.vminsert.strategy }}
|
||||
strategy:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.vminsert.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vminsert.labels" . | nindent 8 }}
|
||||
{{- with .Values.vminsert.extraLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.vminsert.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{ toYaml .Values.vminsert.topologySpreadConstraints | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.vminsert.priorityClassName }}
|
||||
priorityClassName: "{{ . }}"
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken }}
|
||||
{{- with .Values.vminsert.initContainers }}
|
||||
initContainers:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "victoria-metrics.name" . }}-{{ .Values.vminsert.name }}
|
||||
image: "{{ .Values.vminsert.image.repository }}:{{ .Values.vminsert.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.vminsert.image.pullPolicy }}"
|
||||
{{- if .Values.vminsert.containerWorkingDir }}
|
||||
workingDir: {{ .Values.vminsert.containerWorkingDir }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.vminsert.podSecurityContext | nindent 12 }}
|
||||
args:
|
||||
{{- if not .Values.vminsert.suppresStorageFQDNsRender }}
|
||||
{{- include "victoria-metrics.vminsert.vmstorage-pod-fqdn" . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.vminsert.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: TZ
|
||||
value: Asia/Kolkata
|
||||
{{- with .Values.vminsert.env }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8480
|
||||
{{- if .Values.vminsert.extraArgs.clusternativeListenAddr }}
|
||||
- name: cluster-tcp
|
||||
protocol: TCP
|
||||
containerPort: {{ include "split-host-port" .Values.vminsert.extraArgs.clusternativeListenAddr }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.graphiteListenAddr }}
|
||||
- name: graphite-tcp
|
||||
protocol: TCP
|
||||
containerPort: {{ include "split-host-port" .Values.vminsert.extraArgs.graphiteListenAddr }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.graphiteListenAddr }}
|
||||
- name: graphite-udp
|
||||
protocol: UDP
|
||||
containerPort: {{ include "split-host-port" .Values.vminsert.extraArgs.graphiteListenAddr }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.influxListenAddr }}
|
||||
- name: influx-tcp
|
||||
protocol: TCP
|
||||
containerPort: {{ include "split-host-port" .Values.vminsert.extraArgs.influxListenAddr }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.influxListenAddr }}
|
||||
- name: influx-udp
|
||||
protocol: UDP
|
||||
containerPort: {{ include "split-host-port" .Values.vminsert.extraArgs.influxListenAddr }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.opentsdbHTTPListenAddr }}
|
||||
- name: opentsdbhttp
|
||||
protocol: TCP
|
||||
containerPort: {{ include "split-host-port" .Values.vminsert.extraArgs.opentsdbHTTPListenAddr }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.opentsdbListenAddr }}
|
||||
- name: opentsdb-tcp
|
||||
protocol: TCP
|
||||
containerPort: {{ include "split-host-port" .Values.vminsert.extraArgs.opentsdbListenAddr }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.opentsdbListenAddr }}
|
||||
- name: opentsdb-udp
|
||||
protocol: UDP
|
||||
containerPort: {{ include "split-host-port" .Values.vminsert.extraArgs.opentsdbListenAddr }}
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
{{- if index .Values.vminsert.extraArgs "http.pathPrefix" }}
|
||||
path: {{ trimSuffix "/" (index .Values.vminsert.extraArgs "http.pathPrefix") }}/health
|
||||
{{- else }}
|
||||
path: /health
|
||||
{{- end }}
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.vminsert.probe.readiness.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.vminsert.probe.readiness.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.vminsert.probe.readiness.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.vminsert.probe.readiness.failureThreshold }}
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.vminsert.probe.liveness.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.vminsert.probe.liveness.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.vminsert.probe.liveness.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.vminsert.probe.liveness.failureThreshold }}
|
||||
{{- with .Values.vminsert.extraVolumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
resources: {{- toYaml .Values.vminsert.resources | nindent 12 }}
|
||||
{{- with .Values.vminsert.extraContainers }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.vminsert.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "victoria-metrics.serviceAccountName" . }}
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: "{{ .Values.schedulerName }}"
|
||||
{{- end }}
|
||||
nodeSelector:
|
||||
{{- if .Values.dedicatedValue }}
|
||||
dedicated: {{ include "meesho.vminsert.dedicatedValue" . }}
|
||||
{{- else }}
|
||||
{{- with .Values.vminsert.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
tolerations:
|
||||
{{- if .Values.dedicatedValue }}
|
||||
- key: "dedicated"
|
||||
operator: "Equal"
|
||||
value: {{ include "meesho.vminsert.dedicatedValue" . }}
|
||||
effect: "NoSchedule"
|
||||
{{- else }}
|
||||
{{- with .Values.vminsert.tolerations }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.vminsert.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.vminsert.extraVolumes }}
|
||||
volumes:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,25 @@
|
||||
{{- if .Values.vminsert.horizontalPodAutoscaler.enabled }}
|
||||
{{- if .Capabilities.APIVersions.Has "autoscaling/v2" -}}
|
||||
apiVersion: autoscaling/v2
|
||||
{{- else}}
|
||||
apiVersion: autoscaling/v2beta2
|
||||
{{- end}}
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "victoria-metrics.vminsert.labels" . | nindent 4 }}
|
||||
{{- with .Values.vminsert.extraLabels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vminsert.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
maxReplicas: {{ .Values.vminsert.horizontalPodAutoscaler.maxReplicas }}
|
||||
minReplicas: {{ .Values.vminsert.horizontalPodAutoscaler.minReplicas }}
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ template "victoria-metrics.vminsert.fullname" . }}
|
||||
metrics:
|
||||
{{ toYaml .Values.vminsert.horizontalPodAutoscaler.metrics | indent 4 }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,50 @@
|
||||
{{- if and .Values.vminsert.enabled .Values.vminsert.ingress.enabled }}
|
||||
{{- $ingressApiIsStable := eq (include "victoria-metrics.ingress.isStable" .) "true" -}}
|
||||
{{- $ingressSupportsIngressClassName := eq (include "victoria-metrics.ingress.supportsIngressClassName" .) "true" -}}
|
||||
{{- $ingressSupportsPathType := eq (include "victoria-metrics.ingress.supportsPathType" .) "true" -}}
|
||||
{{- $servicePort := .Values.vminsert.service.servicePort -}}
|
||||
{{- $ingressPathType := .Values.vminsert.ingress.pathType -}}
|
||||
apiVersion: {{ include "victoria-metrics.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
{{- if .Values.vminsert.ingress.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vminsert.ingress.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vminsert.labels" . | nindent 4 }}
|
||||
{{ if .Values.vminsert.ingress.extraLabels }}
|
||||
{{ toYaml .Values.vminsert.ingress.extraLabels | indent 4 }}
|
||||
{{ end }}
|
||||
name: {{ template "victoria-metrics.vminsert.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
{{- if and $ingressSupportsIngressClassName .Values.vminsert.ingress.ingressClassName }}
|
||||
ingressClassName: {{ .Values.vminsert.ingress.ingressClassName }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- $serviceName := include "victoria-metrics.vminsert.fullname" . }}
|
||||
{{- range .Values.vminsert.ingress.hosts }}
|
||||
- host: {{ .name }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ .path }}
|
||||
{{- if $ingressSupportsPathType }}
|
||||
pathType: {{ $ingressPathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if $ingressApiIsStable }}
|
||||
service:
|
||||
name: {{ $serviceName }}
|
||||
port:
|
||||
number: {{ $servicePort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: {{ .port | default "http"}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- if .Values.vminsert.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.vminsert.ingress.tls | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,26 @@
|
||||
{{- if .Values.vminsert.podDisruptionBudget.enabled }}
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }}
|
||||
apiVersion: policy/v1
|
||||
{{- else -}}
|
||||
apiVersion: policy/v1beta1
|
||||
{{- end }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "victoria-metrics.vminsert.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vminsert.labels" . | nindent 4 }}
|
||||
{{- with .Values.vminsert.podDisruptionBudget.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.vminsert.podDisruptionBudget.minAvailable }}
|
||||
minAvailable: {{ .Values.vminsert.podDisruptionBudget.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.podDisruptionBudget.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.vminsert.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "victoria-metrics.vminsert.matchLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,44 @@
|
||||
{{- if and .Values.vminsert.enabled .Values.vminsert.serviceMonitor.enabled -}}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
{{- if .Values.vminsert.serviceMonitor.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vminsert.serviceMonitor.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vminsert.labels" . | nindent 4 }}
|
||||
{{- if .Values.vminsert.serviceMonitor.extraLabels }}
|
||||
{{ toYaml .Values.vminsert.serviceMonitor.extraLabels | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vminsert.fullname" . }}
|
||||
{{- if .Values.vminsert.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.vminsert.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "victoria-metrics.vminsert.matchLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- port: http
|
||||
{{- if .Values.vminsert.serviceMonitor.scheme }}
|
||||
scheme: {{ .Values.vminsert.serviceMonitor.scheme }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.serviceMonitor.interval }}
|
||||
interval: {{ .Values.vminsert.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.vminsert.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
{{- with .Values.vminsert.serviceMonitor.tlsConfig }}
|
||||
tlsConfig:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.vminsert.serviceMonitor.relabelings }}
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,95 @@
|
||||
{{- if .Values.vminsert.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{- if .Values.vminsert.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vminsert.service.annotations | indent 4}}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vminsert.labels" . | nindent 4 }}
|
||||
{{- if .Values.vminsert.service.labels }}
|
||||
{{ toYaml .Values.vminsert.service.labels | indent 4}}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vminsert.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
{{- if .Values.vminsert.service.clusterIP }}
|
||||
clusterIP: {{ .Values.vminsert.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.service.externalIPs }}
|
||||
externalIPs:
|
||||
{{ toYaml .Values.vminsert.service.externalIPs | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.vminsert.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{- range $cidr := .Values.vminsert.service.loadBalancerSourceRanges }}
|
||||
- {{ $cidr }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.vminsert.service.servicePort }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.vminsert.service.targetPort }}
|
||||
{{- range .Values.vminsert.service.extraPorts }}
|
||||
- name: {{ .name }}
|
||||
port: {{ .port }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .targetPort }}
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.clusternativeListenAddr }}
|
||||
- name: cluster-tcp
|
||||
protocol: TCP
|
||||
port: {{ include "split-host-port" .Values.vminsert.extraArgs.clusternativeListenAddr }}
|
||||
targetPort: cluster-tcp
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.graphiteListenAddr }}
|
||||
- name: graphite-tcp
|
||||
protocol: TCP
|
||||
port: {{ include "split-host-port" .Values.vminsert.extraArgs.graphiteListenAddr }}
|
||||
targetPort: graphite-tcp
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.graphiteListenAddr }}
|
||||
- name: graphite-udp
|
||||
protocol: UDP
|
||||
port: {{ include "split-host-port" .Values.vminsert.extraArgs.graphiteListenAddr }}
|
||||
targetPort: graphite-udp
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.influxListenAddr }}
|
||||
- name: influx-tcp
|
||||
protocol: TCP
|
||||
port: {{ include "split-host-port" .Values.vminsert.extraArgs.influxListenAddr }}
|
||||
targetPort: influx-tcp
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.influxListenAddr }}
|
||||
- name: influx-udp
|
||||
protocol: UDP
|
||||
port: {{ include "split-host-port" .Values.vminsert.extraArgs.influxListenAddr }}
|
||||
targetPort: influx-udp
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.opentsdbHTTPListenAddr }}
|
||||
- name: opentsdbhttp
|
||||
port: {{ include "split-host-port" .Values.vminsert.extraArgs.opentsdbHTTPListenAddr }}
|
||||
targetPort: opentsdbhttp
|
||||
{{- end }}
|
||||
{{- if and .Values.vminsert.extraArgs.opentsdbListenAddr ( or .Values.vminsert.service.udp ( ne .Values.vminsert.service.type "LoadBalancer" ) )}}
|
||||
- name: opentsdb-udp
|
||||
protocol: UDP
|
||||
port: {{ include "split-host-port" .Values.vminsert.extraArgs.opentsdbListenAddr }}
|
||||
targetPort: opentsdb-udp
|
||||
{{- end }}
|
||||
{{- if .Values.vminsert.extraArgs.opentsdbListenAddr }}
|
||||
- name: opentsdb-tcp
|
||||
protocol: TCP
|
||||
port: {{ include "split-host-port" .Values.vminsert.extraArgs.opentsdbListenAddr }}
|
||||
targetPort: opentsdb-tcp
|
||||
{{- end }}
|
||||
|
||||
selector:
|
||||
{{- include "victoria-metrics.vminsert.matchLabels" . | nindent 4 }}
|
||||
type: "{{ .Values.vminsert.service.type }}"
|
||||
{{- end }}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
{{- if .Values.vmselect.enabled }}
|
||||
{{- if .Values.vmselect.clusternativeService.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}-tcp-lb
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
networking.gke.io/load-balancer-type: "Internal"
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{- if .Values.vmselect.service.labels }}
|
||||
{{ toYaml .Values.vmselect.service.labels | indent 4}}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
{{- if .Values.vmselect.clusternativeService.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.vmselect.clusternativeService.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.clusternativeService.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.vmselect.clusternativeService.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.clusternativeService.ipFamilyPolicy }}
|
||||
ipFamilyPolicy: {{ .Values.vmselect.clusternativeService.ipFamilyPolicy }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- if .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
- name: cluster-tcp
|
||||
port: {{ .Values.vmselect.clusternativeService.port }}
|
||||
protocol: TCP
|
||||
targetPort: cluster-tcp
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "victoria-metrics.vmselect.matchLabels" . | nindent 4 }}
|
||||
zone_extended: {{ .Values.vmselect.extraLabels.zone_extended }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,44 @@
|
||||
|
||||
{{- if and (default false .Values.vmselect.splitService) .Values.vmselect.enabled (not .Values.vmselect.statefulSet.enabled) -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{- if .Values.vmselect.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmselect.service.annotations | indent 4}}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{- if .Values.vmselect.service.labels }}
|
||||
{{ toYaml .Values.vmselect.service.labels | indent 4}}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}-clusternative
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
{{- if .Values.vmselect.service.clusterIP }}
|
||||
clusterIP: {{ .Values.vmselect.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.service.externalIPs }}
|
||||
externalIPs:
|
||||
{{ toYaml .Values.vmselect.service.externalIPs | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.vmselect.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{- range $cidr := .Values.vmselect.service.loadBalancerSourceRanges }}
|
||||
- {{ $cidr }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- if .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
- name: cluster-tcp
|
||||
protocol: TCP
|
||||
port: {{ include "split-host-port" .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
targetPort: cluster-tcp
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "victoria-metrics.vmselect.matchLabels" . | nindent 4 }}
|
||||
type: "{{ .Values.vmselect.service.type }}"
|
||||
{{- end }}
|
||||
@@ -0,0 +1,169 @@
|
||||
{{- if and .Values.vmselect.enabled (not .Values.vmselect.statefulSet.enabled) -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
{{- with .Values.vmselect.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{- with .Values.vmselect.extraLabels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "victoria-metrics.vmselect.matchLabels" . | nindent 6 }}
|
||||
{{- if not .Values.vmselect.horizontalPodAutoscaler.enabled }}
|
||||
replicas: {{ .Values.vmselect.replicaCount }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmselect.strategy }}
|
||||
strategy:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.vmselect.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmselect.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 8 }}
|
||||
{{- with .Values.vmselect.extraLabels }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.vmselect.priorityClassName }}
|
||||
priorityClassName: "{{ .Values.vmselect.priorityClassName }}"
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken }}
|
||||
{{- with .Values.vmselect.initContainers }}
|
||||
initContainers:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "victoria-metrics.name" . }}-{{ .Values.vmselect.name }}
|
||||
image: "{{ .Values.vmselect.image.repository }}:{{ .Values.vmselect.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.vmselect.image.pullPolicy }}"
|
||||
{{- if .Values.vmselect.containerWorkingDir }}
|
||||
workingDir: {{ .Values.vmselect.containerWorkingDir }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.vmselect.podSecurityContext | nindent 12 }}
|
||||
args:
|
||||
{{- if .Values.vmselect.extraVMSelects }}
|
||||
{{- toYaml .Values.vmselect.extraVMSelects | nindent 12 }}
|
||||
{{- end }}
|
||||
- {{ printf "%s=%s" "--cacheDataPath" .Values.vmselect.cacheMountPath | quote}}
|
||||
{{- if not .Values.vmselect.suppresStorageFQDNsRender }}
|
||||
{{- include "victoria-metrics.vmselect.vmstorage-pod-fqdn" . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.vmselect.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: TZ
|
||||
value: Asia/Kolkata
|
||||
{{- with .Values.vmselect.env }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8481
|
||||
{{- if .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
- name: cluster-tcp
|
||||
protocol: TCP
|
||||
containerPort: {{ include "split-host-port" .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
{{- if index .Values.vmselect.extraArgs "http.pathPrefix" }}
|
||||
path: {{ trimSuffix "/" (index .Values.vmselect.extraArgs "http.pathPrefix") }}/health
|
||||
{{- else }}
|
||||
path: /health
|
||||
{{- end }}
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.vmselect.probe.readiness.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.vmselect.probe.readiness.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.vmselect.probe.readiness.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.vmselect.probe.readiness.failureThreshold }}
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.vmselect.probe.liveness.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.vmselect.probe.liveness.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.vmselect.probe.liveness.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.vmselect.probe.liveness.failureThreshold }}
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.vmselect.cacheMountPath }}
|
||||
name: cache-volume
|
||||
{{- range .Values.vmstorage.extraHostPathMounts }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .mountPath }}
|
||||
subPath: {{ .subPath }}
|
||||
readOnly: {{ .readOnly }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmselect.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- with .Values.vmselect.resources }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmselect.extraContainers }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 2 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.securityContext }}
|
||||
securityContext:
|
||||
{{ toYaml .Values.vmselect.securityContext | indent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "victoria-metrics.serviceAccountName" . }}
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: "{{ .Values.schedulerName }}"
|
||||
{{- end }}
|
||||
nodeSelector:
|
||||
{{- if .Values.dedicatedValue }}
|
||||
dedicated: {{ include "meesho.vmselect.dedicatedValue" . }}
|
||||
{{- else }}
|
||||
{{- with .Values.vmselect.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
tolerations:
|
||||
{{- if .Values.dedicatedValue }}
|
||||
- key: "dedicated"
|
||||
operator: "Equal"
|
||||
value: {{ include "meesho.vmselect.dedicatedValue" . }}
|
||||
effect: "NoSchedule"
|
||||
{{- else }}
|
||||
{{- with .Values.vmselect.tolerations }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.vmselect.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{ toYaml .Values.vmselect.topologySpreadConstraints | indent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- with .Values.vmselect.extraVolumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
- name: cache-volume
|
||||
{{- if .Values.vmselect.persistentVolume.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ if .Values.vmselect.persistentVolume.existingClaim }}{{ .Values.vmselect.persistentVolume.existingClaim }}{{- else }}{{ template "victoria-metrics.vmselect.fullname" . }}{{- end }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,9 @@
|
||||
{{- if and .Values.vmselect.enabled (not .Values.vmselect.statefulSet.enabled) -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}-proxy
|
||||
spec:
|
||||
type: ExternalName
|
||||
externalName: {{ template "victoria-metrics.vmselect.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
|
||||
{{- end }}
|
||||
@@ -0,0 +1,25 @@
|
||||
{{- if .Values.vmselect.horizontalPodAutoscaler.enabled }}
|
||||
{{- if .Capabilities.APIVersions.Has "autoscaling/v2" -}}
|
||||
apiVersion: autoscaling/v2
|
||||
{{- else}}
|
||||
apiVersion: autoscaling/v2beta2
|
||||
{{- end}}
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{- with .Values.vmselect.extraLabels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
maxReplicas: {{ .Values.vmselect.horizontalPodAutoscaler.maxReplicas }}
|
||||
minReplicas: {{ .Values.vmselect.horizontalPodAutoscaler.minReplicas }}
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
metrics:
|
||||
{{ toYaml .Values.vmselect.horizontalPodAutoscaler.metrics | indent 4 }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,50 @@
|
||||
{{- if and .Values.vmselect.enabled .Values.vmselect.ingress.enabled }}
|
||||
{{- $ingressApiIsStable := eq (include "victoria-metrics.ingress.isStable" .) "true" -}}
|
||||
{{- $ingressSupportsIngressClassName := eq (include "victoria-metrics.ingress.supportsIngressClassName" .) "true" -}}
|
||||
{{- $ingressSupportsPathType := eq (include "victoria-metrics.ingress.supportsPathType" .) "true" -}}
|
||||
{{- $servicePort := .Values.vmselect.service.servicePort -}}
|
||||
{{- $ingressPathType := .Values.vmselect.ingress.pathType -}}
|
||||
apiVersion: {{ include "victoria-metrics.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
{{- if .Values.vmselect.ingress.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmselect.ingress.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{ if .Values.vmselect.ingress.extraLabels }}
|
||||
{{ toYaml .Values.vmselect.ingress.extraLabels | indent 4 }}
|
||||
{{ end }}
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
{{- if and $ingressSupportsIngressClassName .Values.vmselect.ingress.ingressClassName }}
|
||||
ingressClassName: {{ .Values.vmselect.ingress.ingressClassName }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- $serviceName := include "victoria-metrics.vmselect.fullname" . }}
|
||||
{{- range .Values.vmselect.ingress.hosts }}
|
||||
- host: {{ .name }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ .path }}
|
||||
{{- if $ingressSupportsPathType }}
|
||||
pathType: {{ $ingressPathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if $ingressApiIsStable }}
|
||||
service:
|
||||
name: {{ $serviceName }}
|
||||
port:
|
||||
number: {{ $servicePort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: {{ .port | default "http"}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- if .Values.vmselect.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.vmselect.ingress.tls | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,26 @@
|
||||
{{- if .Values.vmselect.podDisruptionBudget.enabled }}
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }}
|
||||
apiVersion: policy/v1
|
||||
{{- else -}}
|
||||
apiVersion: policy/v1beta1
|
||||
{{- end }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{- with .Values.vmselect.podDisruptionBudget.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.vmselect.podDisruptionBudget.minAvailable }}
|
||||
minAvailable: {{ .Values.vmselect.podDisruptionBudget.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.podDisruptionBudget.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.vmselect.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "victoria-metrics.vmselect.matchLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,37 @@
|
||||
{{- if and .Values.vmselect.enabled .Values.vmselect.statefulSet.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{- if .Values.vmselect.statefulSet.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmselect.statefulSet.service.annotations | indent 4}}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{- if .Values.vmselect.statefulSet.service.labels }}
|
||||
{{ toYaml .Values.vmselect.statefulSet.service.labels | indent 4}}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.vmselect.statefulSet.service.servicePort }}
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
{{- range .Values.vmselect.service.extraPorts }}
|
||||
- name: {{ .name }}
|
||||
port: {{ .port }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .targetPort }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
- name: cluster-tcp
|
||||
protocol: TCP
|
||||
port: {{ include "split-host-port" .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
targetPort: cluster-tcp
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "victoria-metrics.vmselect.matchLabels" . | nindent 4 }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,44 @@
|
||||
{{- if and .Values.vmselect.enabled .Values.vmselect.serviceMonitor.enabled -}}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
{{- if .Values.vmselect.serviceMonitor.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmselect.serviceMonitor.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{- if .Values.vmselect.serviceMonitor.extraLabels }}
|
||||
{{ toYaml .Values.vmselect.serviceMonitor.extraLabels | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
{{- if .Values.vmselect.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.vmselect.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "victoria-metrics.vmselect.matchLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- port: http
|
||||
{{- if .Values.vmselect.serviceMonitor.scheme }}
|
||||
scheme: {{ .Values.vmselect.serviceMonitor.scheme }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.serviceMonitor.interval }}
|
||||
interval: {{ .Values.vmselect.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.vmselect.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmselect.serviceMonitor.tlsConfig }}
|
||||
tlsConfig:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmselect.serviceMonitor.relabelings }}
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,53 @@
|
||||
{{- if and .Values.vmselect.enabled (not .Values.vmselect.statefulSet.enabled) -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{- if .Values.vmselect.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmselect.service.annotations | indent 4}}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{- if .Values.vmselect.service.labels }}
|
||||
{{ toYaml .Values.vmselect.service.labels | indent 4}}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
{{- if .Values.vmselect.service.clusterIP }}
|
||||
clusterIP: {{ .Values.vmselect.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.service.externalIPs }}
|
||||
externalIPs:
|
||||
{{ toYaml .Values.vmselect.service.externalIPs | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.vmselect.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{- range $cidr := .Values.vmselect.service.loadBalancerSourceRanges }}
|
||||
- {{ $cidr }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- if and (not ( default false .Values.vmselect.splitService)) .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
- name: cluster-tcp
|
||||
protocol: TCP
|
||||
port: {{ include "split-host-port" .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
targetPort: cluster-tcp
|
||||
{{- end }}
|
||||
- name: http
|
||||
port: {{ .Values.vmselect.service.servicePort }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.vmselect.service.targetPort }}
|
||||
{{- range .Values.vmselect.service.extraPorts }}
|
||||
- name: {{ .name }}
|
||||
port: {{ .port }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .targetPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "victoria-metrics.vmselect.matchLabels" . | nindent 4 }}
|
||||
type: "{{ .Values.vmselect.service.type }}"
|
||||
{{- end }}
|
||||
@@ -0,0 +1,179 @@
|
||||
{{- if and .Values.vmselect.enabled .Values.vmselect.statefulSet.enabled -}}
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
{{- with .Values.vmselect.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{- with .Values.vmselect.extraLabels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
serviceName: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "victoria-metrics.vmselect.matchLabels" . | nindent 6 }}
|
||||
replicas: {{ .Values.vmselect.replicaCount }}
|
||||
podManagementPolicy: {{ .Values.vmselect.podManagementPolicy }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.vmselect.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmselect.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 8 }}
|
||||
{{- with .Values.vmselect.extraLabels }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.vmselect.priorityClassName }}
|
||||
priorityClassName: "{{ .Values.vmselect.priorityClassName }}"
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken }}
|
||||
{{- with .Values.vmselect.initContainers }}
|
||||
initContainers:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "victoria-metrics.name" . }}-{{ .Values.vmselect.name }}
|
||||
image: "{{ .Values.vmselect.image.repository }}:{{ .Values.vmselect.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.vmselect.image.pullPolicy }}"
|
||||
{{- if .Values.vmselect.containerWorkingDir }}
|
||||
workingDir: {{ .Values.vmselect.containerWorkingDir }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.vmselect.podSecurityContext | nindent 12 }}
|
||||
args:
|
||||
- {{ printf "%s=%s" "--cacheDataPath" .Values.vmselect.cacheMountPath | quote}}
|
||||
{{- if not .Values.vmselect.suppresStorageFQDNsRender }}
|
||||
{{- include "victoria-metrics.vmselect.vmstorage-pod-fqdn" . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- include "victoria-metrics.vmselect.vmselect-pod-fqdn" . | nindent 12 -}}
|
||||
{{- range $key, $value := .Values.vmselect.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: TZ
|
||||
value: Asia/Kolkata
|
||||
{{- with .Values.vmselect.env }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8481
|
||||
{{- if .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
- name: cluster-tcp
|
||||
protocol: TCP
|
||||
containerPort: {{ include "split-host-port" .Values.vmselect.extraArgs.clusternativeListenAddr }}
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
{{- if index .Values.vmselect.extraArgs "http.pathPrefix" }}
|
||||
path: {{ trimSuffix "/" (index .Values.vmselect.extraArgs "http.pathPrefix") }}/health
|
||||
{{- else }}
|
||||
path: /health
|
||||
{{- end }}
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.vmselect.cacheMountPath }}
|
||||
name: cache-volume
|
||||
{{- range .Values.vmstorage.extraHostPathMounts }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .mountPath }}
|
||||
subPath: {{ .subPath }}
|
||||
readOnly: {{ .readOnly }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmselect.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmselect.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmselect.extraContainers }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 2 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.securityContext }}
|
||||
securityContext:
|
||||
{{ toYaml .Values.vmselect.securityContext | indent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "victoria-metrics.serviceAccountName" . }}
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: "{{ .Values.schedulerName }}"
|
||||
{{- end }}
|
||||
nodeSelector:
|
||||
{{- if .Values.dedicatedValue }}
|
||||
dedicated: {{ include "meesho.vmselect.dedicatedValue" . }}
|
||||
{{- else }}
|
||||
{{- with .Values.vmselect.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
tolerations:
|
||||
{{- if .Values.dedicatedValue }}
|
||||
- key: "dedicated"
|
||||
operator: "Equal"
|
||||
value: {{ include "meesho.vmselect.dedicatedValue" . }}
|
||||
effect: "NoSchedule"
|
||||
{{- else }}
|
||||
{{- with .Values.vmselect.tolerations }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.vmselect.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- with .Values.vmselect.extraVolumes }}
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.vmselect.persistentVolume.enabled }}
|
||||
- name: cache-volume
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.vmselect.persistentVolume.enabled }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: cache-volume
|
||||
{{- if .Values.vmselect.persistentVolume.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmselect.persistentVolume.annotations | indent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmstorage.persistentVolume.labels }}
|
||||
labels:
|
||||
{{ toYaml .Values.vmstorage.persistentVolume.labels | indent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- toYaml .Values.vmselect.persistentVolume.accessModes | nindent 10 }}
|
||||
resources:
|
||||
requests:
|
||||
storage: "{{ .Values.vmselect.persistentVolume.size }}"
|
||||
{{- if .Values.vmselect.persistentVolume.storageClass }}
|
||||
{{- if (eq "-" .Values.vmselect.persistentVolume.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.vmselect.persistentVolume.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,26 @@
|
||||
{{- if and .Values.vmstorage.enabled .Values.vmstorage.podDisruptionBudget.enabled }}
|
||||
{{- if .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }}
|
||||
apiVersion: policy/v1
|
||||
{{- else -}}
|
||||
apiVersion: policy/v1beta1
|
||||
{{- end }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "victoria-metrics.vmstorage.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmstorage.labels" . | nindent 4 }}
|
||||
{{- with .Values.vmstorage.podDisruptionBudget.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.vmstorage.podDisruptionBudget.minAvailable }}
|
||||
minAvailable: {{ .Values.vmstorage.podDisruptionBudget.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmstorage.podDisruptionBudget.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.vmstorage.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "victoria-metrics.vmstorage.matchLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,44 @@
|
||||
{{- if and .Values.vmstorage.enabled .Values.vmstorage.serviceMonitor.enabled -}}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
{{- if .Values.vmstorage.serviceMonitor.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmstorage.serviceMonitor.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmstorage.labels" . | nindent 4 }}
|
||||
{{- if .Values.vmstorage.serviceMonitor.extraLabels }}
|
||||
{{ toYaml .Values.vmstorage.serviceMonitor.extraLabels | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmstorage.fullname" . }}
|
||||
{{- if .Values.vmstorage.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.vmstorage.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "victoria-metrics.vmstorage.matchLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- port: http
|
||||
{{- if .Values.vmstorage.serviceMonitor.scheme }}
|
||||
scheme: {{ .Values.vmstorage.serviceMonitor.scheme }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmstorage.serviceMonitor.interval }}
|
||||
interval: {{ .Values.vmstorage.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmstorage.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.vmstorage.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmstorage.serviceMonitor.tlsConfig }}
|
||||
tlsConfig:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmstorage.serviceMonitor.relabelings }}
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,39 @@
|
||||
{{- if .Values.vmstorage.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{- if .Values.vmstorage.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmstorage.service.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmstorage.labels" . | nindent 4 }}
|
||||
{{- if .Values.vmstorage.service.labels }}
|
||||
{{ toYaml .Values.vmstorage.service.labels | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmstorage.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- port: {{ .Values.vmstorage.service.servicePort }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
- port: {{ .Values.vmstorage.service.vmselectPort }}
|
||||
targetPort: vmselect
|
||||
protocol: TCP
|
||||
name: vmselect
|
||||
- port: {{ .Values.vmstorage.service.vminsertPort }}
|
||||
targetPort: vminsert
|
||||
protocol: TCP
|
||||
name: vminsert
|
||||
{{- range .Values.vmstorage.service.extraPorts }}
|
||||
- name: {{ .name }}
|
||||
port: {{ .port }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .targetPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "victoria-metrics.vmstorage.matchLabels" . | nindent 4 }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,248 @@
|
||||
{{- if .Values.vmstorage.enabled -}}
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
{{- with .Values.vmstorage.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmstorage.labels" . | nindent 4 }}
|
||||
{{- with .Values.vmstorage.extraLabels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmstorage.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
serviceName: {{ template "victoria-metrics.vmstorage.fullname" . }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "victoria-metrics.vmstorage.matchLabels" . | nindent 6 }}
|
||||
replicas: {{ .Values.vmstorage.replicaCount }}
|
||||
podManagementPolicy: {{ .Values.vmstorage.podManagementPolicy }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.vmstorage.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmstorage.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmstorage.labels" . | nindent 8 }}
|
||||
{{- with .Values.vmstorage.extraLabels }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.vmstorage.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{ toYaml .Values.vmstorage.topologySpreadConstraints | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmstorage.priorityClassName }}
|
||||
priorityClassName: "{{ .Values.vmstorage.priorityClassName }}"
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken }}
|
||||
{{- if eq (include "victoria-metrics.storage.hasInitContainer" . ) "true" }}
|
||||
initContainers:
|
||||
{{- include "victoria-metrics.storage.initContiners" . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "victoria-metrics.name" . }}-{{ .Values.vmstorage.name }}
|
||||
image: "{{ .Values.vmstorage.image.repository }}:{{ .Values.vmstorage.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.vmstorage.image.pullPolicy }}"
|
||||
{{- if .Values.vmstorage.containerWorkingDir }}
|
||||
workingDir: {{ .Values.vmstorage.containerWorkingDir }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.vmstorage.podSecurityContext | nindent 12 }}
|
||||
args:
|
||||
- {{ printf "%s=%s" "--retentionPeriod" (toString .Values.vmstorage.retentionPeriod) | quote}}
|
||||
- {{ printf "%s=%s" "--storageDataPath" .Values.vmstorage.persistentVolume.mountPath | quote}}
|
||||
{{- range $key, $value := .Values.vmstorage.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8482
|
||||
- name: vminsert
|
||||
containerPort: 8400
|
||||
- name: vmselect
|
||||
containerPort: 8401
|
||||
env:
|
||||
- name: TZ
|
||||
value: Asia/Kolkata
|
||||
{{- with .Values.vmstorage.env }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with $.Values.vmstorage.probe.liveness }}
|
||||
livenessProbe:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with $.Values.vmstorage.probe.readiness }}
|
||||
readinessProbe:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
resources: {{ toYaml .Values.vmstorage.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: vmstorage-volume
|
||||
mountPath: {{ .Values.vmstorage.persistentVolume.mountPath }}
|
||||
subPath: {{ .Values.vmstorage.persistentVolume.subPath }}
|
||||
{{- range .Values.vmstorage.extraHostPathMounts }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .mountPath }}
|
||||
subPath: {{ .subPath }}
|
||||
readOnly: {{ .readOnly }}
|
||||
{{- end }}
|
||||
{{- range .Values.vmstorage.extraConfigmapMounts }}
|
||||
- name: {{ $.Values.vmstorage.name }}-{{ .name }}
|
||||
mountPath: {{ .mountPath }}
|
||||
subPath: {{ .subPath }}
|
||||
readOnly: {{ .readOnly }}
|
||||
{{- end }}
|
||||
{{- range .Values.vmstorage.extraSecretMounts }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .mountPath }}
|
||||
subPath: {{ .subPath }}
|
||||
readOnly: {{ .readOnly }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmstorage.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmstorage.vmbackupmanager.enable }}
|
||||
- name: {{ template "victoria-metrics.name" . }}-vmbackupmanager
|
||||
image: "{{ .Values.vmstorage.vmbackupmanager.image.repository }}:{{ .Values.vmstorage.vmbackupmanager.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.vmstorage.image.pullPolicy }}"
|
||||
{{- with .Values.vmstorage.podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
args:
|
||||
- {{ printf "%s=%t" "--eula" .Values.vmstorage.vmbackupmanager.eula | quote}}
|
||||
- {{ printf "%s=%t" "--disableHourly" .Values.vmstorage.vmbackupmanager.disableHourly | quote}}
|
||||
- {{ printf "%s=%t" "--disableDaily" .Values.vmstorage.vmbackupmanager.disableDaily | quote}}
|
||||
- {{ printf "%s=%t" "--disableWeekly" .Values.vmstorage.vmbackupmanager.disableWeekly | quote}}
|
||||
- {{ printf "%s=%t" "--disableMonthly" .Values.vmstorage.vmbackupmanager.disableMonthly | quote}}
|
||||
- {{ printf "%s=%d" "--keepLastHourly" (int .Values.vmstorage.vmbackupmanager.retention.keepLastHourly) | quote}}
|
||||
- {{ printf "%s=%d" "--keepLastDaily" (int .Values.vmstorage.vmbackupmanager.retention.keepLastDaily) | quote}}
|
||||
- {{ printf "%s=%d" "--keepLastWeekly" (int .Values.vmstorage.vmbackupmanager.retention.keepLastWeekly) | quote}}
|
||||
- {{ printf "%s=%d" "--keepLastMonthly" (int .Values.vmstorage.vmbackupmanager.retention.keepLastMonthly) | quote}}
|
||||
- {{ printf "%s=%s" "--storageDataPath" .Values.vmstorage.persistentVolume.mountPath | quote}}
|
||||
- "--dst={{ .Values.vmstorage.vmbackupmanager.destination }}/$(POD_NAME)"
|
||||
- "--snapshot.createURL=http://localhost:8482/snapshot/create"
|
||||
- "--snapshot.deleteURL=http://localhost:8482/snapshot/delete"
|
||||
{{- range $key, $value := .Values.vmstorage.vmbackupmanager.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmstorage.vmbackupmanager.resources }}
|
||||
resources: {{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with $.Values.vmstorage.vmbackupmanager.livenessProbe }}
|
||||
livenessProbe:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with $.Values.vmstorage.vmbackupmanager.readinessProbe }}
|
||||
readinessProbe:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: TZ
|
||||
value: Asia/Kolkata
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
{{- with .Values.vmstorage.vmbackupmanager.env }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: manager-http
|
||||
containerPort: 8300
|
||||
volumeMounts:
|
||||
- name: vmstorage-volume
|
||||
mountPath: {{ .Values.vmstorage.persistentVolume.mountPath }}
|
||||
subPath: {{ .Values.vmstorage.persistentVolume.subPath }}
|
||||
{{- range .Values.vmstorage.vmbackupmanager.extraSecretMounts }}
|
||||
- name: {{ .name }}
|
||||
mountPath: {{ .mountPath }}
|
||||
subPath: {{ .subPath }}
|
||||
readOnly: {{ .readOnly }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.vmstorage.extraContainers }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 2 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmstorage.securityContext }}
|
||||
securityContext:
|
||||
{{ toYaml .Values.vmstorage.securityContext | indent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "victoria-metrics.serviceAccountName" . }}
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: "{{ .Values.schedulerName }}"
|
||||
{{- end }}
|
||||
nodeSelector:
|
||||
{{- if .Values.dedicatedValue }}
|
||||
dedicated: {{ include "meesho.vmstorage.dedicatedValue" . }}
|
||||
{{- else }}
|
||||
{{- with .Values.vmstorage.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
tolerations:
|
||||
{{- if .Values.dedicatedValue }}
|
||||
- key: "dedicated"
|
||||
operator: "Equal"
|
||||
value: {{ include "meesho.vmstorage.dedicatedValue" . }}
|
||||
effect: "NoSchedule"
|
||||
{{- else }}
|
||||
{{- with .Values.vmstorage.tolerations }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmstorage.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.vmstorage.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: {{ .Values.vmstorage.terminationGracePeriodSeconds }}
|
||||
volumes:
|
||||
{{- with .Values.vmstorage.extraVolumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.vmstorage.persistentVolume.enabled }}
|
||||
- name: vmstorage-volume
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
{{- if .Values.vmstorage.persistentVolume.existingClaim }}
|
||||
- name: vmstorage-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.vmstorage.persistentVolume.existingClaim }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.vmstorage.persistentVolume.enabled (not .Values.vmstorage.persistentVolume.existingClaim) }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: vmstorage-volume
|
||||
{{- if .Values.vmstorage.persistentVolume.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.vmstorage.persistentVolume.annotations | indent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.vmstorage.persistentVolume.labels }}
|
||||
labels:
|
||||
{{ toYaml .Values.vmstorage.persistentVolume.labels | indent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{ toYaml .Values.vmstorage.persistentVolume.accessModes | indent 10 }}
|
||||
resources:
|
||||
requests:
|
||||
storage: "{{ .Values.vmstorage.persistentVolume.size }}"
|
||||
{{- if .Values.vmstorage.persistentVolume.storageClass }}
|
||||
{{- if (eq "-" .Values.vmstorage.persistentVolume.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.vmstorage.persistentVolume.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,58 @@
|
||||
# Example extra values files to add an auth proxy sidecar container
|
||||
---
|
||||
extraContainers: &extraContainers
|
||||
- name: vmauth
|
||||
securityContext:
|
||||
{}
|
||||
image: "victoriametrics/vmauth:latest"
|
||||
workingDir: /
|
||||
args:
|
||||
- -auth.config=/config/auth.yml
|
||||
- -envflag.enable=true
|
||||
- -envflag.prefix=VM_
|
||||
- -loggerFormat=json
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: proxy
|
||||
containerPort: 8427
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: proxy
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: proxy
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
volumeMounts:
|
||||
- name: auth-config
|
||||
mountPath: /config
|
||||
resources:
|
||||
{}
|
||||
|
||||
vminsert:
|
||||
extraContainers: *extraContainers
|
||||
extraVolumes:
|
||||
- name: auth-config
|
||||
secret:
|
||||
secretName: vminsert-auth-config
|
||||
service:
|
||||
extraPorts:
|
||||
- name: proxy
|
||||
port: 8427
|
||||
targetPort: proxy
|
||||
|
||||
vmselect:
|
||||
extraContainers: *extraContainers
|
||||
extraVolumes:
|
||||
- name: auth-config
|
||||
secret:
|
||||
secretName: vmselect-auth-config
|
||||
service:
|
||||
extraPorts:
|
||||
- name: proxy
|
||||
port: 8427
|
||||
targetPort: proxy
|
||||
@@ -0,0 +1,719 @@
|
||||
# Default values for victoria-metrics.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# -- k8s cluster domain suffix, uses for building storage pods' FQDN. Ref: [https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/](https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/)
|
||||
clusterDomainSuffix: cluster.local
|
||||
printNotes: true
|
||||
|
||||
rbac:
|
||||
create: true
|
||||
# Note: The PSP will only be deployed, if Kubernetes (<1.25) supports the resource.
|
||||
pspEnabled: true
|
||||
namespaced: false
|
||||
extraLabels: {}
|
||||
# annotations: {}
|
||||
|
||||
serviceAccount:
|
||||
create: true
|
||||
# name:
|
||||
extraLabels: {}
|
||||
# annotations: {}
|
||||
# mount API token to pod directly
|
||||
automountToken: true
|
||||
|
||||
extraSecrets:
|
||||
[]
|
||||
# - name: secret-remote-storage-keys
|
||||
# annotations: []
|
||||
# labels: []
|
||||
# data: |
|
||||
# credentials: b64_encoded_str
|
||||
|
||||
vmselect:
|
||||
# -- Enable deployment of vmselect component. Can be deployed as Deployment(default) or StatefulSet
|
||||
enabled: true
|
||||
# -- Vmselect container name
|
||||
name: vmselect
|
||||
strategy: {}
|
||||
# rollingUpdate:
|
||||
# maxSurge: 25%
|
||||
# maxUnavailable: 25%
|
||||
# type: RollingUpdate
|
||||
image:
|
||||
# -- Image repository
|
||||
repository: victoriametrics/vmselect
|
||||
# -- Image tag
|
||||
tag: v1.91.3-cluster
|
||||
# -- Image pull policy
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Name of Priority Class
|
||||
priorityClassName: ""
|
||||
# -- Overrides the full name of vmselect component
|
||||
fullnameOverride: ""
|
||||
# -- Suppress rendering `--storageNode` FQDNs based on `vmstorage.replicaCount` value. If true suppress rendering `--storageNodes`, they can be re-defined in extraArgs
|
||||
suppresStorageFQDNsRender: false
|
||||
automountServiceAccountToken: true
|
||||
# Extra command line arguments for vmselect component
|
||||
splitService: False
|
||||
extraArgs:
|
||||
envflag.enable: "true"
|
||||
envflag.prefix: VM_
|
||||
loggerFormat: json
|
||||
annotations: {}
|
||||
extraLabels: {}
|
||||
# -- Additional environment variables (ex.: secret tokens, flags) https://github.com/VictoriaMetrics/VictoriaMetrics#environment-variables
|
||||
env: []
|
||||
|
||||
# Readiness & Liveness probes
|
||||
probe:
|
||||
readiness:
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
liveness:
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
horizontalPodAutoscaler:
|
||||
# -- Use HPA for vmselect component
|
||||
enabled: false
|
||||
# -- Maximum replicas for HPA to use to to scale the vmselect component
|
||||
maxReplicas: 10
|
||||
# -- Minimum replicas for HPA to use to scale the vmselect component
|
||||
minReplicas: 2
|
||||
# -- Metric for HPA to use to scale the vmselect component
|
||||
metrics: []
|
||||
|
||||
# Additional hostPath mounts
|
||||
extraHostPathMounts:
|
||||
[]
|
||||
# - name: certs-dir
|
||||
# mountPath: /etc/kubernetes/certs
|
||||
# subPath: ""
|
||||
# hostPath: /etc/kubernetes/certs
|
||||
# readOnly: true
|
||||
|
||||
# Extra Volumes for the pod
|
||||
extraVolumes:
|
||||
[]
|
||||
# - name: example
|
||||
# configMap:
|
||||
# name: example
|
||||
|
||||
# Extra Volume Mounts for the container
|
||||
extraVolumeMounts:
|
||||
[]
|
||||
# - name: example
|
||||
# mountPath: /example
|
||||
|
||||
extraContainers:
|
||||
[]
|
||||
# - name: config-reloader
|
||||
# image: reloader-image
|
||||
|
||||
initContainers:
|
||||
[]
|
||||
# - name: example
|
||||
# image: example-image
|
||||
|
||||
podDisruptionBudget:
|
||||
# -- See `kubectl explain poddisruptionbudget.spec` for more. Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
|
||||
enabled: false
|
||||
# minAvailable: 1
|
||||
# maxUnavailable: 1
|
||||
labels: {}
|
||||
|
||||
# -- Array of tolerations object. Ref: [https://kubernetes.io/docs/concepts/configuration/assign-pod-node/](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/)
|
||||
tolerations: []
|
||||
# - key: "key"
|
||||
# operator: "Equal|Exists"
|
||||
# value: "value"
|
||||
# effect: "NoSchedule|PreferNoSchedule"
|
||||
|
||||
# -- Pod's node selector. Ref: [https://kubernetes.io/docs/user-guide/node-selection/](https://kubernetes.io/docs/user-guide/node-selection/)
|
||||
nodeSelector: {}
|
||||
# -- Pod affinity
|
||||
affinity: {}
|
||||
# -- Pod topologySpreadConstraints
|
||||
topologySpreadConstraints: []
|
||||
# -- Pod's annotations
|
||||
podAnnotations: {}
|
||||
# -- Count of vmselect pods
|
||||
replicaCount: 2
|
||||
# -- Container workdir
|
||||
containerWorkingDir: ""
|
||||
# -- Resource object
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 50m
|
||||
# memory: 64Mi
|
||||
# requests:
|
||||
# cpu: 50m
|
||||
# memory: 64Mi
|
||||
|
||||
# -- Pod's security context. Ref: [https://kubernetes.io/docs/tasks/configure-pod-container/security-context/](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
securityContext: {}
|
||||
podSecurityContext: {}
|
||||
# -- Cache root folder
|
||||
cacheMountPath: /cache
|
||||
service:
|
||||
# -- Service annotations
|
||||
annotations: {}
|
||||
# -- Service labels
|
||||
labels: {}
|
||||
# -- Service ClusterIP
|
||||
clusterIP: ""
|
||||
# -- Service External IPs. Ref: [https://kubernetes.io/docs/user-guide/services/#external-ips](https://kubernetes.io/docs/user-guide/services/#external-ips)
|
||||
externalIPs: []
|
||||
# -- Extra service ports
|
||||
extraServicePorts: []
|
||||
# -- Service load balacner IP
|
||||
loadBalancerIP: ""
|
||||
# -- Load balancer source range
|
||||
loadBalancerSourceRanges: []
|
||||
# -- Service port
|
||||
servicePort: 8481
|
||||
# -- Target port
|
||||
targetPort: http
|
||||
# -- Service type
|
||||
type: ClusterIP
|
||||
ingress:
|
||||
# -- Enable deployment of ingress for vmselect component
|
||||
enabled: false
|
||||
# -- Ingress annotations
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: 'true'
|
||||
|
||||
extraLabels: {}
|
||||
# -- Array of host objects
|
||||
hosts: []
|
||||
# - name: vmselect.local
|
||||
# path: /select
|
||||
# port: http
|
||||
# -- Array of TLS objects
|
||||
tls: []
|
||||
# - secretName: vmselect-ingress-tls
|
||||
# hosts:
|
||||
# - vmselect.local
|
||||
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
|
||||
# See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
|
||||
# ingressClassName: nginx
|
||||
# -- pathType is only for k8s >= 1.1=
|
||||
pathType: Prefix
|
||||
clusternativeService:
|
||||
enabled: false
|
||||
port: 8401
|
||||
targetPort: ""
|
||||
sessionAffinity: None
|
||||
ipFamilyPolicy: ""
|
||||
sessionAffinityConfig: {}
|
||||
statefulSet:
|
||||
# -- Deploy StatefulSet instead of Deployment for vmselect. Useful if you want to keep cache data.
|
||||
enabled: false
|
||||
# -- Deploy order policy for StatefulSet pods
|
||||
podManagementPolicy: OrderedReady
|
||||
## Headless service for statefulset
|
||||
service:
|
||||
# -- Headless service annotations
|
||||
annotations: {}
|
||||
# -- Headless service labels
|
||||
labels: {}
|
||||
# -- Headless service port
|
||||
servicePort: 8481
|
||||
persistentVolume:
|
||||
# -- Create/use Persistent Volume Claim for vmselect component. Empty dir if false. If true, vmselect will create/use a Persistent Volume Claim
|
||||
enabled: false
|
||||
|
||||
# -- Array of access mode. Must match those of existing PV or dynamic provisioner. Ref: [http://kubernetes.io/docs/user-guide/persistent-volumes/](http://kubernetes.io/docs/user-guide/persistent-volumes/)
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
# -- Persistent volume annotations
|
||||
annotations: {}
|
||||
|
||||
# -- Persistent volume labels
|
||||
labels: {}
|
||||
|
||||
# -- Existing Claim name. Requires vmselect.persistentVolume.enabled: true. If defined, PVC must be created manually before volume will be bound
|
||||
existingClaim: ""
|
||||
|
||||
## Vmselect data Persistent Volume mount root path
|
||||
##
|
||||
# -- Size of the volume. Better to set the same as resource limit memory property
|
||||
size: 2Gi
|
||||
# -- Mount subpath
|
||||
subPath: ""
|
||||
serviceMonitor:
|
||||
# -- Enable deployment of Service Monitor for vmselect component. This is Prometheus operator object
|
||||
enabled: false
|
||||
# -- Target namespace of ServiceMonitor manifest
|
||||
namespace: ""
|
||||
# -- Service Monitor labels
|
||||
extraLabels: {}
|
||||
# -- Service Monitor annotations
|
||||
annotations: {}
|
||||
# Commented. Prometheus scare interval for vmselect component
|
||||
# interval: 15s
|
||||
# Commented. Prometheus pre-scrape timeout for vmselect component
|
||||
# scrapeTimeout: 5s
|
||||
# -- Commented. HTTP scheme to use for scraping.
|
||||
# scheme: https
|
||||
# -- Commented. TLS configuration to use when scraping the endpoint
|
||||
# tlsConfig:
|
||||
# insecureSkipVerify: true
|
||||
# -- Service Monitor relabelings
|
||||
relabelings: []
|
||||
|
||||
vminsert:
|
||||
# -- Enable deployment of vminsert component. Deployment is used
|
||||
enabled: true
|
||||
# -- vminsert container name
|
||||
name: vminsert
|
||||
strategy: {}
|
||||
# rollingUpdate:
|
||||
# maxSurge: 25%
|
||||
# maxUnavailable: 25%
|
||||
# type: RollingUpdate
|
||||
image:
|
||||
# -- Image repository
|
||||
repository: victoriametrics/vminsert
|
||||
# -- Image tag
|
||||
tag: v1.91.3-cluster
|
||||
# -- Image pull policy
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Name of Priority Class
|
||||
priorityClassName: ""
|
||||
# -- Overrides the full name of vminsert component
|
||||
fullnameOverride: ""
|
||||
# Extra command line arguments for vminsert component
|
||||
extraArgs:
|
||||
envflag.enable: "true"
|
||||
envflag.prefix: VM_
|
||||
loggerFormat: json
|
||||
annotations: {}
|
||||
extraLabels: {}
|
||||
# -- Additional environment variables (ex.: secret tokens, flags) https://github.com/VictoriaMetrics/VictoriaMetrics#environment-variables
|
||||
env: []
|
||||
# -- Suppress rendering `--storageNode` FQDNs based on `vmstorage.replicaCount` value. If true suppress rendering `--storageNodes`, they can be re-defined in extraArgs
|
||||
suppresStorageFQDNsRender: false
|
||||
automountServiceAccountToken: true
|
||||
|
||||
# Readiness & Liveness probes
|
||||
probe:
|
||||
readiness:
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
liveness:
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
# Horizontal Pod Autoscaling
|
||||
horizontalPodAutoscaler:
|
||||
# -- Use HPA for vminsert component
|
||||
enabled: false
|
||||
# -- Maximum replicas for HPA to use to to scale the vminsert component
|
||||
maxReplicas: 10
|
||||
# -- Minimum replicas for HPA to use to scale the vminsert component
|
||||
minReplicas: 2
|
||||
# -- Metric for HPA to use to scale the vminsert component
|
||||
metrics: []
|
||||
|
||||
# Extra Volumes for the pod
|
||||
extraVolumes:
|
||||
[]
|
||||
# - name: example
|
||||
# configMap:
|
||||
# name: example
|
||||
|
||||
# Extra Volume Mounts for the container
|
||||
extraVolumeMounts:
|
||||
[]
|
||||
# - name: example
|
||||
# mountPath: /example
|
||||
|
||||
extraContainers:
|
||||
[]
|
||||
# - name: config-reloader
|
||||
# image: reloader-image
|
||||
|
||||
initContainers:
|
||||
[]
|
||||
# - name: example
|
||||
# image: example-image
|
||||
|
||||
podDisruptionBudget:
|
||||
# -- See `kubectl explain poddisruptionbudget.spec` for more. Ref: [https://kubernetes.io/docs/tasks/run-application/configure-pdb/](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
|
||||
enabled: false
|
||||
# minAvailable: 1
|
||||
# maxUnavailable: 1
|
||||
labels: {}
|
||||
|
||||
# -- Array of tolerations object. Ref: [https://kubernetes.io/docs/concepts/configuration/assign-pod-node/](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/)
|
||||
tolerations: []
|
||||
# - key: "key"
|
||||
# operator: "Equal|Exists"
|
||||
# value: "value"
|
||||
# effect: "NoSchedule|PreferNoSchedule"
|
||||
|
||||
# -- Pod's node selector. Ref: [https://kubernetes.io/docs/user-guide/node-selection/](https://kubernetes.io/docs/user-guide/node-selection/)
|
||||
nodeSelector: {}
|
||||
# -- Pod affinity
|
||||
affinity: {}
|
||||
# -- Pod's annotations
|
||||
podAnnotations: {}
|
||||
# -- Count of vminsert pods
|
||||
replicaCount: 2
|
||||
# -- Container workdir
|
||||
containerWorkingDir: ""
|
||||
# -- Resource object
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 50m
|
||||
# memory: 64Mi
|
||||
# requests:
|
||||
# cpu: 50m
|
||||
# memory: 64Mi
|
||||
# -- Pod's security context. Ref: [https://kubernetes.io/docs/tasks/configure-pod-container/security-context/](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
|
||||
securityContext: {}
|
||||
podSecurityContext: {}
|
||||
service:
|
||||
# -- Service annotations
|
||||
annotations: {}
|
||||
# -- Service labels
|
||||
labels: {}
|
||||
# -- Service ClusterIP
|
||||
clusterIP: ""
|
||||
# -- Service External IPs. Ref: [https://kubernetes.io/docs/user-guide/services/#external-ips]( https://kubernetes.io/docs/user-guide/services/#external-ips)
|
||||
externalIPs: []
|
||||
# -- Extra service ports
|
||||
extraServicePorts: []
|
||||
# -- Service load balancer IP
|
||||
loadBalancerIP: ""
|
||||
# -- Load balancer source range
|
||||
loadBalancerSourceRanges: []
|
||||
# -- Service port
|
||||
servicePort: 8480
|
||||
# -- Target port
|
||||
targetPort: http
|
||||
# -- Service type
|
||||
type: ClusterIP
|
||||
# -- Enable UDP port. used if you have "spec.opentsdbListenAddr" specified
|
||||
# -- Make sure that service is not type "LoadBalancer", as it requires "MixedProtocolLBService" feature gate. ref: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
|
||||
udp: false
|
||||
ingress:
|
||||
# -- Enable deployment of ingress for vminsert component
|
||||
enabled: false
|
||||
# -- Ingress annotations
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: 'true'
|
||||
extraLabels: {}
|
||||
# -- Array of host objects
|
||||
hosts: []
|
||||
# - name: vminsert.local
|
||||
# path: /insert
|
||||
# port: http
|
||||
# -- Array of TLS objects
|
||||
tls: []
|
||||
# - secretName: vminsert-ingress-tls
|
||||
# hosts:
|
||||
# - vminsert.local
|
||||
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
|
||||
# See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
|
||||
# ingressClassName: nginx
|
||||
# -- pathType is only for k8s >= 1.1=
|
||||
pathType: Prefix
|
||||
serviceMonitor:
|
||||
# -- Enable deployment of Service Monitor for vminsert component. This is Prometheus operator object
|
||||
enabled: false
|
||||
# -- Target namespace of ServiceMonitor manifest
|
||||
namespace: ""
|
||||
# -- Service Monitor labels
|
||||
extraLabels: {}
|
||||
# -- Service Monitor annotations
|
||||
annotations: {}
|
||||
# Commented. Prometheus scare interval for vminsert component
|
||||
# interval: 15s
|
||||
# Commented. Prometheus pre-scrape timeout for vminsert component
|
||||
# scrapeTimeout: 5s
|
||||
# -- Commented. HTTP scheme to use for scraping.
|
||||
# scheme: https
|
||||
# -- Commented. TLS configuration to use when scraping the endpoint
|
||||
# tlsConfig:
|
||||
# insecureSkipVerify: true
|
||||
# -- Service Monitor relabelings
|
||||
relabelings: []
|
||||
|
||||
vmstorage:
|
||||
# -- Enable deployment of vmstorage component. StatefulSet is used
|
||||
enabled: true
|
||||
# -- vmstorage container name
|
||||
name: vmstorage
|
||||
image:
|
||||
# -- Image repository
|
||||
repository: victoriametrics/vmstorage
|
||||
# -- Image tag
|
||||
tag: v1.91.3-cluster
|
||||
# -- Image pull policy
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Name of Priority Class
|
||||
priorityClassName: ""
|
||||
# -- Overrides the full name of vmstorage component
|
||||
fullnameOverride:
|
||||
automountServiceAccountToken: true
|
||||
# -- Additional environment variables (ex.: secret tokens, flags) https://github.com/VictoriaMetrics/VictoriaMetrics#environment-variables
|
||||
env: []
|
||||
# -- Data retention period. Supported values 1w, 1d, number without measurement means month, e.g. 2 = 2month
|
||||
retentionPeriod: 1
|
||||
# Additional vmstorage container arguments. Extra command line arguments for vmstorage component
|
||||
extraArgs:
|
||||
envflag.enable: "true"
|
||||
envflag.prefix: VM_
|
||||
loggerFormat: json
|
||||
|
||||
# Additional hostPath mounts
|
||||
extraHostPathMounts:
|
||||
[]
|
||||
# - name: certs-dir
|
||||
# mountPath: /etc/kubernetes/certs
|
||||
# subPath: ""
|
||||
# hostPath: /etc/kubernetes/certs
|
||||
# readOnly: true
|
||||
|
||||
# Extra Volumes for the pod
|
||||
extraVolumes:
|
||||
[]
|
||||
# - name: example
|
||||
# configMap:
|
||||
# name: example
|
||||
|
||||
# Extra Volume Mounts for the container
|
||||
extraVolumeMounts:
|
||||
[]
|
||||
# - name: example
|
||||
# mountPath: /example
|
||||
|
||||
extraContainers:
|
||||
[]
|
||||
# - name: config-reloader
|
||||
# image: reloader-image
|
||||
|
||||
extraSecretMounts:
|
||||
[]
|
||||
# - name: secret
|
||||
# mountPath: /etc/credentials
|
||||
# subPath: ""
|
||||
# readOnly: true
|
||||
|
||||
initContainers:
|
||||
[]
|
||||
# - name: vmrestore
|
||||
# image: victoriametrics/vmrestore:latest
|
||||
# volumeMounts:
|
||||
# - mountPath: /storage
|
||||
# name: vmstorage-volume
|
||||
# - mountPath: /etc/vm/creds
|
||||
# name: secret-remote-storage-keys
|
||||
# readOnly: true
|
||||
# args:
|
||||
# - -storageDataPath=/storage
|
||||
# - -src=s3://your_bucket/folder/latest
|
||||
# - -credsFilePath=/etc/vm/creds/credentials
|
||||
|
||||
# -- See `kubectl explain poddisruptionbudget.spec` for more. Ref: [https://kubernetes.io/docs/tasks/run-application/configure-pdb/](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
|
||||
podDisruptionBudget:
|
||||
enabled: false
|
||||
# minAvailable: 1
|
||||
# maxUnavailable: 1
|
||||
labels: {}
|
||||
|
||||
# -- Array of tolerations object. Node tolerations for server scheduling to nodes with taints. Ref: [https://kubernetes.io/docs/concepts/configuration/assign-pod-node/](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/)
|
||||
##
|
||||
tolerations:
|
||||
[]
|
||||
# - key: "key"
|
||||
# operator: "Equal|Exists"
|
||||
# value: "value"
|
||||
# effect: "NoSchedule|PreferNoSchedule"
|
||||
|
||||
# -- Pod's node selector. Ref: [https://kubernetes.io/docs/user-guide/node-selection/](https://kubernetes.io/docs/user-guide/node-selection/)
|
||||
nodeSelector: {}
|
||||
|
||||
# -- Pod affinity
|
||||
affinity: {}
|
||||
|
||||
## Use an alternate scheduler, e.g. "stork".
|
||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||
##
|
||||
# schedulerName:
|
||||
|
||||
persistentVolume:
|
||||
# -- Create/use Persistent Volume Claim for vmstorage component. Empty dir if false. If true, vmstorage will create/use a Persistent Volume Claim
|
||||
enabled: true
|
||||
|
||||
# -- Array of access modes. Must match those of existing PV or dynamic provisioner. Ref: [http://kubernetes.io/docs/user-guide/persistent-volumes/](http://kubernetes.io/docs/user-guide/persistent-volumes/)
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
# -- Persistent volume annotations
|
||||
annotations: {}
|
||||
# -- Persistent volume labels
|
||||
labels: {}
|
||||
# -- Storage class name. Will be empty if not setted
|
||||
storageClass: ""
|
||||
# -- Existing Claim name. Requires vmstorage.persistentVolume.enabled: true. If defined, PVC must be created manually before volume will be bound
|
||||
existingClaim: ""
|
||||
|
||||
# -- Data root path. Vmstorage data Persistent Volume mount root path
|
||||
mountPath: /storage
|
||||
# -- Size of the volume. Better to set the same as resource limit memory property
|
||||
size: 8Gi
|
||||
# -- Mount subpath
|
||||
subPath: ""
|
||||
|
||||
# -- Pod's annotations
|
||||
podAnnotations: {}
|
||||
annotations: {}
|
||||
extraLabels: {}
|
||||
# -- Count of vmstorage pods
|
||||
replicaCount: 2
|
||||
# -- Container workdir
|
||||
containerWorkingDir: ""
|
||||
# -- Deploy order policy for StatefulSet pods
|
||||
podManagementPolicy: OrderedReady
|
||||
|
||||
# -- Resource object. Ref: [https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 500m
|
||||
# memory: 512Mi
|
||||
# requests:
|
||||
# cpu: 500m
|
||||
# memory: 512Mi
|
||||
|
||||
# -- Pod's security context. Ref: [https://kubernetes.io/docs/tasks/configure-pod-container/security-context/](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
|
||||
securityContext: {}
|
||||
podSecurityContext: {}
|
||||
service:
|
||||
# -- Service annotations
|
||||
annotations: {}
|
||||
# -- Service labels
|
||||
labels: {}
|
||||
# -- Service port
|
||||
servicePort: 8482
|
||||
# -- Port for accepting connections from vminsert
|
||||
vminsertPort: 8400
|
||||
# -- Port for accepting connections from vmselect
|
||||
vmselectPort: 8401
|
||||
# -- Extra service ports
|
||||
extraServicePorts: []
|
||||
# -- Pod's termination grace period in seconds
|
||||
terminationGracePeriodSeconds: 60
|
||||
probe:
|
||||
readiness:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
liveness:
|
||||
tcpSocket:
|
||||
port: http
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 10
|
||||
vmbackupmanager:
|
||||
# -- enable automatic creation of backup via vmbackupmanager. vmbackupmanager is part of Enterprise packages
|
||||
enable: false
|
||||
# -- should be true and means that you have the legal right to run a backup manager
|
||||
# that can either be a signed contract or an email with confirmation to run the service in a trial period
|
||||
# # https://victoriametrics.com/legal/eula/
|
||||
eula: false
|
||||
image:
|
||||
# -- vmbackupmanager image repository
|
||||
repository: victoriametrics/vmbackupmanager
|
||||
# -- vmbackupmanager image tag
|
||||
tag: v1.91.3-enterprise
|
||||
# -- disable hourly backups
|
||||
disableHourly: false
|
||||
# -- disable daily backups
|
||||
disableDaily: false
|
||||
# -- disable weekly backups
|
||||
disableWeekly: false
|
||||
# -- disable monthly backups
|
||||
disableMonthly: false
|
||||
# -- backup destination at S3, GCS or local filesystem. Pod name will be included to path!
|
||||
destination: ""
|
||||
# -- backups' retention settings
|
||||
retention:
|
||||
# -- keep last N hourly backups. 0 means delete all existing hourly backups. Specify -1 to turn off
|
||||
keepLastHourly: 2
|
||||
# -- keep last N daily backups. 0 means delete all existing daily backups. Specify -1 to turn off
|
||||
keepLastDaily: 2
|
||||
# -- keep last N weekly backups. 0 means delete all existing weekly backups. Specify -1 to turn off
|
||||
keepLastWeekly: 2
|
||||
# -- keep last N monthly backups. 0 means delete all existing monthly backups. Specify -1 to turn off
|
||||
keepLastMonthly: 2
|
||||
extraArgs:
|
||||
envflag.enable: "true"
|
||||
envflag.prefix: VM_
|
||||
loggerFormat: json
|
||||
# -- Allows to enable restore options for pod.
|
||||
# Read more: https://docs.victoriametrics.com/vmbackupmanager.html#restore-commands
|
||||
restore:
|
||||
onStart:
|
||||
enabled: false
|
||||
resources: {}
|
||||
# -- Additional environment variables (ex.: secret tokens, flags) https://github.com/VictoriaMetrics/VictoriaMetrics#environment-variables
|
||||
env: []
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: manager-http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: manager-http
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 10
|
||||
extraSecretMounts:
|
||||
[]
|
||||
# - name: secret
|
||||
# mountPath: /etc/credentials
|
||||
# subPath: ""
|
||||
# readOnly: true
|
||||
serviceMonitor:
|
||||
# -- Enable deployment of Service Monitor for vmstorage component. This is Prometheus operator object
|
||||
enabled: false
|
||||
# -- Target namespace of ServiceMonitor manifest
|
||||
namespace: ""
|
||||
# -- Service Monitor labels
|
||||
extraLabels: {}
|
||||
# -- Service Monitor annotations
|
||||
annotations: {}
|
||||
# Commented. Prometheus scare interval for vmstorage component
|
||||
# interval: 15s
|
||||
# Commented. Prometheus pre-scrape timeout for vmstorage component
|
||||
# scrapeTimeout: 5s
|
||||
# -- Commented. HTTP scheme to use for scraping.
|
||||
# scheme: https
|
||||
# -- Commented. TLS configuration to use when scraping the endpoint
|
||||
# tlsConfig:
|
||||
# insecureSkipVerify: true
|
||||
# -- Service Monitor relabelings
|
||||
relabelings: []
|
||||
Reference in New Issue
Block a user