From 885d2497f0381cff379b9144f35af70d3c1dfea5 Mon Sep 17 00:00:00 2001 From: Jake Hutchinson Date: Fri, 12 Jul 2024 16:50:23 +0100 Subject: [PATCH] Ingress --- charts/templates/ingress.yaml | 25 +++++++++++++++++++++++++ charts/values.yaml | 19 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 charts/templates/ingress.yaml diff --git a/charts/templates/ingress.yaml b/charts/templates/ingress.yaml new file mode 100644 index 0000000..de9bb65 --- /dev/null +++ b/charts/templates/ingress.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }} + annotations: + {{ .Values.ingress.annotations | nindent 4 }} +spec: + ingressClassName: {{ .Values.ingress.className }} + {{- if .Values.ingress.tls.enabled }} + tls: + - hosts: + - {{ .Values.ingress.host }} + secretName: {{ .Values.ingress.tls.secretName }} + {{- end }} + rules: + - host: {{ .Values.ingress.host }} + http: + paths: + - path: {{ .Values.ingress.path }} + pathType: Prefix + backend: + service: + name: {{ .Values.service.name }} + port: + name: dynamic diff --git a/charts/values.yaml b/charts/values.yaml index 9b3756d..ebe5107 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -67,6 +67,24 @@ securityContext: drop: [ALL] readOnlyRootFilesystem: true +ingress: + # The hostname to use for the portal + host: + # The path for the coral credits API + path: + # The ingress class to use + className: nginx + # Annotations for the portal ingress + annotations: {} + # TLS configuration for the portal ingress + tls: + # Indicates if TLS should be enabled + enabled: true + # The secret to use for the TLS certificate and key + secretName: + # TLS-specific ingress annotations, e.g. for cert-manager configuration + annotations: {} + # Django settings settings: # The Django secret key @@ -98,6 +116,7 @@ replicaCount: 1 # Service details for the api service: + name: coral-credits type: ClusterIP port: 8080