Skip to content

Commit

Permalink
Remove k8s module for ns creation
Browse files Browse the repository at this point in the history
  • Loading branch information
floryut authored and k8s-ci-robot committed Mar 25, 2022
1 parent 3f70241 commit 97cb64c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 16 deletions.
13 changes: 4 additions & 9 deletions tests/cloud_playbooks/roles/packet-ci/tasks/create-vms.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
---

- name: "Create CI namespace {{ test_name }} for test vms"
k8s:
name: "{{ test_name }}"
kind: Namespace
state: present
register: create_ci_ns
failed_when: not create_ci_ns.changed
command: "kubectl create namespace {{ test_name }}"
changed_when: false

- name: "Create temp dir /tmp/{{ test_name }} for CI files"
file:
Expand All @@ -24,9 +20,8 @@
index_var: vm_id

- name: Start vms for CI job
k8s:
state: present
src: "/tmp/{{ test_name }}/instance-{{ vm_id }}.yml"
command: "kubectl apply -f /tmp/{{ test_name }}/instance-{{ vm_id }}.yml"
changed_when: false
loop: "{{ range(1, vm_count|int + 1, 1) | list }}"
loop_control:
index_var: vm_id
Expand Down
6 changes: 2 additions & 4 deletions tests/cloud_playbooks/roles/packet-ci/tasks/delete-vms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
state: absent

- name: "Cleanup namespace for {{ test_name }}"
k8s:
kind: Namespace
state: absent
name: "{{ test_name }}"
command: "kubectl delete namespace {{ test_name }}"
changed_when: false

- name: Wait for namespace {{ test_name }} to be fully deleted
command: kubectl get ns {{ test_name }}
Expand Down
1 change: 0 additions & 1 deletion tests/requirements-2.10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ tox==3.11.1
dopy==0.3.7
cryptography==2.8
ansible-lint==5.4.0
openshift==0.8.8
molecule==3.0.6
molecule-vagrant==0.3
testinfra==5.2.2
Expand Down
1 change: 0 additions & 1 deletion tests/requirements-2.11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ tox==3.11.1
dopy==0.3.7
cryptography==2.8
ansible-lint==5.4.0
openshift==0.8.8
molecule==3.0.6
molecule-vagrant==0.3
testinfra==5.2.2
Expand Down
1 change: 0 additions & 1 deletion tests/requirements-2.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ dopy==0.3.7
cryptography==2.8
ansible-lint==5.4.0 ; python_version >= '3.0'
ansible-lint==4.2.0 ; python_version < '3.0'
openshift==0.8.8
molecule==3.0.6 ; python_version >= '3.0'
molecule==3.0.2 ; python_version < '3.0'
molecule-vagrant==0.3
Expand Down

0 comments on commit 97cb64c

Please sign in to comment.