{{- if .Values.ingress.enabled }} {{- if not .Values.ingress.host }} {{- fail "ingress.host is required when ingress.enabled is true" }} {{- end }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "ai-git-bot.fullname" . }} labels: {{- include "ai-git-bot.labels" . | nindent 4 }} {{- include "ai-git-bot.selectorLabels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: ingressClassName: {{ .Values.ingress.className }} rules: - host: {{ .Values.ingress.host }} http: paths: - path: / pathType: Prefix backend: service: name: {{ include "ai-git-bot.fullname" . }} port: name: http tls: - secretName: {{ .Values.ingress.tlsSecretName }} hosts: - {{ .Values.ingress.host }} {{- end }}