Skip to content

Commit

Permalink
e2e: configure bridge plugin earlier.
Browse files Browse the repository at this point in the history
When using the bridge plugin, configure it earlier, right after
the basic runtime configuration has been created, before NRI is
enabled or the runtime restarted. This should make it sure that
the node does not linger in a NotReady state causing false test
failures.

Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub authored and askervin committed Sep 20, 2024
1 parent fc0e169 commit d4e965e
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions test/e2e/playbook/provision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,23 @@
regexp: ' *bin_dir *= *"/opt/cni/bin" *'
line: 'bin_dir = "/usr/libexec/cni"'

- name: Configure bridge CNI plugin
when: cni_plugin == "bridge"
block:
- name: Copy CNI bridge plugin configuration
ansible.builtin.copy:
src: "{{ nri_resource_policy_src }}/test/e2e/files/10-bridge.conf.in"
dest: "/etc/cni/net.d/10-bridge.conf"
owner: root
group: root
mode: '0644'

- name: Update CNI bridge plugin configuration
ansible.builtin.replace:
path: /etc/cni/net.d/10-bridge.conf
regexp: '(CNI_NETWORK)'
replace: "{{ network }}"

- name: Setup NRI
ansible.builtin.file:
path: "{{ item }}"
Expand Down Expand Up @@ -426,23 +443,6 @@
- cilium install --wait
- cilium status --wait

- name: Configure bridge CNI plugin
when: cni_plugin == "bridge"
block:
- name: Copy CNI bridge plugin configuration
ansible.builtin.copy:
src: "{{ nri_resource_policy_src }}/test/e2e/files/10-bridge.conf.in"
dest: "/etc/cni/net.d/10-bridge.conf"
owner: root
group: root
mode: '0644'

- name: Update CNI bridge plugin configuration
ansible.builtin.replace:
path: /etc/cni/net.d/10-bridge.conf
regexp: 'CNI_NETWORK'
replace: "{{ network }}"

- name: Generate join command
ansible.builtin.command:
cmd: kubeadm token create --print-join-command
Expand Down

0 comments on commit d4e965e

Please sign in to comment.