-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional 2nd ingress to allow splitting traffic for public & VPN (#2
) Co-authored-by: Tobias McNulty <[email protected]>
- Loading branch information
1 parent
441f6d3
commit 7fec1e1
Showing
4 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Changelog | ||
|
||
This file documents all notable changes to the ODK Central Helm Chart. | ||
The release numbering uses [semantic versioning](http://semver.org). | ||
|
||
## 0.3.0 | ||
|
||
- Add optional 2nd ingress to allow splitting traffic for public & VPN (#2) | ||
|
||
## 0.2.0 | ||
|
||
- Update redis-ha subchart and enable haproxy (76abe4a48d3eecf0c76c5ad060235cf15a049497) | ||
|
||
## 0.1.3 | ||
|
||
- Fix `ENKETO_URL` and `DOMAIN` environment variables (dc8a34f4aa46a5d3be448385360042bea4216052) | ||
|
||
## 0.1.2 | ||
|
||
- Fix missing Enketo secrets (d2c8a86499f5ab6d234abd8be6c24e545ed96c0c) | ||
|
||
## 0.1.1 | ||
|
||
- Build chart dependencies in CI (3c181959ad18513e9dd7d9f29366d960f67682cb) | ||
- Remove extraneous template files (3a164ff69dc38797fdfb1e29ab408f25a3fdddb0) | ||
|
||
## 0.1.0 | ||
|
||
- Initial release (#1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
charts/odk-central/charts/frontend/templates/ingressApp.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{{- if .Values.ingressApp.enabled -}} | ||
{{- $fullName := include "frontend.fullname" . -}} | ||
{{- $svcPort := .Values.service.port -}} | ||
{{- if and .Values.ingressApp.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} | ||
{{- if not (hasKey .Values.ingressApp.annotations "kubernetes.io/ingress.class") }} | ||
{{- $_ := set .Values.ingressApp.annotations "kubernetes.io/ingress.class" .Values.ingressApp.className}} | ||
{{- end }} | ||
{{- end }} | ||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1 | ||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
{{- else -}} | ||
apiVersion: extensions/v1beta1 | ||
{{- end }} | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }}-app | ||
labels: | ||
{{- include "frontend.labels" . | nindent 4 }} | ||
{{- with .Values.ingressApp.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if and .Values.ingressApp.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} | ||
ingressClassName: {{ .Values.ingressApp.className }} | ||
{{- end }} | ||
{{- if .Values.ingressApp.tls }} | ||
tls: | ||
{{- range .Values.ingressApp.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.ingressApp.hosts }} | ||
- host: {{ .host | quote }} | ||
http: | ||
paths: | ||
{{- range .paths }} | ||
- path: {{ .path }} | ||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} | ||
pathType: {{ .pathType }} | ||
{{- end }} | ||
backend: | ||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} | ||
service: | ||
name: {{ $fullName }} | ||
port: | ||
number: {{ $svcPort }} | ||
{{- else }} | ||
serviceName: {{ $fullName }} | ||
servicePort: {{ $svcPort }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |