Ошибка при добавлении Rules в Ingress: Invalid value: []networking.IngressRule(nil)
При деплое возникает такая ошибка. Это произошло после введения параметра Rules в конфигурационный файл Ingress
Error: release ft1-mc failed, and has been uninstalled due to atomic being set: Ingress.extensions "mc-ingress-ingress" is invalid: spec: Invalid value: []networking.IngressRule(nil): either `backend` or `rules` must be specified
Файл конфигурации.
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: {{ .Values.ingress.name }}-ingress
annotations:
ingress.citrix.com/frontend-ip: "{{ .Values.ingress.frontendIP }}"
ingress.citrix.com/insecure-termination: "{{ .Values.ingress.termination }}"
ingress.citrix.com/insecure-port: "{{ .Values.ingress.insecurePort }}"
kubernetes.io/ingress.class: "vpx"
spec:
rules:
{{- range $key, $rule := .Values.ingress.rules }}
- host: {{ $rule.host }}
http:
paths:
{{- range $rule.paths }}
- path: {{ .path }}
backend:
serviceName: {{ .backend.serviceName }}
servicePort: {{ .backend.servicePort }}
{{- end }}
{{- end -}}
в файле values добавил
ingress:
name: mc-ingress
в файле чарта проекта values добавил
namespace:
ip: &namespace_ip "xxx.xxx.xxx"
host: &namespace_host "companyHost.g4lab.com"
legacy-host: &legacy_host "companyHost.name.dc"
Name: mc
mca:
app:
resources:
limits:
memory: 512Mi
cpu: 500m
requests:
memory: 300Mi
cpu: 300m
ingress:
frontendIP: *namespace_ip
termination: "allow"
insecurePort: "8080"
name: mc-ingress
rules:
- host: *namespace_host
paths:
- backend:
serviceName: mca-service
servicePort: 8500
path: /mca/v1/
- host: *legacy_host
paths:
- backend:
serviceName: mca-service
servicePort: 8500
path: /mca/v1/