Skip to content

Commit f82cf6b

Browse files
committed
feat: update backend service name and port handling for compatibility with newer Kubernetes versions
1 parent 7cee057 commit f82cf6b

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

charts/evolution/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.4
18+
version: 1.0.5
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/evolution/templates/ingress.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ spec:
4949
backend:
5050
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
5151
service:
52-
name: {{ $fullName }}
52+
# Use .backend.service.name if defined, otherwise fallback to $fullName
53+
name: {{ default $fullName .backend.service.name }}
5354
port:
54-
number: {{ $svcPort }}
55+
number: {{ default (int $svcPort) (int .backend.service.port.number) }}
5556
{{- else }}
56-
serviceName: {{ $fullName }}
57-
servicePort: {{ $svcPort }}
57+
serviceName: {{ default $fullName .backend.service.name }}
58+
servicePort: {{ default (int $svcPort) (int .backend.service.port.number) }}
5859
{{- end }}
5960
{{- end }}
6061
{{- end }}

0 commit comments

Comments
 (0)