diff --git a/Chart.yaml b/Chart.yaml index b8b81bb..72b780b 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -23,7 +23,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.1 +version: 1.0.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/README.md b/README.md index 080f312..02992b4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # generic-microservice-helm -![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) +![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) Generic helm chart for Energy Web Foundation microservices diff --git a/templates/ingress.yaml b/templates/ingress.yaml index f21cbce..89e6b94 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -1,6 +1,6 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "microservice.fullname" . -}} -{{- $svcPort := .Values.service.port -}} +{{- $svcPort := .Values.service.ports -}} {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} @@ -49,13 +49,14 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ .backend.service.name }} + {{- range $key, $value := $svcPort }} + name: {{ $fullName }} port: - number: {{ .backend.service.port.number }} - name: {{ .backend.service.port.name }} + number: {{ .port }} {{- else }} - serviceName: {{ .backend.serviceName}} - servicePort: {{ .backend.servicePort }} + serviceName: {{ $fullName }} + servicePort: {{ .port }} + {{- end }} {{- end }} {{- end }} {{- end }} diff --git a/templates/tests/test-connection.yaml b/templates/tests/test-connection.yaml index cfec08b..f2221c9 100644 --- a/templates/tests/test-connection.yaml +++ b/templates/tests/test-connection.yaml @@ -11,5 +11,5 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include "microservice.fullname" . }}:{{ .Values.service.port }}'] + args: ['{{ include "microservice.fullname" . }}:{{ index (index .Values.service.ports 0) "port" }}'] restartPolicy: Never