Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tls block to ingress #150

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions helm/flowforge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ If using an external PostgreSQL Database you will need to create the database an
- `forge.domain` the domain instances will be hosted on
- `forge.entryPoint` if the admin app is hosted on a different domain
- `forge.https` is the Forge App accessed via HTTPS (default `true`)
- `forge.tlsSecretName` is the name of the kubernetes secret that holds the HTTPS certificate, it should be a wildcard cert for the `forge.domain` value
- `forge.registry` the container registry to find Project templates (default Docker Hub)
- `forge.dbUsername` (default `forge`)
- `forge.dbPassword` (default `Zai1Wied`)
Expand Down
14 changes: 14 additions & 0 deletions helm/flowforge/templates/broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ metadata:
labels:
app: flowforge-broker
annotations:
{{- if .Values.ingress.annotations }}
{{- toYaml .Values.ingress.annotations | nindent 4 }}
{{- end }}
spec:
{{- if and $.Values.ingress.className (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ $.Values.ingress.className }}
{{- end }}
rules:
- host: mqtt.{{ .Values.forge.domain }}
http:
Expand All @@ -143,6 +149,14 @@ spec:
name: flowforge-broker
port:
number: 1884
{{- if .Values.forge.https }}
tls:
- hosts:
- mqtt.{{ .Values.forge.domain }}
{{- if .Values.forge.tlsSecretName }}
secretName: {{ .Values.forge.tlsSecretName}}
{{- end }}
{{- end }}
# ---
# apiVersion: v1
# kind: Service
Expand Down
9 changes: 9 additions & 0 deletions helm/flowforge/templates/service-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ spec:
name: forge
port:
number: 80
{{- if .Values.forge.https }}
tls:
- hosts:
- {{ .Values.forge.entryPoint }}
{{- if .Values.forge.tlsSecretName }}
secretName: {{ .Values.forge.tlsSecretName }}
{{- end }}
{{- end }}

3 changes: 3 additions & 0 deletions helm/flowforge/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@
},
"branding": {
"type": "object"
},
"tlsSecretName": {
"type": "string"
}
},
"required": [
Expand Down