Auto-Devops TLS Hosts Invalid value
Summary
Without any changes to our pipeline setup (still using Auto-devops with the same configurations), the pipeline now fails with the following error message:
+ helm upgrade --install --wait --set ...
UPGRADE FAILED
ROLLING BACK
Error: Ingress.extensions "production-auto-deploy" is invalid: spec.tls[1].hosts: Invalid value: "": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
Error: UPGRADE FAILED: Ingress.extensions "production-auto-deploy" is invalid: spec.tls[1].hosts: Invalid value: "": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
I found a similar issue when the base domain is empty (#59546 (closed)), but then also spec.rules[0].host was invalid.
In this case, the base domain is set, everything works fine in review and staging, only for production deployment it does have an empty tls host.
I checked the current spec deployed on production and the ingress.yaml shows me:
spec:
rules:
- host: example-address.de
http:
paths:
- backend:
serviceName: production-auto-deploy
servicePort: 5000
path: /
- host: le.example-address.de
http:
paths:
- backend:
serviceName: production-auto-deploy
servicePort: 5000
path: /
tls:
- hosts:
- le.example-address.de
- api.example-address.de
secretName: production-auto-deploy-tls
In this log the actual domain setup in CI/CD->Kubernetes->Base domain is swapped to example-address.de
Steps to reproduce
Unclear how it is produced. Cert-Manager and Prometheus is installed and running on GKE Kubernetes with version 1.12.7-gke.24.
Example Project
What is the current bug behavior?
Deploy fails in production.
What is the expected correct behavior?
Successful deployment.
Output of checks
This bug happens on GitLab.com (Silver Plan)