{{- if .Values.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "phpfpm.fullname" . }} labels: {{- include "phpfpm.labels" . | nindent 4 }} annotations: {{- /* uploadMaxSize を ingress-nginx の proxy-body-size に自動反映(明示指定があればそちらを優先) */}} {{- $ingressAnnotations := merge (deepCopy .Values.ingress.annotations) (dict "nginx.ingress.kubernetes.io/proxy-body-size" .Values.uploadMaxSize) }} {{- toYaml $ingressAnnotations | nindent 4 }} spec: {{- if .Values.ingress.className }} ingressClassName: {{ .Values.ingress.className }} {{- end }} rules: {{- range .Values.ingress.hosts }} - host: {{ .host }} http: paths: {{- range .paths }} - path: {{ .path }} pathType: {{ .pathType }} backend: service: name: {{ include "phpfpm.fullname" $ }} port: number: {{ $.Values.service.port }} {{- end }} {{- end }} {{- if .Values.ingress.tls }} tls: {{- range .Values.ingress.tls }} - secretName: {{ .secretName }} hosts: {{- range .hosts }} - {{ . }} {{- end }} {{- end }} {{- end }} {{- end }}