diff --git a/charts/victoria-metrics-cluster/values.yaml b/charts/victoria-metrics-cluster/values.yaml index 98eef7d43..3b579053c 100644 --- a/charts/victoria-metrics-cluster/values.yaml +++ b/charts/victoria-metrics-cluster/values.yaml @@ -86,18 +86,14 @@ vmselect: probe: # Readiness probe readiness: - httpGet: - path: '{{ include "vm.probe.http.path" . }}' - scheme: '{{ include "vm.probe.http.scheme" . }}' - port: '{{ include "vm.probe.port" . }}' + httpGet: {} initialDelaySeconds: 5 periodSeconds: 15 timeoutSeconds: 5 failureThreshold: 3 # Liveness probe liveness: - tcpSocket: - port: '{{ include "vm.probe.port" . }}' + tcpSocket: {} initialDelaySeconds: 5 periodSeconds: 15 timeoutSeconds: 5 @@ -342,17 +338,13 @@ vminsert: # Readiness & Liveness probes probe: readiness: - httpGet: - path: '{{ index .app.extraArgs "http.pathPrefix" | default "" | trimSuffix "/" }}/health' - scheme: '{{ ternary "HTTPS" "HTTP" (.app.extraArgs.tls | default false) }}' - port: '{{ dig "ports" "name" "http" (.app | dict) }}' + httpGet: {} initialDelaySeconds: 5 periodSeconds: 15 timeoutSeconds: 5 failureThreshold: 3 liveness: - tcpSocket: - port: '{{ dig "ports" "name" "http" (.app | dict) }}' + tcpSocket: {} initialDelaySeconds: 5 periodSeconds: 15 timeoutSeconds: 5 @@ -699,17 +691,13 @@ vmstorage: terminationGracePeriodSeconds: 60 probe: readiness: - httpGet: - path: '{{ include "vm.probe.http.path" . }}' - scheme: '{{ include "vm.probe.http.scheme" . }}' - port: '{{ include "vm.probe.port" . }}' + httpGet: {} initialDelaySeconds: 5 periodSeconds: 15 timeoutSeconds: 5 failureThreshold: 3 liveness: - tcpSocket: - port: '{{ include "vm.probe.port" . }}' + tcpSocket: {} initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 5 @@ -754,7 +742,7 @@ vmstorage: envflag.prefix: VM_ loggerFormat: json # -- Allows to enable restore options for pod. - # Read more: https://docs.victoriametrics.com/vmbackupmanager.html#restore-commands + # Read more: https://docs.victoriametrics.com/vmbackupmanager#restore-commands restore: onStart: enabled: false @@ -764,8 +752,6 @@ vmstorage: probe: readiness: httpGet: - path: '{{ include "vm.probe.http.path" . }}' - scheme: '{{ include "vm.probe.http.scheme" . }}' port: manager-http initialDelaySeconds: 5 periodSeconds: 15 @@ -812,7 +798,7 @@ vmstorage: # -- Enterprise license key configuration for VictoriaMetrics enterprise. # Required only for VictoriaMetrics enterprise. -# Documentation - https://docs.victoriametrics.com/enterprise.html, +# Documentation - https://docs.victoriametrics.com/enterprise, # for more information, visit https://victoriametrics.com/products/enterprise/ . # To request a trial license, go to https://victoriametrics.com/products/enterprise/trial/ # Supported starting from VictoriaMetrics v1.94.0 diff --git a/charts/victoria-metrics-operator/README.md b/charts/victoria-metrics-operator/README.md index ba6915773..6ec0c599c 100644 --- a/charts/victoria-metrics-operator/README.md +++ b/charts/victoria-metrics-operator/README.md @@ -180,11 +180,11 @@ Change the values according to the need of the environment in ``victoria-metrics | affinity | object | `{}` | Pod affinity | | annotations | object | `{}` | Annotations to be added to the all resources | | cleanupCRD | bool | `false` | deprecated. See `crd.cleanup.enabled` | -| cleanupImage | object | `{"pullPolicy":"IfNotPresent","repository":"bitnami/kubectl","tag":"{{ printf \"%s.%s\" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor | replace \"+\" \"\" }}"}` | deprecated. See `crd.cleanup.image` | -| crd.cleanup.enabled | bool | `false` | Tells helm to clean up all the vm resources under this release's namespace when uninstalling | +| cleanupImage | object | `{"pullPolicy":"IfNotPresent","repository":"bitnami/kubectl","tag":""}` | deprecated. See `crd.cleanup.image` | +| crd.cleanup.enabled | bool | `true` | Tells helm to clean up all the vm resources under this release's namespace when uninstalling | | crd.cleanup.image.pullPolicy | string | `"IfNotPresent"` | | | crd.cleanup.image.repository | string | `"bitnami/kubectl"` | | -| crd.cleanup.image.tag | string | `"{{ printf \"%s.%s\" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor | replace \"+\" \"\" }}"` | | +| crd.cleanup.image.tag | string | `""` | | | crd.create | bool | `true` | with this option, if you remove this chart, all crd resources will be deleted with it. | | createCRD | bool | `true` | deprecated. See `crd.create` | | env | list | `[]` | extra settings for the operator deployment. full list Ref: [https://github.com/VictoriaMetrics/operator/blob/master/vars.MD](https://github.com/VictoriaMetrics/operator/blob/master/vars.MD) | diff --git a/charts/victoria-metrics-operator/templates/uninstall_hook.yaml b/charts/victoria-metrics-operator/templates/uninstall_hook.yaml index bbe704ab8..c010cf64c 100644 --- a/charts/victoria-metrics-operator/templates/uninstall_hook.yaml +++ b/charts/victoria-metrics-operator/templates/uninstall_hook.yaml @@ -1,6 +1,10 @@ {{- if or .Values.cleanupCRD .Values.crd.cleanup.enabled }} {{- $app := ternary .Values.crd.cleanup (dict "image" .Values.cleanupImage) .Values.crd.cleanup.enabled }} {{- $global := (dict "Values" (deepCopy .Values) "Release" (deepCopy .Release) "Chart" (deepCopy .Chart) "Template" (deepCopy .Template) "Capabilities" (deepCopy .Capabilities)) }} +{{- if empty ($app.image).tag }} + {{- $tag := (printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor) | replace "+" "" -}} + {{- $_ := set $app.image "tag" $tag }} +{{- end }} --- apiVersion: batch/v1 kind: Job diff --git a/charts/victoria-metrics-operator/values.yaml b/charts/victoria-metrics-operator/values.yaml index b1ef339cd..754eeb7fc 100644 --- a/charts/victoria-metrics-operator/values.yaml +++ b/charts/victoria-metrics-operator/values.yaml @@ -30,7 +30,7 @@ cleanupCRD: false # -- deprecated. See `crd.cleanup.image` cleanupImage: repository: bitnami/kubectl - tag: '{{ printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor | replace "+" "" }}' + tag: "" pullPolicy: IfNotPresent crd: @@ -39,11 +39,11 @@ crd: create: true cleanup: # -- Tells helm to clean up all the vm resources under this release's namespace when uninstalling - enabled: false + enabled: true image: repository: bitnami/kubectl # use image tag that matches k8s API version by default - tag: '{{ printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor | replace "+" "" }}' + tag: "" pullPolicy: IfNotPresent replicaCount: 1