From 6e480acf683841e42b0585d2f3c9616fcce369f7 Mon Sep 17 00:00:00 2001 From: Said Sef Date: Thu, 30 Nov 2023 10:55:13 +0000 Subject: [PATCH] chore(service/name): Refactored to remove redundant code --- charts/applicationset/Chart.yaml | 4 ++-- charts/applicationset/README.md | 2 +- charts/applicationset/templates/github-pr.yml | 3 +-- charts/applicationset/templates/gitlab-mr.yml | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/charts/applicationset/Chart.yaml b/charts/applicationset/Chart.yaml index a45ff0b..441bd5f 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.2" +version: &version "0.12.3" 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 40 chars and trim suffix + description: Refactored to remove redundant code 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 95bd8b5..d21205a 100644 --- a/charts/applicationset/README.md +++ b/charts/applicationset/README.md @@ -1,6 +1,6 @@ # argocd-applicationsets-services -![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) +![Version: 0.12.3](https://img.shields.io/badge/Version-0.12.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.12.3](https://img.shields.io/badge/AppVersion-0.12.3-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 7990756..1a7a127 100644 --- a/charts/applicationset/templates/github-pr.yml +++ b/charts/applicationset/templates/github-pr.yml @@ -49,8 +49,7 @@ spec: requeueAfterSeconds: {{ $refresh | default 500 }} template: metadata: - {{- $localName := printf "pr-%sbranch_slug%s-%snumber%s-%s" $dqf $dqb $dqf $dqb $name }} - name: {{ trunc 45 $localName | trimSuffix "-" }} + name: {{ printf "pr-%sbranch_slug%s-%snumber%s-%s" $dqf $dqb $dqf $dqb $name | trunc 50 | 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 bfe0b10..8ca4d4b 100644 --- a/charts/applicationset/templates/gitlab-mr.yml +++ b/charts/applicationset/templates/gitlab-mr.yml @@ -48,8 +48,7 @@ spec: requeueAfterSeconds: {{ $refresh | default 500 }} template: metadata: - {{- $localName := printf "mr-%sbranch_slug%s-%snumber%s-%s" $dqf $dqb $dqf $dqb $name }} - name: {{ trunc 45 $localName | trimSuffix "-" }} + name: {{ printf "mr-%sbranch_slug%s-%snumber%s-%s" $dqf $dqb $dqf $dqb $name | trunc 50 | trimSuffix "-" }} labels: app.kubernetes.io/name: {{ $repo.name }} app.kubernetes.io/branch: {{ trunc 63 $branch | trimSuffix "-" }}