Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 13 commits into from
Jun 17, 2024

Conversation

ykim-1
Copy link
Contributor

@ykim-1 ykim-1 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-1 ykim-1 requested a review from a team as a code owner June 12, 2024 04:03
@ykim-1 ykim-1 requested review from jriddle-linode and lgarber-akamai and removed request for a team June 12, 2024 04:03
@ykim-1
Copy link
Contributor Author

ykim-1 commented Jun 12, 2024

@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-1 ykim-1 merged commit c008c00 into linode:dev Jun 17, 2024
6 checks passed
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