diff --git a/charts/templates/ingress.yaml b/charts/templates/ingress.yaml new file mode 100644 index 0000000..d731975 --- /dev/null +++ b/charts/templates/ingress.yaml @@ -0,0 +1,26 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }} + {{- with .Values.ingress.annotations }} + annotations: {{ toYaml . | nindent 4 }} + {{- end }} +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: / + pathType: Prefix + backend: + service: + name: {{ .Values.service.name }} + port: + name: http 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