Skip to content

Commit

Permalink
common: fixed labels typo
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Nov 21, 2024
1 parent 4db17b6 commit c855fc4
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
{{- if $app.securityContext.enabled }}
securityContext: {{ include "vm.securityContext" (dict "securityContext" $app.securityContext "helm" .) | nindent 12 }}
{{- end }}
image: {{ include "vm.image" (dict "helm" . "app" $app) }}
image: {{ include "vm.image" $ctx }}
args: {{ include "alertmanager.args" $ctx | nindent 12 }}
ports:
- name: web
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
{{- if $app.securityContext.enabled }}
securityContext: {{ include "vm.securityContext" (dict "securityContext" $app.securityContext "helm" .) | nindent 12 }}
{{- end }}
image: {{ include "vm.image" (dict "helm" . "app" $app) }}
image: {{ include "vm.image" $ctx }}
args: {{ include "vmalert.args" $ctx | nindent 12 }}
imagePullPolicy: {{ $app.image.pullPolicy }}
{{- with $app.envFrom }}
Expand Down
2 changes: 1 addition & 1 deletion charts/victoria-metrics-anomaly/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
{{- end }}
containers:
- name: model
image: {{ include "vm.image" (dict "helm" . "app" .Values) }}
image: {{ include "vm.image" $ctx }}
workingDir: {{ .Values.containerWorkingDir }}
{{- if (((.Values.config).monitoring).pull).enabled }}
{{- with (((.Values.config).monitoring).pull).port }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
{{- end }}
containers:
- name: vmauth
image: {{ include "vm.image" (dict "helm" . "app" $app) }}
image: {{ include "vm.image" $ctx }}
imagePullPolicy: {{ $app.image.pullPolicy }}
{{- with $app.containerWorkingDir }}
workingDir: {{ . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ spec:
{{- end }}
containers:
- name: vminsert
{{- $_ := set $ctx "app" $app }}
image: {{ include "vm.image" $ctx }}
imagePullPolicy: {{ $app.image.pullPolicy }}
{{- with $app.containerWorkingDir }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
{{- end }}
containers:
- name: vmselect
image: {{ include "vm.image" (dict "helm" . "app" $app) }}
image: {{ include "vm.image" $ctx }}
imagePullPolicy: {{ $app.image.pullPolicy }}
{{- with $app.containerWorkingDir }}
workingDir: {{ . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
{{- end }}
containers:
- name: vmselect
image: {{ include "vm.image" (dict "helm" . "app" $app) }}
image: {{ include "vm.image" $ctx }}
imagePullPolicy: {{ $app.image.pullPolicy }}
{{- with $app.containerWorkingDir }}
workingDir: {{ . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ spec:
{{- if $manager.restore.onStart.enabled }}
{{- include "vm.enterprise.only" . }}
- name: vmbackupmanager-restore
image: {{ include "vm.image" (dict "helm" . "app" $manager) }}
{{- $_ := set $ctx "appKey" (list "vmstorage" "vmbackupmanager") }}
image: {{ include "vm.image" $ctx }}
imagePullPolicy: {{ $app.image.pullPolicy }}
{{- if $app.securityContext.enabled }}
securityContext: {{ include "vm.securityContext" (dict "securityContext" $app.securityContext "helm" .) | nindent 12 }}
Expand Down Expand Up @@ -80,7 +81,8 @@ spec:
{{- end }}
containers:
- name: vmstorage
image: {{ include "vm.image" (dict "helm" . "app" $app) }}
{{- $_ := set $ctx "appKey" "vmstorage" }}
image: {{ include "vm.image" $ctx }}
imagePullPolicy: {{ $app.image.pullPolicy }}
{{- with $app.containerWorkingDir }}
workingDir: {{ . }}
Expand Down Expand Up @@ -159,7 +161,8 @@ spec:
{{- if $manager.enabled }}
{{- include "vm.enterprise.only" . }}
- name: vmbackupmanager
image: {{ include "vm.image" (dict "helm" . "app" $manager) }}
{{- $_ := set $ctx "appKey" (list "vmstorage" "vmbackupmanager") }}
image: {{ include "vm.image" $ctx }}
imagePullPolicy: {{ $app.image.pullPolicy }}
{{- if $app.securityContext.enabled }}
securityContext: {{ include "vm.securityContext" (dict "securityContext" $app.securityContext "helm" .) | nindent 12 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/victoria-metrics-common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Next release

- TODO
- fixed minor typo in vm.labels

## 0.0.30

Expand Down
2 changes: 1 addition & 1 deletion charts/victoria-metrics-common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
type: library
description: Victoria Metrics Common - contains shared templates for all Victoria Metrics helm charts
name: victoria-metrics-common
version: 0.0.30
version: 0.0.31
sources:
- https://github.com/VictoriaMetrics/helm-charts
kubeVersion: ">=1.23.0-0"
Expand Down
5 changes: 2 additions & 3 deletions charts/victoria-metrics-common/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,8 @@ If release name contains chart name it will be used as a full name.
{{- include "vm.validate.args" . -}}
{{- $labels := fromYaml (include "vm.selectorLabels" .) -}}
{{- $labels = mergeOverwrite $labels (fromYaml (include "vm.metaLabels" .)) -}}
{{- $tag := include "vm.image.tag" . -}}
{{- if .app }}
{{- $_ := set $labels "app.kubernetes.io/version" $tag -}}
{{- with (include "vm.image.tag" .) }}
{{- $_ := set $labels "app.kubernetes.io/version" . -}}
{{- end -}}
{{- toYaml $labels -}}
{{- end -}}
Expand Down
3 changes: 2 additions & 1 deletion charts/victoria-metrics-operator/templates/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ spec:
{{- end }}
containers:
- name: kubectl
image: {{ include "vm.image" (dict "helm" . "app" $app) }}
{{- $_ := set $ctx "appKey" (list "crds" "cleanup") }}
image: {{ include "vm.image" $ctx }}
imagePullPolicy: {{ $app.image.pullPolicy }}
resources: {{ toYaml $app.resources | nindent 12 }}
args:
Expand Down
2 changes: 1 addition & 1 deletion charts/victoria-metrics-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
{{- end }}
containers:
- name: operator
image: {{ include "vm.image" (dict "helm" . "app" .Values ) }}
image: {{ include "vm.image" $ctx }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.envFrom }}
envFrom: {{ toYaml . | nindent 12 }}
Expand Down

0 comments on commit c855fc4

Please sign in to comment.