Skip to content

Commit

Permalink
Merge pull request #102 from dasmeta/DMVP-3604-ability-to-set-ingress…
Browse files Browse the repository at this point in the history
…-default-backend

fix(DMVP-3604): have options to set ingress default backend
  • Loading branch information
mrdntgrn authored May 21, 2024
2 parents 305ef1f + 0b01d55 commit 3e12941
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/base/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
30 changes: 28 additions & 2 deletions charts/base/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
# How to
# How to use as dependency, basic example

```
dependencies:
- name: base
version: 0.1.36
version: 0.1.65
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 .
Expand Down
4 changes: 4 additions & 0 deletions charts/base/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 3e12941

Please sign in to comment.