diff --git a/test/e2e/files/cilium-install.sh b/test/e2e/files/cilium-install.sh deleted file mode 100755 index d12b972ac..000000000 --- a/test/e2e/files/cilium-install.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -timeout=30s -max_retries=5 -count=0 - -ready=$(cilium status -o json --wait --wait-duration $timeout | jq .pod_state.cilium.Ready) -if [ $ready -eq 1 ]; then - echo "Cilium already installed and ready." - exit 0 -fi - -while [ $count -lt $max_retries ]; -do - cilium install - if [ $? -ne 0 ]; then - cilium uninstall - sleep 5 - count=$(($count + 1)) - continue - fi - - ready=$(cilium status -o json --wait --wait-duration $timeout | jq .pod_state.cilium.Ready) - if [ $ready -eq 1 ]; then - break - fi - - echo "Cilium ready timeout, retrying" - count=$(($count + 1)) - - cilium uninstall -done - -if [ $ready -ne 1 ]; then - exit 1 -fi - -exit 0 diff --git a/test/e2e/playbook/provision.yaml b/test/e2e/playbook/provision.yaml index 9132f3cbf..4889b63c2 100644 --- a/test/e2e/playbook/provision.yaml +++ b/test/e2e/playbook/provision.yaml @@ -312,21 +312,17 @@ - kubectl taint nodes --all node-role.kubernetes.io/control-plane- || true - kubectl taint nodes --all node-role.kubernetes.io/master- || true - - name: copy cilium install script - copy: - src: "{{ nri_resource_policy_src }}/test/e2e/files/cilium-install.sh" - dest: /usr/local/bin/cilium-install.sh - owner: root - group: root - mode: '0755' + - block: + - name: Fetch and extract cilium (installer) release tarball + ansible.builtin.unarchive: + src: "https://github.com/cilium/cilium-cli/releases/latest/download/cilium-linux-amd64.tar.gz" + dest: /usr/local/bin + remote_src: yes - - name: Install cilium cni - command: "{{ item }}" - with_items: - - curl -L --remote-name-all https://github.com/cilium/cilium-cli/releases/latest/download/cilium-linux-amd64.tar.gz - - tar xzvfC cilium-linux-amd64.tar.gz /usr/local/bin - - cilium-install.sh - - rm -f cilium-linux-amd64.tar.gz + - name: Run cilium installer + ansible.builtin.shell: + cmd: cilium install --wait + when: cni_plugin == "cilium" - block: - name: Copy CNI bridge plugin configuration