Skip to content

Commit

Permalink
removing trailing hypen
Browse files Browse the repository at this point in the history
  • Loading branch information
Timtech4u committed Oct 19, 2023
1 parent 5dd3625 commit 6c4562a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ spec:
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ if $.Values.ingress.multipleServices }}{{ $fullName }}-{{ .path | trimPrefix "/" | replace "/" "-" | lower | trimSuffix "-" | trimPrefix "-" }}{{ else }}{{ $fullName }}{{ end }}
name: {{ if $.Values.ingress.multipleServices }}{{ $fullName }}{{ .path | trimPrefix "/" | replace "/" "-" | lower | trimSuffix "-" | trimPrefix "-" }}{{ else }}{{ $fullName }}{{ end }}
port:
{{- if $servicePortName }}
name: {{ $servicePortName }}
{{- else }}
number: {{ (index $svcPort 0).port }}
{{- end }}
{{- else }}
serviceName: {{ if $.Values.ingress.multipleServices }}{{ $fullName }}-{{ .path | trimPrefix "/" | replace "/" "-" | lower | trimSuffix "-" | trimPrefix "-" }}{{ else }}{{ $fullName }}{{ end }}
serviceName: {{ if $.Values.ingress.multipleServices }}{{ $fullName }}{{ .path | trimPrefix "/" | replace "/" "-" | lower | trimSuffix "-" | trimPrefix "-" }}{{ else }}{{ $fullName }}{{ end }}
servicePort: {{ (index $svcPort 0).port }}
{{- end }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "microservice.fullname" $ }}-{{ .path | trimPrefix "/" | replace "/" "-" | lower | trimSuffix "-" | trimPrefix "-" }}
name: {{ include "microservice.fullname" $ }}{{ .path | trimPrefix "/" | replace "/" "-" | lower | trimSuffix "-" | trimPrefix "-" }}
labels:
{{- include "microservice.labels" $ | nindent 4 }}
spec:
Expand Down

0 comments on commit 6c4562a

Please sign in to comment.