From e6f935541adac0a34499924fecfc1b2de5873838 Mon Sep 17 00:00:00 2001 From: viktoryathegreat Date: Wed, 9 Feb 2022 17:23:01 +0400 Subject: [PATCH 1/2] Configured ingress hosts service name and port values. --- charts/base/templates/ingress.yaml | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/charts/base/templates/ingress.yaml b/charts/base/templates/ingress.yaml index 6ade1d0..b099a2a 100644 --- a/charts/base/templates/ingress.yaml +++ b/charts/base/templates/ingress.yaml @@ -38,20 +38,58 @@ spec: - path: {{ .path }} {{- if semverCompare ">=1.19" $kubeVersion }} pathType: Prefix # TODO: maybe needed to have this set dynamically + {{- if .backend }} backend: service: + {{- if .backend.service.name }} + name: + {{- toYaml .backend.service.name | quote | nindent 16 }} + {{ else }} name: {{- toYaml $fullName | nindent 18 }} + {{- end }} + {{- if .backend.service.port.number }} port: + number: + {{- toYaml .backend.service.port.number | nindent 16 }} + {{ else }} number: {{- toYaml $svcPort | nindent 20 }} + {{- end }} + {{ else }} + backend: + service: + name: + {{- toYaml $fullName | quote | nindent 16 }} + port: + number: + {{- toYaml $svcPort | nindent 16 }} + {{- end }} {{ else }} + {{- if .backend }} + backend: + {{- if .backend.serviceName }} + serviceName: + {{- toYaml .backend.serviceName | quote | nindent 16 }} + {{- else }} + serviceName: + {{- toYaml $fullName | quote | nindent 16 }} + {{- end }} + {{- if .backend.servicePort }} + servicePort: + {{- toYaml .backend.servicePort | nindent 16 }} + {{- else }} + servicePort: + {{- toYaml $svcPort | nindent 20 }} + {{- end }} + {{- else }} backend: serviceName: {{- toYaml $fullName | quote | nindent 16 }} servicePort: {{- toYaml $svcPort | nindent 16 }} {{- end }} + {{- end }} {{- end }} {{- end }} {{- end }} From 05ecfad7190aec8c4a43646941d833cb415d1536 Mon Sep 17 00:00:00 2001 From: viktoryathegreat Date: Wed, 9 Feb 2022 17:39:19 +0400 Subject: [PATCH 2/2] Chart version. --- charts/base/Chart.yaml | 4 ++-- charts/base/README.md | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/base/Chart.yaml b/charts/base/Chart.yaml index 5b72789..6a83378 100644 --- a/charts/base/Chart.yaml +++ b/charts/base/Chart.yaml @@ -15,10 +15,10 @@ 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: 0.1.17 +version: 0.1.18 # 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 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.1.17" +appVersion: "0.1.18" diff --git a/charts/base/README.md b/charts/base/README.md index 412d282..bce741a 100644 --- a/charts/base/README.md +++ b/charts/base/README.md @@ -1,7 +1,7 @@ ``` dependencies: - name: base - version: 0.1.17 + version: 0.1.18 repository: https://dasmeta.github.io/helm ``` @@ -94,9 +94,9 @@ Here are 2 examples about this: **Alias is not specified, name, version and appVersion are not overridden by parent chart** In this case, labels will be like this:** -- `helm.sh/chart: base-0.1.17` +- `helm.sh/chart: base-0.1.18` - `app.kubernetes.io/name: base` -- `app.kubernetes.io/version: 0.1.17` +- `app.kubernetes.io/version: 0.1.18` Chart.yaml ``` @@ -109,7 +109,7 @@ appVersion: "0.1.0" dependencies: - name: base - version: 0.1.17 + version: 0.1.18 repository: https://dasmeta.github.io/helm ``` @@ -145,7 +145,7 @@ appVersion: "0.1.0" dependencies: - name: base - version: 0.1.17 + version: 0.1.18 repository: https://dasmeta.github.io/helm alias: my-app-base ``` @@ -173,7 +173,7 @@ appVersion: "0.1.0" dependencies: - name: base - version: 0.1.17 + version: 0.1.18 repository: https://dasmeta.github.io/helm ```