Skip to content

bug: Configuring kube-vip flags fails, cannot unmarshal bool into Go struct field #315

@hackaholic

Description

@hackaholic

Summary

Configuring kube-vip flags fails, cannot unmarshal bool into Go struct field

rke2_kubevip_args: []
- param: lb_enable
   value: true
- param: lb_port
   value: 6443

Below error:
this error from rke2-server

level=error msg="Failed to process config: failed to process /var/lib/rancher/rke2/server/manifests/kube-vip.yml: failed to create kube-system/kube-vip-ds apps/v1, Kind=DaemonSet for kube-system/kube-vip: DaemonSet in version "v1" cannot be handled as a DaemonSet: json: cannot unmarshal bool into Go struct field EnvVar.spec.template.spec.containers.env.value of type string"

Issue Type

Bug Report

Ansible Version

ansible [core 2.17.8]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/parallel/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/parallel/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.12 (main, Feb  4 2025, 14:57:36) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

Steps to Reproduce

Configure kube-vip and pass extra parameter to kube-vip

rke2_kubevip_args: []
- param: lb_enable
   value: true
- param: lb_port
   value: 6443

Expected Results

The kube-vip.yml.j2 should render correctly.

Actual Results

The kube-vip.yml.j2 should render correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions