From 5b0b6d9710a5590a39da92daa728c2e0459215d7 Mon Sep 17 00:00:00 2001 From: Tigran Muradyan Date: Tue, 21 May 2024 15:46:12 +0400 Subject: [PATCH 1/2] fix(DMVP-3604): have options to set ingress default backend --- charts/base/Chart.yaml | 4 ++-- charts/base/README.md | 2 +- charts/base/templates/ingress.yaml | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/base/Chart.yaml b/charts/base/Chart.yaml index f8fd6b3..fbe06f7 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.64 +version: 0.1.65 # 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.64" +appVersion: "0.1.65" diff --git a/charts/base/README.md b/charts/base/README.md index 6375c86..59f9195 100644 --- a/charts/base/README.md +++ b/charts/base/README.md @@ -3,7 +3,7 @@ ``` dependencies: - name: base - version: 0.1.36 + version: 0.1.65 repository: https://dasmeta.github.io/helm ``` diff --git a/charts/base/templates/ingress.yaml b/charts/base/templates/ingress.yaml index 9ef2b63..3b99bf6 100644 --- a/charts/base/templates/ingress.yaml +++ b/charts/base/templates/ingress.yaml @@ -27,6 +27,10 @@ spec: secretName: {{ .secretName }} {{- end }} {{- end }} + {{- if .Values.ingress.defaultBackend }} + defaultBackend: + {{- toYaml .Values.ingress.defaultBackend | nindent 4 }} + {{- end }} rules: {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} From 0b01d55a7bde9a016bb4244a34176ce6c5d5ffb7 Mon Sep 17 00:00:00 2001 From: Tigran Muradyan Date: Tue, 21 May 2024 15:55:26 +0400 Subject: [PATCH 2/2] fix(DMVP-3604): have example how to set default backend --- charts/base/README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/charts/base/README.md b/charts/base/README.md index 59f9195..53f7d2e 100644 --- a/charts/base/README.md +++ b/charts/base/README.md @@ -1,4 +1,4 @@ -# How to +# How to use as dependency, basic example ``` dependencies: @@ -7,6 +7,32 @@ dependencies: repository: https://dasmeta.github.io/helm ``` +# How to set ingress default backend + +```yaml +# file values.yaml +... + +ingress: + enabled: true + class: nginx + annotations: {} + defaultBackend: + service: + name: my-backend-service + port: + number: 80 + hosts: + - host: my-domain.com + paths: + - backend: + serviceName: my-backend-service + servicePort: 80 + path: /* +... +``` + + ```bash $ helm dependency update $ helm install my-app .