Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/playbooks/roles/install-csi-cinder/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@

- name: Fetch kubernetes-test-linux-amd64.tar.gz
unarchive:
src: "https://dl.k8s.io/{{ e2e_test_version }}/kubernetes-test-linux-amd64.tar.gz"
src: "https://dl.k8s.io/{{ k8s_release }}/kubernetes-test-linux-amd64.tar.gz"
dest: /tmp/
remote_src: true
extra_opts:
Expand Down
1 change: 0 additions & 1 deletion tests/playbooks/roles/install-k3s/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
k3s_release: v1.34.1+k3s1
worker_node_count: 1
cluster_token: "K1039d1cf76d1f8b0e8b0d48e7c60d9c4a43c2e7a56de5d86f346f2288a2677f1d7::server:2acba4e60918c0e2d1f1d1a7c4e81e7b"
devstack_workdir: "{{ ansible_user_dir }}/devstack"
Expand Down
33 changes: 7 additions & 26 deletions tests/playbooks/roles/install-k3s/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
set_fact:
k3s_fip: "{{ fip.stdout }}"

- name: Set k3s release
set_fact:
k3s_release: "{{ k8s_release }}.k3s1"

- name: Run k3s master
shell:
executable: /bin/bash
Expand Down Expand Up @@ -154,39 +158,16 @@
retries: 100
delay: 5

- name: Prepare kubeconfig file
- name: Prepare kubectl and kubeconfig file
shell:
executable: /bin/bash
cmd: |
set -ex

mkdir -p {{ ansible_user_dir }}/.kube
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ ansible_user_dir }}/.ssh/id_rsa ubuntu@{{ k3s_fip }}:/etc/rancher/k3s/k3s.yaml {{ ansible_user_dir }}/.kube/config

- name: Get latest kubectl version
uri:
url: https://dl.k8s.io/release/stable.txt
return_content: yes
register: kubectl_version
retries: 5
delay: 10
until: kubectl_version.status == 200

- name: Download kubectl binary
get_url:
url: "https://dl.k8s.io/release/{{ kubectl_version.content | trim }}/bin/linux/amd64/kubectl"
dest: /usr/local/bin/kubectl
mode: '0755'
become: true
retries: 5
delay: 10

- name: Set kubectl cluster config
shell:
executable: /bin/bash
cmd: |
set -ex

curl -sLO# https://dl.k8s.io/release/{{ k8s_release }}/bin/linux/amd64/kubectl
chmod +x ./kubectl; sudo mv ./kubectl /usr/local/bin/kubectl
kubectl config set-cluster default --server=https://{{ k3s_fip }}:6443 --kubeconfig {{ ansible_user_dir }}/.kube/config

- name: Wait for k8s node ready
Expand Down
2 changes: 1 addition & 1 deletion tests/playbooks/test-csi-cinder-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
gather_facts: true

vars:
e2e_test_version: v1.34.1
user: stack
devstack_workdir: /home/{{ user }}/devstack
k8s_release: v1.35.0

roles:
- role: install-golang
Expand Down
1 change: 1 addition & 0 deletions tests/playbooks/test-csi-manila-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
vars:
user: stack
devstack_workdir: /home/{{ user }}/devstack
k8s_release: v1.35.0

roles:
- role: install-golang
Expand Down
1 change: 1 addition & 0 deletions tests/playbooks/test-occm-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
vars:
user: stack
devstack_workdir: /home/{{ user }}/devstack
k8s_release: v1.35.0
octavia_provider: ""

roles:
Expand Down