Skip to content

Commit

Permalink
chore(app/name): truncate application name to 40 chars (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
saidsef authored Nov 30, 2023
1 parent 5d25f4f commit d8ba2eb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions charts/applicationset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/applicationset/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions charts/applicationset/templates/github-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 "-" }}
Expand Down
4 changes: 2 additions & 2 deletions charts/applicationset/templates/gitlab-mr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 "-" }}
Expand Down

0 comments on commit d8ba2eb

Please sign in to comment.