-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the invalid kube vip manifest #8831
Fix the invalid kube vip manifest #8831
Conversation
Hi @yankay. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yankay , thanks for the fix! It would make sense to add kube-vip to one of the CI jobs (like https://github.com/kubernetes-sigs/kubespray/blob/master/tests/files/packet_centos7-flannel-addons-ha.yml) to make sure we test this part of the code.
/ok-to-test |
@yankay I saw you have submitted a PR. But I discovered another issue that I ran into last night built in same kube-vip.yml file. The Jinja2 template for vip_interface container a quote that results in double-quoted string
|
Thanks,I would fix it in this PR at https://github.com/kubernetes-sigs/kubespray/pull/8831/files#diff-cc0a0aeba170366b6f4a94689aefbad605f05a42f39e67448ed093a795e0d6a1L19. |
5195cde
to
be0bfea
Compare
…ubespray into fix-invalid-kube-vip-manifest
be0bfea
to
4593c6b
Compare
/cc @sathieu |
@oomichi: GitHub didn't allow me to request PR reviews from the following users: sathieu. Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: oomichi, yankay The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
thanks for those fixes, and sorry for the error. I probably pushed the wrong commit, because it's working in my setup. |
Thanks for doing this @yankay /lgtm |
Indeed, here was my local diff: diff --git a/roles/kubernetes/node/templates/manifests/kube-vip.manifest.j2 b/roles/kubernetes/node/templates/manifests/kube-vip.manifest.j2
index 16246156..f23559dc 100644
--- a/roles/kubernetes/node/templates/manifests/kube-vip.manifest.j2
+++ b/roles/kubernetes/node/templates/manifests/kube-vip.manifest.j2
@@ -14,31 +14,31 @@ spec:
value: {{ kube_vip_arp_enabled | string | to_json }}
- name: port
value: "6443"
- {% if kube_vip_interface %}
+ {% if kube_vip_interface -%}
- name: vip_interface
value: "{{ kube_vip_interface | string | to_json }}"
- {% endif %}
- {% if kube_vip_services_interface %}
+ {% endif -%}
+ {% if kube_vip_services_interface -%}
- name: vip_servicesinterface
value: {{ kube_vip_services_interface | string | to_json }}
- {% endif %}
- {% if kube_vip_cidr %}
+ {% endif -%}
+ {% if kube_vip_cidr -%}
- name: vip_cidr
value: {{ kube_vip_cidr | string | to_json }}
- {% endif %}
- {% if kube_vip_controlplane_enabled %}
+ {% endif -%}
+ {% if kube_vip_controlplane_enabled -%}
- name: cp_enable
value: "true"
- name: cp_namespace
value: kube-system
- name: vip_ddns
value: {{ kube_vip_ddns_enabled | string | to_json }}
- {% endif %}
- {% if kube_vip_services_enabled %}
+ {% endif -%}
+ {% if kube_vip_services_enabled -%}
- name: svc_enable
value: "true"
- {% endif %}
- {% if kube_vip_leader_election_enabled %}
+ {% endif -%}
+ {% if kube_vip_leader_election_enabled -%}
- name: vip_leaderelection
value: "true"
- name: vip_leaseduration
@@ -47,8 +47,8 @@ spec:
value: "3"
- name: vip_retryperiod
value: "1"
- {% endif %}
- {% if kube_vip_bgp_enabled %}
+ {% endif -%}
+ {% if kube_vip_bgp_enabled -%}
- name: bgp_enable
value: "true"
- name: bgp_routerid
@@ -61,11 +61,11 @@ spec:
value: {{ kube_vip_bgp_peerpass | to_json }}
- name: bgp_peeras
value: {{ kube_vip_bgp_peeras | to_json }}
- {% if kube_vip_bgppeers %}
+ {% if kube_vip_bgppeers -%}
- name: bgp_peers
value: {{ kube_vip_bgp_peeras | join(',') | to_json }}
- {% endif %}
- {% endif %}
+ {% endif -%}
+ {% endif -%}
- name: address
value: {{ kube_vip_address | to_json }}
image: {{ kube_vip_image_repo }}:{{ kube_vip_image_tag }} (I had no Again, sorry ... |
* add Feature synchronized time checking * fix-invalid-kube-vip-manifest
* add Feature synchronized time checking * fix-invalid-kube-vip-manifest
What type of PR is this?
/kind bug
What this PR does / why we need it:
the kube-vip.yml generated is wrong, and cannot start by kubelet.
Which issue(s) this PR fixes:
Fixes #8829
Special notes for your reviewer:
Does this PR introduce a user-facing change?: