Skip to content

Commit

Permalink
Merge pull request #190 from epinio/fix_leading_digits
Browse files Browse the repository at this point in the history
Remove leading digits from resource names
  • Loading branch information
Dimitris Karakasilis authored May 9, 2022
2 parents 1c1ba4d + 9469331 commit ed37e6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion chart/application/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: The helm chart for epinio applications to be deployed by
icon: https://raw.githubusercontent.com/epinio/helm-charts/main/assets/epinio.png
home: https://github.com/epinio/epinio
type: application
version: 0.1.16
version: 0.1.17
keywords:
- epinio
- paas
Expand Down
10 changes: 5 additions & 5 deletions chart/application/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ app.kubernetes.io/name: {{ .Values.epinio.appName }}
app.kubernetes.io/component: application
{{- end }}


{{/*
Remove character that are invalid for kubernetes resource names from the
Removes characters that are invalid for kubernetes resource names from the
given string
*/}}
{{- define "epinio-name-sanitize" -}}
Expand All @@ -35,10 +34,11 @@ given string

{{/*
Resource name sanitization and truncation.
Always suffix the sha1sum (40 characters long)
The rest of the character up to 63 is the original string with invalid
- Always suffix the sha1sum (40 characters long)
- Always add an "r" prefix to make sure we don't have leading digits
- The rest of the characters up to 63 are the original string with invalid
character removed.
*/}}
{{- define "epinio-truncate" -}}
{{ print (trunc 22 (include "epinio-name-sanitize" .)) "-" (sha1sum .) }}
{{ print "r" (trunc 21 (include "epinio-name-sanitize" .)) "-" (sha1sum .) }}
{{- end }}
2 changes: 1 addition & 1 deletion chart/epinio/templates/default-app-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ metadata:
spec:
shortDescription: Epinio standard deployment
description: Epinio standard support chart for application deployment
helmChart: https://github.com/epinio/helm-charts/releases/download/epinio-application-0.1.16/epinio-application-0.1.16.tgz
helmChart: https://github.com/epinio/helm-charts/releases/download/epinio-application-0.1.17/epinio-application-0.1.17.tgz

0 comments on commit ed37e6c

Please sign in to comment.