Skip to content

Commit

Permalink
add truncation to labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Gniewosz committed Apr 16, 2024
1 parent b890cb9 commit cd6921b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions charts/victoria-metrics-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ Create the name of the service account
Create unified labels for victoria-metrics components
*/}}
{{- define "victoria-metrics.common.matchLabels" -}}
app.kubernetes.io/name: {{ include "victoria-metrics.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "victoria-metrics.name" . | trunc 60 }}
app.kubernetes.io/instance: {{ .Release.Name | trunc 60 }}
{{- end -}}

{{- define "victoria-metrics.common.metaLabels" -}}
helm.sh/chart: {{ include "victoria-metrics.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "victoria-metrics.chart" . | trunc 60 }}
app.kubernetes.io/managed-by: {{ .Release.Service | trunc 60 }}
{{- end -}}

{{- define "victoria-metrics.common.podLabels" -}}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/managed-by: {{ .Release.Service | trunc 60}}
{{- end -}}

{{- define "victoria-metrics.vmstorage.labels" -}}
Expand Down Expand Up @@ -139,7 +139,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- end -}}

{{/*
Create a fully qualified vmselect name.
Create a fully qualified vminsert name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "victoria-metrics.vminsert.fullname" -}}
Expand Down

0 comments on commit cd6921b

Please sign in to comment.