Skip to content

Commit

Permalink
added cluster podLabels support
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Sep 5, 2024
1 parent 88f9498 commit 6094016
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 2 deletions.
1 change: 1 addition & 0 deletions charts/victoria-metrics-cluster/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Next release

- Removed deprecated autoscaling v2beta2 API support
- Added podLabels support

## 0.13.3

Expand Down
2 changes: 1 addition & 1 deletion charts/victoria-metrics-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: application
appVersion: v1.103.0
description: Victoria Metrics Cluster version - high-performance, cost-effective and scalable TSDB, long-term remote storage for Prometheus
name: victoria-metrics-cluster
version: 0.13.3
version: 0.13.4
sources:
- https://github.com/VictoriaMetrics/helm-charts
icon: https://avatars.githubusercontent.com/u/43720803?s=200&v=4
Expand Down
29 changes: 28 additions & 1 deletion charts/victoria-metrics-cluster/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Victoria Metrics Helm Chart for Cluster Version

![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.13.3](https://img.shields.io/badge/Version-0.13.3-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.13.4](https://img.shields.io/badge/Version-0.13.4-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-cluster)
[![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/)

Expand Down Expand Up @@ -635,6 +635,15 @@ false
<td><pre lang="plaintext">
{}
</pre>
</td>
<td></td>
</tr>
<tr>
<td>vminsert.podLabels</td>
<td>object</td>
<td><pre lang="plaintext">
{}
</pre>
</td>
<td></td>
</tr>
Expand Down Expand Up @@ -1443,6 +1452,15 @@ false
<td><pre lang="plaintext">
{}
</pre>
</td>
<td></td>
</tr>
<tr>
<td>vmselect.podLabels</td>
<td>object</td>
<td><pre lang="plaintext">
{}
</pre>
</td>
<td></td>
</tr>
Expand Down Expand Up @@ -2176,6 +2194,15 @@ labels: {}
<td><p>See <code>kubectl explain poddisruptionbudget.spec</code> for more. Details are <a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/" target="_blank">here</a></p>
</td>
</tr>
<tr>
<td>vmstorage.podLabels</td>
<td>object</td>
<td><pre lang="plaintext">
{}
</pre>
</td>
<td></td>
</tr>
<tr>
<td>vmstorage.podManagementPolicy</td>
<td>string</td>
Expand Down
3 changes: 3 additions & 0 deletions charts/victoria-metrics-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ app.kubernetes.io/managed-by: {{ .Release.Service | trunc 63 | trimSuffix "-" }}

{{- define "victoria-metrics.common.podLabels" -}}
app.kubernetes.io/managed-by: {{ .Release.Service | trunc 63 | trimSuffix "-" }}
{{- with .extraLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}

{{- define "victoria-metrics.vmstorage.labels" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
{{- with $app.podAnnotations }}
annotations: {{ toYaml . | nindent 8 }}
{{- end }}
{{- $_ := set $ctx "extraLabels" $app.podLabels }}
labels: {{ include "victoria-metrics.vminsert.podLabels" $ctx | nindent 8 }}
spec:
{{- with $app.priorityClassName }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spec:
{{- with $app.podAnnotations }}
annotations: {{ toYaml . | nindent 8 }}
{{- end }}
{{- $_ := set $ctx "extraLabels" $app.podLabels }}
labels: {{ include "victoria-metrics.vmselect.podLabels" $ctx | nindent 8 }}
spec:
{{- with $ctx.priorityClassName }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ spec:
{{- with $app.podAnnotations }}
annotations: {{ toYaml . | nindent 8 }}
{{- end }}
{{- $_ := set $ctx "extraLabels" $app.podLabels }}
labels: {{ include "victoria-metrics.vmselect.podLabels" $ctx | nindent 8 }}
spec:
{{- with $app.priorityClassName }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ spec:
{{- with $app.podAnnotations }}
annotations: {{ toYaml . | nindent 8 }}
{{- end }}
{{- $_ := set $ctx "extraLabels" $app.podLabels }}
labels: {{ include "victoria-metrics.vmstorage.podLabels" $ctx | nindent 8 }}
spec:
{{- with $app.priorityClassName }}
Expand Down
3 changes: 3 additions & 0 deletions charts/victoria-metrics-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ vmselect:
loggerFormat: json
annotations: {}
extraLabels: {}
podLabels: {}
# -- Additional environment variables (ex.: secret tokens, flags) https://docs.victoriametrics.com/#environment-variables
env: []
envFrom: []
Expand Down Expand Up @@ -325,6 +326,7 @@ vminsert:
loggerFormat: json
annotations: {}
extraLabels: {}
podLabels: {}
# -- Additional environment variables (ex.: secret tokens, flags) https://docs.victoriametrics.com/#environment-variables
env: []
envFrom: []
Expand Down Expand Up @@ -652,6 +654,7 @@ vmstorage:
podAnnotations: {}
annotations: {}
extraLabels: {}
podLabels: {}
# -- Count of vmstorage pods
replicaCount: 2
# -- Container workdir
Expand Down

0 comments on commit 6094016

Please sign in to comment.