Skip to content

Commit

Permalink
Support external ingress configuration (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino authored Nov 15, 2023
1 parent dde2348 commit 5d0e340
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plural/helm/console/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: console
description: A chart for plural console
appVersion: 0.6.5
version: 0.7.90
appVersion: 0.6.6
version: 0.7.91
dependencies:
- name: test-base
version: 0.1.10
Expand Down
4 changes: 4 additions & 0 deletions plural/helm/console/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ spec: {{ .Values.secrets.config | toYaml | nindent 2 }}
{{- define "console.env" -}}
- name: HOST
value: {{ .Values.ingress.console_dns }}
{{- if .Values.externalIngress.hostname }}
- name: EXT_HOST
value: {{ .Values.externalIngress.hostname | quote }}
{{- end }}
- name: DEPLOYED_AT
value: {{ now | unixEpoch | quote }}
- name: NAMESPACE
Expand Down
30 changes: 30 additions & 0 deletions plural/helm/console/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,33 @@ spec:
name: console
port:
name: http
{{ if .Values.externalIngress.hostname }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: console-external
labels:
{{ include "console.labels" . | indent 4 }}
{{- with .Values.externalIngress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.externalIngress.ingressClass }}
tls:
- hosts:
- {{ .Values.externalIngress.hostname | quote }}
secretName: console-external-tls
rules:
- host: {{ .Values.externalIngress.hostname | quote }}
http:
paths:
- path: /ext
pathType: Prefix
backend:
service:
name: console
port:
name: http
{{ end }}
11 changes: 11 additions & 0 deletions plural/helm/console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ ingress:
nginx.ingress.kubernetes.io/proxy-send-timeout: '3600'
nginx.ingress.kubernetes.io/session-cookie-path: /socket

externalIngress:
ingressClass: nginx
annotations:
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/affinity: cookie
nginx.ingress.kubernetes.io/force-ssl-redirect: 'true'
nginx.ingress.kubernetes.io/proxy-read-timeout: '3600'
nginx.ingress.kubernetes.io/proxy-send-timeout: '3600'
nginx.ingress.kubernetes.io/session-cookie-path: /ext/socket

postgres:
resources: {}
replicas: 1
Expand Down

0 comments on commit 5d0e340

Please sign in to comment.