Skip to content

Commit

Permalink
[CI] add remove node job
Browse files Browse the repository at this point in the history
  • Loading branch information
cristicalin authored and k8s-ci-robot committed May 4, 2022
1 parent 8f118fb commit 9143810
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ variables:
ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
IDEMPOT_CHECK: "false"
RESET_CHECK: "false"
REMOVE_NODE_CHECK: "false"
UPGRADE_TEST: "false"
MITOGEN_ENABLE: "false"
ANSIBLE_LOG_LEVEL: "-vv"
Expand Down
8 changes: 8 additions & 0 deletions .gitlab-ci/packet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ packet_debian10-calico-upgrade:
variables:
UPGRADE_TEST: graceful

packet_almalinux8-calico-remove-node:
stage: deploy-part3
extends: .packet_pr
when: on_success
variables:
REMOVE_NODE_CHECK: "true"
REMOVE_NODE_NAME: "instance-3"

packet_debian10-calico-upgrade-once:
stage: deploy-part3
extends: .packet_periodic
Expand Down
7 changes: 7 additions & 0 deletions tests/files/packet_almalinux8-calico-remove-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# Instance settings
cloud_image: almalinux-8
mode: ha

# Kubespray settings
auto_renew_certificates: true
5 changes: 5 additions & 0 deletions tests/scripts/testcases_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ if [ "${IDEMPOT_CHECK}" = "true" ]; then
fi
fi

# Test node removal procedure
if [ "${REMOVE_NODE_CHECK}" = "true" ]; then
ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_SETTING} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} ${CI_TEST_ADDITIONAL_VARS} -e skip_confirmation=yes -e node=${REMOVE_NODE_NAME} --limit "all:!fake_hosts" remove-node.yml
fi

# Clean up at the end, this is to allow stage1 tests to include cleanup test
if [ "${RESET_CHECK}" = "true" ]; then
ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_SETTING} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} ${CI_TEST_ADDITIONAL_VARS} -e reset_confirmation=yes --limit "all:!fake_hosts" reset.yml
Expand Down

0 comments on commit 9143810

Please sign in to comment.