Skip to content

Commit

Permalink
distributed: 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Dec 19, 2024
1 parent 874a784 commit feb0675
Show file tree
Hide file tree
Showing 12 changed files with 169 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .github/ci/cr.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
skip-existing: true
generate-release-notes: false
release-notes-file: RELEASE_NOTES.md
release-notes-file: RELEASE_NOTES
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
yq -M -i '.annotations["artifacthub.io/changes"] = (load_str(strenv(CHANGELOG)) | capture("## Next release[\s]*(?P<changes>[\s\S]*?)[\s]*##") | .changes | split("\n") | .[] |= sub("^[\s]*-[\s]+", "") | filter(length > 0) | to_yaml)' $CHART_FILE
# Create release notes
cat <<EOT > ${CHART_DIR}/RELEASE_NOTES.md
cat <<EOT > ${CHART_DIR}/RELEASE_NOTES
# Release notes for version $CHART_VERSION
$RELEASE_DATE
Expand All @@ -108,33 +108,33 @@ jobs:
done
- name: Release
if: ${{ hashFiles('charts/*/RELEASE_NOTES.md') != '' }}
if: ${{ hashFiles('charts/*/RELEASE_NOTES') != '' }}
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.VM_BOT_GH_TOKEN }}"
with:
config: .github/ci/cr.yaml

- name: Release OCI
if: ${{ hashFiles('charts/*/RELEASE_NOTES.md') != '' }}
if: ${{ hashFiles('charts/*/RELEASE_NOTES') != '' }}
run: |
helm registry login \
-u ${{ github.actor }} \
-p ${{ github.token }} \
ghcr.io
mkdir -p .cr-release-packages
for chart in charts/*; do
if [ ! -f $chart/RELEASE_NOTES.md ]; then
if [ ! -f $chart/RELEASE_NOTES ]; then
echo "no release notes for chart $chart. removing it from uploading..."
rm -rf .cr-release-packages/$(basename $chart)*
fi
done
find .cr-release-packages -name "*.tgz" -exec helm push {} oci://ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/helm-charts \;
- name: Automatic update changelogs and readme
if: ${{ hashFiles('charts/*/RELEASE_NOTES.md') != '' }}
if: ${{ hashFiles('charts/*/RELEASE_NOTES') != '' }}
run: |
rm -rf charts/*/RELEASE_NOTES.md
rm -rf charts/*/RELEASE_NOTES
export VM_GIT_BRANCH_NAME="changelog-update-$(date +%s)"
git checkout -b "${VM_GIT_BRANCH_NAME}"
git add charts/*/CHANGELOG.md
Expand Down
1 change: 1 addition & 0 deletions charts/victoria-metrics-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Next release

- upgraded operator, it's required to [update CRDs manually](../victoriametrics-k8s-stack/#upgrade-guide)
- bump version of VM components to [v1.108.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.108.1)
- Exclude markdown files from package

Expand Down
6 changes: 3 additions & 3 deletions charts/victoria-metrics-distributed/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
version: 0.0.35
- name: victoria-metrics-k8s-stack
repository: https://victoriametrics.github.io/helm-charts
version: 0.31.2
digest: sha256:8aea0e33f8476426a515ac680920ec0fe1c746dcf9bc52036fa0ec85c3216d45
generated: "2024-12-17T20:40:43.627868213Z"
version: 0.33.0
digest: sha256:7568dd9bf5e761a36ebd8c41a0397d1eaaf859bdab53b644e535a64928f17653
generated: "2024-12-19T23:14:43.949215+02:00"
4 changes: 2 additions & 2 deletions charts/victoria-metrics-distributed/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: victoria-metrics-distributed
description: A Helm chart for Running VMCluster on Multiple Availability Zones
type: application
version: 0.6.2
version: 0.7.0
appVersion: "v1.108.1"
sources:
- https://github.com/VictoriaMetrics/helm-charts
Expand Down Expand Up @@ -36,6 +36,6 @@ dependencies:
version: "0.0.*"
repository: https://victoriametrics.github.io/helm-charts
- name: victoria-metrics-k8s-stack
version: "0.31.*"
version: "0.33.*"
repository: https://victoriametrics.github.io/helm-charts
condition: victoria-metrics-k8s-stack.enabled
2 changes: 1 addition & 1 deletion charts/victoria-metrics-distributed/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.6.2](https://img.shields.io/badge/Version-0.6.2-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-distributed)
[![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@ metadata:
{{- with $zone.read.perZone.vmauth.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec: {{ tpl (toYaml (omit $zone.read.perZone.vmauth.spec "unauthorizedAccessConfig")) $ctx | nindent 2 }}
spec: {{ tpl (toYaml (omit $zone.read.perZone.vmauth.spec "unauthorizedUserAccessSpec")) $ctx | nindent 2 }}
{{- $clusterSpec := ($zone.vmcluster).spec | default dict }}
{{- $_ := set $ctx "appKey" (list "zone" "vmcluster" "spec" "vmselect") }}
{{- $_ := set $zone.vmcluster "spec" (mergeOverwrite (deepCopy $commonClusterSpec) (deepCopy $commonSpec) (deepCopy $clusterSpec)) }}
{{- $_ := set $ctx "style" "managed" }}
unauthorizedAccessConfig:
- src_paths:
- "/select/.+"
url_prefix:
- {{ include "vm.url" $ctx }}
{{- $_ := unset $ctx "style" }}
unauthorizedUserAccessSpec:
url_map:
- src_paths:
- "/select/.+"
url_prefix:
- {{ include "vm.url" $ctx }}
{{- $_ := unset $ctx "style" }}
{{- end }}
{{- end }}

Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,36 @@ metadata:
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
{{- $spec := mergeOverwrite (deepCopy $.Values.common.vmauth.spec) (deepCopy (($zone.common).spec)) (deepCopy (((($zone.read).crossZone).vmauth).spec)) }}
spec: {{ tpl (toYaml (omit $spec "unauthorizedAccessConfig")) $ctx | nindent 2 }}
unauthorizedAccessConfig:
- src_paths:
- "/select/.+"
load_balancing_policy: first_available
retry_status_codes:
- 503
{{- $_ := set $ctx "style" "managed" }}
{{- $urls := default list }}
{{- if $zone.read.allow }}
{{- $_ := set $ctx "appKey" (list "zone" "read" "perZone" "vmauth" "spec") }}
{{- $urls = append $urls (include "vm.url" $ctx) }}
{{- end }}
{{- range $j, $c := $.Values.availabilityZones }}
{{- $cross := mergeOverwrite (deepCopy $.Values.zoneTpl) $c }}
{{- if and (ne $j $i) $cross.read.allow }}
{{- $_ := set $ctx "appKey" (list "zone" "read" "perZone" "vmauth" "spec") }}
{{- if (($cross.read).perZone).vmauth }}
{{- $urlSpec := $cross.read.perZone.vmauth.spec | default dict }}
{{- $_ := set $cross.read.perZone.vmauth "spec" (mergeOverwrite (deepCopy $.Values.common.vmauth.spec) $urlSpec) }}
spec: {{ tpl (toYaml (omit $spec "unauthorizedUserAccessSpec")) $ctx | nindent 2 }}
unauthorizedUserAccessSpec:
url_map:
- src_paths:
- "/select/.+"
load_balancing_policy: first_available
retry_status_codes:
- 503
{{- $_ := set $ctx "style" "managed" }}
{{- $urls := default list }}
{{- if $zone.read.allow }}
{{- $_ := set $ctx "appKey" (list "zone" "read" "perZone" "vmauth" "spec") }}
{{- $urls = append $urls (include "vm.url" $ctx) }}
{{- end }}
{{- $_ := set $ctx "zone" $cross }}
{{- $urls = append $urls (include "vm.url" $ctx)}}
{{- end }}
{{- end }}
{{- if empty $urls }}
{{- fail (printf "No read backend urls defined for vmauth in AZ %s" $zone.name) -}}
{{- end }}
url_prefix: {{ toYaml $urls | nindent 4 }}
{{- $_ := unset $ctx "style" }}
{{- range $j, $c := $.Values.availabilityZones }}
{{- $cross := mergeOverwrite (deepCopy $.Values.zoneTpl) $c }}
{{- if and (ne $j $i) $cross.read.allow }}
{{- $_ := set $ctx "appKey" (list "zone" "read" "perZone" "vmauth" "spec") }}
{{- if (($cross.read).perZone).vmauth }}
{{- $urlSpec := $cross.read.perZone.vmauth.spec | default dict }}
{{- $_ := set $cross.read.perZone.vmauth "spec" (mergeOverwrite (deepCopy $.Values.common.vmauth.spec) $urlSpec) }}
{{- end }}
{{- $_ := set $ctx "zone" $cross }}
{{- $urls = append $urls (include "vm.url" $ctx)}}
{{- end }}
{{- end }}
{{- if empty $urls }}
{{- fail (printf "No read backend urls defined for vmauth in AZ %s" $zone.name) -}}
{{- end }}
url_prefix: {{ toYaml $urls | nindent 10 }}
{{- $_ := unset $ctx "style" }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ metadata:
{{- with $zone.write.vmauth.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec: {{ tpl (toYaml (omit $zone.write.vmauth.spec "unauthorizedAccessConfig")) $ctx | nindent 2 }}
spec: {{ tpl (toYaml (omit $zone.write.vmauth.spec "unauthorizedUserAccessSpec")) $ctx | nindent 2 }}
{{- $_ := set $ctx "style" "managed" }}
{{- $clusterSpec := ($zone.vmcluster).spec | default dict }}
{{- $_ := set $zone.vmcluster "spec" (mergeOverwrite (deepCopy $commonClusterSpec) (deepCopy $commonSpec) (deepCopy $clusterSpec)) }}
{{- $_ := set $ctx "appKey" (list "zone" "vmcluster" "spec" "vminsert") }}
unauthorizedAccessConfig:
- src_paths:
- "/insert/.+"
url_prefix:
- {{ include "vm.url" $ctx }}
{{- $_ := unset $ctx "style" }}
unauthorizedUserAccessSpec:
url_map:
- src_paths:
- "/insert/.+"
url_prefix:
- {{ include "vm.url" $ctx }}
{{- $_ := unset $ctx "style" }}
{{- end }}
{{- end }}
41 changes: 21 additions & 20 deletions charts/victoria-metrics-distributed/templates/vmauth-read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,28 @@ metadata:
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with (omit $auth.spec "unauthorizedAccessConfig") }}
{{- with (omit $auth.spec "unauthorizedUserAccessSpec") }}
{{- toYaml . | nindent 2 }}
{{- end }}
unauthorizedAccessConfig:
- src_paths:
- "/select/.+"
load_balancing_policy: first_available
{{- $_ := set $ctx "style" "managed" }}
{{- $urls := default list }}
{{- range $i, $z := $.Values.availabilityZones }}
{{- $zone := mergeOverwrite (deepCopy $.Values.zoneTpl) $z }}
{{- $authSpec := ((($zone.read).crossZone).vmauth).spec | default dict }}
{{- $_ := set $zone.read.crossZone.vmauth "spec" (mergeOverwrite (deepCopy $commonAuth.spec) $authSpec) }}
{{- $_ := set $ctx "zone" $zone }}
{{- $_ := set $ctx "appKey" (list "zone" "read" "crossZone" "vmauth" "spec") }}
{{- $urls = append $urls (include "vm.url" $ctx) }}
{{- end }}
{{- $_ := unset $ctx "style" }}
{{- if empty $urls }}
{{- fail "No global vmauth read backend urls defined" -}}
{{- end }}
url_prefix: {{ toYaml $urls | nindent 4 }}
unauthorizedUserAccessSpec:
url_map:
- src_paths:
- "/select/.+"
load_balancing_policy: first_available
{{- $_ := set $ctx "style" "managed" }}
{{- $urls := default list }}
{{- range $i, $z := $.Values.availabilityZones }}
{{- $zone := mergeOverwrite (deepCopy $.Values.zoneTpl) $z }}
{{- $authSpec := ((($zone.read).crossZone).vmauth).spec | default dict }}
{{- $_ := set $zone.read.crossZone.vmauth "spec" (mergeOverwrite (deepCopy $commonAuth.spec) $authSpec) }}
{{- $_ := set $ctx "zone" $zone }}
{{- $_ := set $ctx "appKey" (list "zone" "read" "crossZone" "vmauth" "spec") }}
{{- $urls = append $urls (include "vm.url" $ctx) }}
{{- end }}
{{- $_ := unset $ctx "style" }}
{{- if empty $urls }}
{{- fail "No global vmauth read backend urls defined" -}}
{{- end }}
url_prefix: {{ toYaml $urls | nindent 10 }}
{{- end }}

49 changes: 25 additions & 24 deletions charts/victoria-metrics-distributed/templates/vmauth-write.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,31 @@ metadata:
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with (omit $auth.spec "unauthorizedAccessConfig") }}
{{- with (omit $auth.spec "unauthorizedUserAccessSpec") }}
{{- toYaml . | nindent 2 }}
{{- end }}
unauthorizedAccessConfig:
- src_paths:
- "/api/v1/write"
- "/prometheus/api/v1/write"
- "/write"
- "/api/v1/import"
- "/api/v1/import/.+"
{{- $_ := set $ctx "style" "managed" }}
{{- $urls := default list }}
{{- $commonAgentSpec := (((.Values).common).vmagent).spec | default dict }}
{{- range $i, $z := $.Values.availabilityZones }}
{{- $zone := mergeOverwrite (deepCopy $.Values.zoneTpl) $z }}
{{- $agentSpec := $zone.vmagent.spec | default dict }}
{{- $_ := set $zone.vmagent "spec" (mergeOverwrite (deepCopy $commonAgentSpec) $agentSpec) }}
{{- $_ := set $ctx "zone" $zone }}
{{- $_ := set $ctx "appKey" (list "zone" "vmagent" "spec") }}
{{- $urls = append $urls (include "vm.url" $ctx) }}
{{- end }}
{{- $_ := unset $ctx "style" }}
{{- if empty $urls }}
{{- fail "No global vmauth write backend urls defined" -}}
{{- end }}
url_prefix: {{ toYaml $urls | nindent 4 }}
unauthorizedUserAccessSpec:
url_map:
- src_paths:
- "/api/v1/write"
- "/prometheus/api/v1/write"
- "/write"
- "/api/v1/import"
- "/api/v1/import/.+"
{{- $_ := set $ctx "style" "managed" }}
{{- $urls := default list }}
{{- $commonAgentSpec := (((.Values).common).vmagent).spec | default dict }}
{{- range $i, $z := $.Values.availabilityZones }}
{{- $zone := mergeOverwrite (deepCopy $.Values.zoneTpl) $z }}
{{- $agentSpec := $zone.vmagent.spec | default dict }}
{{- $_ := set $zone.vmagent "spec" (mergeOverwrite (deepCopy $commonAgentSpec) $agentSpec) }}
{{- $_ := set $ctx "zone" $zone }}
{{- $_ := set $ctx "appKey" (list "zone" "vmagent" "spec") }}
{{- $urls = append $urls (include "vm.url" $ctx) }}
{{- end }}
{{- $_ := unset $ctx "style" }}
{{- if empty $urls }}
{{- fail "No global vmauth write backend urls defined" -}}
{{- end }}
url_prefix: {{ toYaml $urls | nindent 10 }}
{{- end }}
Loading

0 comments on commit feb0675

Please sign in to comment.