Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We use the next values for the kud-installer.yaml  to  to properly run tests with Containerd and Kata Containers.

Code Block
languageyml
CONTAINER_RUNTIME: "containerd"

KUD_ENABLE_TESTS: "true"

ENABLE_KATA_WEBHOOK: "false"

KATA_WEBHOOK_RUNTIMECLASS: "kata-clh"


If ENABLE_KATA_WEBHOOK  is  is set to true, then every pod that could run as a Kata container (e.g. infrastructure pods) will mutate to run as a Kata container. This could lead to some pods to be stuck in pending. If KUD_ENABLE_TESTS  is  is set to true, then the webhook will be started before the verification tests are run to force Kata eligible pods to run as a Kata container. The webhook will be uninstalled after the tests run if ENABLE_KATA_WEBHOOK  is  is set to false.


Notes:

We recommend to only enable the webhook provided by the Kata project for testing purposes as it may not meet production needs. 

...

Golang testing:

BPA Operator: 

A Configmap coming from the kud-installer.yaml file is what the BPA operator reads from to determine what CRI to use and whether to run the testing.

The BPA operator has unit tests using the go framework. The unit tests check the following:

  • Job is created with the right job name for KUD installation.
  • The job metadata has the right cluster name
  • Expected error is produced when a host with the specified MAC address is not found
  • Expected error is produced when no dhcp lease is found for the specified host

BPA Rest Agent: 

  • Currently, automated unit tests are implemented using the Go testing framework.

...

Metal3 verifier will check all the servers are provisioned, Metal3 verifier check checks the status of the Baremetal bare-metal servers for every 60 second for the provisioning status.

BPA Operator:

...

Bare-Metal host  Provisioning
  • The bpa_verifier.sh script   script get the MAC addresses and IP addresses of the 2 VMs provisioned by metal3, then creates a fake DHCP lease file using the IP address and MAC address information. It also creates a provisioning CR using the MAC address information.
  • The script the creates an ssh secret key using the ssh keys of the test host, applies the provisioning CR.
  • The script busy loops till the KUD installation job completes or fails. If it completes successfully, it does a curl command using the authentication info of the new cluster to confirm if it was successful or not. On completing all the steps, it does a teardown where it deletes everything it created.
BPA Rest Agent
  • Test script, e2e_test.sh, creates dummy image file, creates test JSON file, checks bpa rest agent status, issues POST, GET, and PATCH requests sequentially.
  • Next, e2e_test.sh checks  checks uploaded MinIO image object size, and calls DELETE.
  • If the script fails at any point, then verification was unsuccessful.

...

Akraino BluVal Exception Request

CD Logs:

ICN Master Baremetal bare-metal Deployment Verifier

Test Dashboards

...