59 lines
2.2 KiB
YAML
59 lines
2.2 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
{{- $player := .Values.app.nanabushPlayer -}}
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "hrbox.component" (dict "ctx" . "name" "ingress") }}
|
|
labels:
|
|
{{- include "hrbox.labels" (dict "ctx" . "name" "web") | nindent 4 }}
|
|
annotations:
|
|
kubernetes.io/ingress.class: {{ .Values.ingress.className | quote }}
|
|
nginx.org/websocket-services: {{ include "hrbox.component" (dict "ctx" . "name" "chatbox") | quote }}
|
|
nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.ingress.maxBodySize | quote }}
|
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
|
proxy_set_header X-Forwarded-For "$remote_addr, $server_addr";
|
|
proxy_set_header X-Forwarded-Port $pass_port;
|
|
proxy_set_header X-Forwarded-Proto $pass_access_scheme;
|
|
{{- with .Values.ingress.annotations }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
ingressClassName: {{ .Values.ingress.className | quote }}
|
|
rules:
|
|
- host: {{ .Values.ingress.host | quote }}
|
|
http:
|
|
paths:
|
|
{{- if and $player.ingress.enabled $player.deployment.enabled }}
|
|
- path: {{ include "nanabushPlayer.basePath" . | quote }}
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "nanabushPlayer.serviceName" . }}
|
|
port:
|
|
number: {{ $player.service.port }}
|
|
{{- end }}
|
|
- path: /chatbox/
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "hrbox.component" (dict "ctx" . "name" "chatbox") }}
|
|
port:
|
|
number: 80
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "hrbox.component" (dict "ctx" . "name" "web") }}
|
|
port:
|
|
number: 80
|
|
{{- if .Values.ingress.tls.enabled }}
|
|
tls:
|
|
- hosts:
|
|
- {{ .Values.ingress.host | quote }}
|
|
secretName: {{ .Values.ingress.tls.secretName | quote }}
|
|
{{- end }}
|
|
{{- end }}
|