Skip to content

test: Add Calico Inbound and Outbound policies to LKE nodes for E2E#619

Merged
ykim-akamai merged 13 commits intolinode:devfrom
ykim-akamai:test/lke_calico_rules_e2e
Jun 17, 2024
Merged

test: Add Calico Inbound and Outbound policies to LKE nodes for E2E#619
ykim-akamai merged 13 commits intolinode:devfrom
ykim-akamai:test/lke_calico_rules_e2e

Conversation

@ykim-akamai
Copy link
Contributor

@ykim-akamai ykim-akamai commented Jun 12, 2024

📝 Description

A new script, lke_calico_rules_e2e.sh, has been added and is called in the E2E workflow file after the Run the integration test suite step in e2e-suite.yml

Key Points:

  • kubectl and calicoctl binaries are required as pre-req which are downloed in the e2e worflow file
  • The script retrieves all LKE clusters in the test account and applies Calico rules to the corresponding nodes. If no clusters exist, no action is taken. In most cases, clusters are cleaned and deleted properly after test execution
  • Due to the delay in the availability of LKE cluster configurations and the provisioning times of node instances, it is challenging to apply Calico rules directly within the test framework. Therefore, the script is separated and executed independently in the workflow file

✔️ How to Test

PR has been checked out

  1. Comment out remove_lke_clusters() line 64 in test_clusters.py
  2. Run make MODULE="lke" testint
  3. Run shell script cd scripts && ./lke_calico_rules_e2e.sh
  4. Calico rule is applied to the cluster

📷 Preview

If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.

@ykim-akamai ykim-akamai requested a review from a team as a code owner June 12, 2024 04:03
@ykim-akamai ykim-akamai requested review from jriddle-linode and lgarber-akamai and removed request for a team June 12, 2024 04:03
@ykim-akamai
Copy link
Contributor Author

@jriddle-linode jriddle-linode added the testing for updates to the testing suite in the changelog. label Jun 12, 2024
Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work so far! Just a few tiny suggestions and this should be good to go 🎉

Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well on my end, nice work!

Tested using the following:

  1. Create two LKE clusters:
 linode-cli lke cluster-create --region us-mia --k8s_version 1.29 --node_pools.type g6-standard-1 --node_pools.count 2 --label test-cluster-1

 linode-cli lke cluster-create --region us-mia --k8s_version 1.29 --node_pools.type g6-standard-1 --node_pools.count 2 --label test-cluster-2
  1. Apply calico rules using provided script:
cd scripts
./lke_calico_rules_e2e.sh

Copy link
Member

@zliang-akamai zliang-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ykim-akamai ykim-akamai merged commit c008c00 into linode:dev Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants