From d8ba2eb3a2fbabd9611cbc224cbf592d4c6aa455 Mon Sep 17 00:00:00 2001 From: Said Sef <6002187+saidsef@users.noreply.github.com> Date: Thu, 30 Nov 2023 10:11:22 +0000 Subject: [PATCH] chore(app/name): truncate application name to 40 chars (#133) --- charts/applicationset/Chart.yaml | 4 ++-- charts/applicationset/README.md | 2 +- charts/applicationset/templates/github-pr.yml | 4 ++-- charts/applicationset/templates/gitlab-mr.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/applicationset/Chart.yaml b/charts/applicationset/Chart.yaml index 6393ab3..a45ff0b 100644 --- a/charts/applicationset/Chart.yaml +++ b/charts/applicationset/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-applicationsets-services description: A Helm chart for ArgoCD ApplicationSets, a declarative, GitOps continuous delivery tool for Kubernetes type: application -version: &version "0.12.1" +version: &version "0.12.2" appVersion: *version kubeVersion: ">= 1.23" home: https://github.com/saidsef/argocd-applicationsets-services @@ -24,7 +24,7 @@ annotations: artifacthub.io/license: "Apache-2.0" artifacthub.io/changes: | - kind: changed - description: Truncate application name to 50 chars and trim suffix + description: Truncate application name to 40 chars and trim suffix artifacthub.io/links: | - name: README url: https://raw.githubusercontent.com/saidsef/argocd-applicationsets-services/main/README.md diff --git a/charts/applicationset/README.md b/charts/applicationset/README.md index d8b9275..95bd8b5 100644 --- a/charts/applicationset/README.md +++ b/charts/applicationset/README.md @@ -1,6 +1,6 @@ # argocd-applicationsets-services -![Version: 0.12.1](https://img.shields.io/badge/Version-0.12.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.12.1](https://img.shields.io/badge/AppVersion-0.12.1-informational?style=flat-square) +![Version: 0.12.2](https://img.shields.io/badge/Version-0.12.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.12.2](https://img.shields.io/badge/AppVersion-0.12.2-informational?style=flat-square) A Helm chart for ArgoCD ApplicationSets, a declarative, GitOps continuous delivery tool for Kubernetes diff --git a/charts/applicationset/templates/github-pr.yml b/charts/applicationset/templates/github-pr.yml index 8b6c713..7990756 100644 --- a/charts/applicationset/templates/github-pr.yml +++ b/charts/applicationset/templates/github-pr.yml @@ -19,7 +19,7 @@ apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: - name: '{{ required "A valid repo name is required" $repo.name | trunc 45 | trimSuffix "-" }}-github-{{ $name }}' + name: '{{ required "A valid repo name is required" $repo.name | trunc 40 | trimSuffix "-" }}-github-{{ $name }}' namespace: {{ required "A valied namespace is required" $namespace | replace "." "-" }} labels: app.kubernetes.io/name: {{ $repo.name }} @@ -50,7 +50,7 @@ spec: template: metadata: {{- $localName := printf "pr-%sbranch_slug%s-%snumber%s-%s" $dqf $dqb $dqf $dqb $name }} - name: {{ trunc 47 $localName | trimSuffix "-" }} + name: {{ trunc 45 $localName | trimSuffix "-" }} labels: app.kubernetes.io/name: {{ $repo.name }} app.kubernetes.io/branch: {{ trunc 63 $branch | trimSuffix "-" }} diff --git a/charts/applicationset/templates/gitlab-mr.yml b/charts/applicationset/templates/gitlab-mr.yml index 292bdd9..bfe0b10 100644 --- a/charts/applicationset/templates/gitlab-mr.yml +++ b/charts/applicationset/templates/gitlab-mr.yml @@ -18,7 +18,7 @@ apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: - name: '{{ required "A valid repo name is required" $repo.name | trunc 45 | trimSuffix "-" }}-gitlab-{{ $name }}' + name: '{{ required "A valid repo name is required" $repo.name | trunc 40 | trimSuffix "-" }}-gitlab-{{ $name }}' namespace: {{ required "A valied namespace is required" $namespace | replace "." "-" }} labels: app.kubernetes.io/name: {{ $repo.name }} @@ -49,7 +49,7 @@ spec: template: metadata: {{- $localName := printf "mr-%sbranch_slug%s-%snumber%s-%s" $dqf $dqb $dqf $dqb $name }} - name: {{ trunc 47 $localName | trimSuffix "-" }} + name: {{ trunc 45 $localName | trimSuffix "-" }} labels: app.kubernetes.io/name: {{ $repo.name }} app.kubernetes.io/branch: {{ trunc 63 $branch | trimSuffix "-" }}