Skip to content

Commit

Permalink
Merge pull request #185 from IFRCGo/feature/configurable-ingressclass…
Browse files Browse the repository at this point in the history
…name

make ingressClassName configurable in helm chart
  • Loading branch information
thenav56 authored Dec 5, 2024
2 parents eb6ed71 + 70155d3 commit 9427a6f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nginx-serve/helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
environment: {{ .Values.environment }}
release: {{ .Release.Name }}
spec:
ingressClassName: nginx
ingressClassName: {{ required "ingress.className" .Values.ingress.className | quote }}
rules:
- host: {{ required "ingress.host" .Values.ingress.host | quote }}
http:
Expand All @@ -19,3 +19,9 @@ spec:
name: {{ template "ifrcgo-web-app.fullname" . }}-svc
port:
number: 80
{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
- {{ .Values.ingress.host | quote }}
secretName: {{ required "ingress.tls.secretName" .Values.ingress.tls.secretName }}
{{- end }}
4 changes: 4 additions & 0 deletions nginx-serve/helm/values-production.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# NOTE: go-deploy can override or add additional configs https://github.com/IFRCGo/go-deploy
environment: production

ingress:
tls:
enabled: true

env:
APP_ENVIRONMENT: production
APP_MAPBOX_ACCESS_TOKEN: pk.eyJ1IjoiZ28taWZyYyIsImEiOiJjams3b2ZhZWswMGFvM3hxeHp2ZHFhOTRrIn0._pqO9OQ2iNeDGrpopJNjpg
Expand Down
4 changes: 4 additions & 0 deletions nginx-serve/helm/values-staging.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# NOTE: go-deploy can override or add additional configs https://github.com/IFRCGo/go-deploy
environment: staging

ingress:
tls:
enabled: true

env:
APP_ENVIRONMENT: staging
APP_MAPBOX_ACCESS_TOKEN: pk.eyJ1IjoiZ28taWZyYyIsImEiOiJjams3b2ZhZWswMGFvM3hxeHp2ZHFhOTRrIn0._pqO9OQ2iNeDGrpopJNjpg
Expand Down
1 change: 1 addition & 0 deletions nginx-serve/helm/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ image:

ingress:
host: alert-hub-1.ifrc-go.org
className: nginx

env:
APP_TITLE: "Alert hub"
Expand Down
4 changes: 4 additions & 0 deletions nginx-serve/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ resources:

ingress:
host:
className:
tls:
enabled: false
secretName:

env:
APP_TITLE: "Alert hub"
Expand Down

0 comments on commit 9427a6f

Please sign in to comment.