From 140c2bb158bc39a0c20c81344fd54479706f1f46 Mon Sep 17 00:00:00 2001 From: Ushitora Anqou Date: Sat, 14 Sep 2024 21:46:12 +0900 Subject: [PATCH] charts: add ingress --- charts/magout/templates/ingress.yaml | 29 ++++++++++++++++++++++++++++ charts/magout/values.yaml | 6 ++++++ 2 files changed, 35 insertions(+) create mode 100644 charts/magout/templates/ingress.yaml diff --git a/charts/magout/templates/ingress.yaml b/charts/magout/templates/ingress.yaml new file mode 100644 index 0000000..a0ce802 --- /dev/null +++ b/charts/magout/templates/ingress.yaml @@ -0,0 +1,29 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "magout.fullname" . }} + namespace: {{ .Release.Namespace }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + rules: + - host: {{ .Values.serverName }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ include "magout.fullname" . }}-gateway + port: + number: {{ .Values.gateway.service.port }} + {{- if .Values.ingress.tls.enabled }} + tls: + - hosts: + - {{ .Values.serverName }} + secretName: magout-server-tls + {{- end }} +{{- end }} diff --git a/charts/magout/values.yaml b/charts/magout/values.yaml index a0bfd8b..d9b6c00 100644 --- a/charts/magout/values.yaml +++ b/charts/magout/values.yaml @@ -129,3 +129,9 @@ gateway: service: type: ClusterIP port: 80 + +ingress: + enabled: false + annotations: {} + tls: + enabled: false