Skip to content

Commit

Permalink
common: release 0.0.36
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Dec 24, 2024
1 parent 3bc7c0f commit 9bcf581
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/victoria-metrics-common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Next release

- Exclude markdown files from package
- Unset empty registry in `vm.image` template to fix global registry propagation

## 0.0.35

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.35
version: 0.0.36
sources:
- https://github.com/VictoriaMetrics/helm-charts
kubeVersion: ">=1.23.0-0"
Expand Down
3 changes: 3 additions & 0 deletions charts/victoria-metrics-common/templates/_image.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ Victoria Metrics Image
{{- end -}}
{{- end -}}
{{- $image := ternary $ctx.image $values.image (hasKey $ctx "image") -}}
{{- if and (not $image.registry) (hasKey $image "registry") -}}
{{- $_ := unset $image "registry" -}}
{{- end -}}
{{- $image = mergeOverwrite (deepCopy (($Values.global).image | default dict)) ($image | default dict) -}}
{{- toYaml (dict "image" $image) -}}
{{- end -}}
20 changes: 20 additions & 0 deletions test-charts/victoria-metrics-common/tests/image_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ tests:
- equal:
path: vm.image.tag
value: 0.4.0
- it: custom image tag, empty local and set global registry
set:
ctx:
appKey:
- app
app:
image:
registry: ""
repository: vmagent
tag: 0.4.0
global:
image:
registry: localhost:8080
asserts:
- equal:
path: vm.image.name
value: localhost:8080/vmagent:0.4.0
- equal:
path: vm.image.tag
value: 0.4.0
- it: no image tag, and global registry only
set:
ctx:
Expand Down

0 comments on commit 9bcf581

Please sign in to comment.