Description
What happened?
Hi,
When upgrading from v2.27.0 -> v2.28.0 I've encountered an error when Ansible is applying rendered templates to Kube-API at the Apps phase.
I've traced it back to these files:
kubespray/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/ds-ingress-nginx-controller.yml.j2
kubespray/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/svc-ingress-nginx.yml.j2
After unquoting ports:
"{{ port | int }}" -> {{ port | int }}
The issue went away.
What did you expect to happen?
For upgrade to go through
How can we reproduce it (as minimally and precisely as possible)?
Use kubespray docker image with v2.28.0 tag
Run ansible-playbook -i /inventory/.... -b cluster.yml --tags=ingress-nginx
With this value changed to:
ingress_nginx_configmap_tcp_services:
9000: "default/example-go:8080"
OS
RHEL 9
Version of Ansible
ansible [core 2.16.14]
config file = /kubespray/ansible.cfg
configured module search path = ['/kubespray/library']
ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0] (/usr/bin/python3)
jinja version = 3.1.6
libyaml = True
Version of Python
Python 3.10.12
Version of Kubespray (commit)
Network plugin used
calico
Full inventory with variables
Irrelevant,
Command used to invoke ansible
ansible-playbook -i /inventory/.... -b cluster.yml --tags=apps
Output of ansible run
Don't have at hand
Anything else we need to know
No response