feat(helm): added helm chart for movienight
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
{{- if .Values.gateway.enabled }}
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: {{ include "movienight.gatewayName" . }}
|
||||
labels:
|
||||
{{- include "movienight.componentLabels" (dict "root" . "component" "gateway") | nindent 4 }}
|
||||
{{- with .Values.gateway.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.global.annotations .Values.gateway.annotations }}
|
||||
annotations:
|
||||
{{- with .Values.global.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.gateway.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
gatewayClassName: {{ required "gateway.className is required when gateway.enabled=true" .Values.gateway.className | quote }}
|
||||
listeners:
|
||||
{{- if .Values.gateway.http.enabled }}
|
||||
- name: http
|
||||
protocol: HTTP
|
||||
port: {{ .Values.gateway.http.port }}
|
||||
{{- if .Values.gateway.listenerHostname }}
|
||||
hostname: {{ .Values.gateway.listenerHostname | quote }}
|
||||
{{- end }}
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: Same
|
||||
{{- end }}
|
||||
{{- if .Values.gateway.https.enabled }}
|
||||
- name: https
|
||||
protocol: HTTPS
|
||||
port: {{ .Values.gateway.https.port }}
|
||||
{{- if .Values.gateway.listenerHostname }}
|
||||
hostname: {{ .Values.gateway.listenerHostname | quote }}
|
||||
{{- end }}
|
||||
tls:
|
||||
mode: Terminate
|
||||
certificateRefs:
|
||||
- kind: Secret
|
||||
name: {{ required "gateway.https.secretName is required when gateway.https.enabled=true" .Values.gateway.https.secretName }}
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: Same
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{- if and .Values.routes.enabled .Values.gateway.enabled }}
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: {{ include "movienight.fullname" . }}
|
||||
labels:
|
||||
{{- include "movienight.componentLabels" (dict "root" . "component" "route") | nindent 4 }}
|
||||
{{- with .Values.global.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: {{ include "movienight.gatewayName" . }}
|
||||
{{- if .Values.gateway.hostnames }}
|
||||
hostnames:
|
||||
{{- toYaml .Values.gateway.hostnames | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if and .Values.routes.backend.enabled .Values.backend.enabled }}
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: {{ .Values.routes.backend.pathPrefix | quote }}
|
||||
backendRefs:
|
||||
- name: {{ include "movienight.fullname" . }}-backend
|
||||
port: {{ .Values.backend.service.port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user