Skip to content

Commit

Permalink
add aliases support for ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxpiper committed Nov 1, 2023
1 parent 5e99ee0 commit 606f39c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/platform-api/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
name: ushahidi-platform-api
version: 0.0.1-alpha.23
version: 0.0.1-alpha.24
icon: https://github.ushahidi.org/helm-charts/icon.png
12 changes: 12 additions & 0 deletions charts/platform-api/templates/api-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,18 @@ spec:
backend:
serviceName: api
servicePort: http
{{- if .Values.api.ingress.aliases -}}
{{- range .Values.api.ingress.aliases }}
- host: {{ . | quote }}
http:
paths:
- path: /
backend:
serviceName: client
servicePort: http
{{- end -}}
{{- end -}}

{{- if .Values.api.ingress.tls }}
tls:
{{ toYaml .Values.api.ingress.tls | indent 4 }}
Expand Down
8 changes: 5 additions & 3 deletions charts/platform-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ config:
# name:
# key:

# sentry:
# dsn:
# # environment:
sentry:
dsn:
# environment:

##
## Additional settings provided in .env file, note that this only works for
Expand Down Expand Up @@ -149,6 +149,8 @@ api:
# hosts:
# - domain.example.com
host: # domain.example.com
# aliases:
# -

worker:
replicas: 1
Expand Down
2 changes: 1 addition & 1 deletion charts/platform-client/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
name: ushahidi-platform-client
version: 0.0.1-alpha.11
version: 0.0.1-alpha.12
icon: https://github.ushahidi.org/helm-charts/icon.png
13 changes: 13 additions & 0 deletions charts/platform-client/templates/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ spec:
backend:
serviceName: client
servicePort: http

{{- if .Values.ingress.aliases -}}
{{- range .Values.ingress.aliases }}
- host: {{ . | quote }}
http:
paths:
- path: /
backend:
serviceName: client
servicePort: http
{{- end -}}
{{- end -}}

{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/platform-client/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ ingress:
# hosts:
# - domain.example.com
host: # domain.example.com
# aliases:
# -

image:
repository: ushahidi
Expand Down

0 comments on commit 606f39c

Please sign in to comment.