Skip to content

Commit

Permalink
charts: add ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
ushitora-anqou committed Sep 14, 2024
1 parent fe84b3f commit 140c2bb
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
29 changes: 29 additions & 0 deletions charts/magout/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
6 changes: 6 additions & 0 deletions charts/magout/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,9 @@ gateway:
service:
type: ClusterIP
port: 80

ingress:
enabled: false
annotations: {}
tls:
enabled: false

0 comments on commit 140c2bb

Please sign in to comment.