Files

40 lines
1.0 KiB
YAML

---
apiVersion: v1
kind: Service
metadata:
name: {{ include "hyc.fullname" . }}
labels:
{{- include "hyc.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "hyc.selectorLabels" . | nindent 4 }}
{{- if .Values.ingress.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "hyc.fullname" . }}-ingress
labels:
{{- include "hyc.labels" . | nindent 4 }}
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "2G"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
spec:
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls }}
tls:
{{- toYaml .Values.ingress.tls | nindent 4 }}
{{- end }}
rules:
{{- toYaml .Values.ingress.hosts | nindent 4 }}
{{- end }}