From 0ad6070fcc30319d87cfd1aceb53f7d6265f11e6 Mon Sep 17 00:00:00 2001 From: Michael Vittrup Larsen Date: Thu, 16 Jun 2022 13:23:38 +0200 Subject: [PATCH] Argo-cd: Add controller statefulset name truncation at 52 chars. Fixes #1328 (#1329) * Add controller statefulset name truncation at 52 chars Signed-off-by: MichaelVL * Delete old changelog Signed-off-by: MichaelVL --- charts/argo-cd/Chart.yaml | 4 ++-- charts/argo-cd/templates/_helpers.tpl | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 17f14860..7c567502 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v2.4.0 description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 4.9.2 +version: 4.9.3 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Changed]: Use latest URLs" + - "[Fixed]: Long release names cause invalid app controller statefulset resource" diff --git a/charts/argo-cd/templates/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl index 44af06dd..71d91b20 100644 --- a/charts/argo-cd/templates/_helpers.tpl +++ b/charts/argo-cd/templates/_helpers.tpl @@ -26,9 +26,11 @@ If release name contains chart name it will be used as a full name. {{/* Create controller name and version as used by the chart label. +Truncated at 52 chars because StatefulSet label 'controller-revision-hash' is limited +to 63 chars and it includes 10 chars of hash and a separating '-'. */}} {{- define "argo-cd.controller.fullname" -}} -{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.controller.name | trunc 63 | trimSuffix "-" -}} +{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.controller.name | trunc 52 | trimSuffix "-" -}} {{- end -}} {{/*