The CNF Conformance Test suite can be run in developer mode (using crystal lang directly) or in production mode (using an executable). See the pseudo code documentation for examples of how the internals of WIP tests might work.
# Developer mode
crystal src/cnf-conformance.cr <testname>
# Production mode
./cnf-conformance <testname>
# Developer mode
crystal src/cnf-conformance.cr validate_config cnf-config=[PATH_TO]/cnf-conformance.yml
# Production mode
./cnf-conformance validate_config cnf-config=[PATH_TO]/cnf-conformance.yml
crystal build src/cnf-conformance.cr
crystal src/cnf-conformance.cr all cnf-config=<path_to_your_config_file>/cnf-conformance.yml
crystal src/cnf-conformance.cr all poc cnf-config=<path_to_your_config_file>/cnf-conformance.yml
crystal src/cnf-conformance.cr workload
cnf-config=<path_to_your_config_file>/cnf-conformance.yml
crystal src/cnf-conformance.cr platform
# cmd line
./cnf-conformance -l debug test
# make sure to use -- if running from source
crystal src/cnf-conformance.cr -- -l debug test
# env var
LOGLEVEL=DEBUG ./cnf-conformance test
NOTE: When setting log level precedence highest of following wins
- Cli flag is highest precedence
- Environment var is next level of precedence
- Config file is last level of precedence
Also setting the verbose option for many tasks will add extra output to help with debugging
crystal src/cnf-conformance.cr test_name verbose
https://github.com/crystal-ameba/ameba
shards install # only for first install
crystal bin/ameba.cr
crystal src/cnf-conformance.cr help
crystal src/cnf-conformance.cr compatibility
(To Do) To check of the CNF's CNI plugin accepts valid calls from the CNI specification
crystal src/cnf-conformance.cr cni_spec
crystal src/cnf-conformance.cr api_snoop_alpha
crystal src/cnf-conformance.cr api_snoop_beta
crystal src/cnf-conformance.cr api_snoop_general_apis
crystal src/cnf-conformance.cr stateless
(To Do) To test if the CNF responds properly when being restarted
crystal src/cnf-conformance.cr reset_cnf
(To Do) To test if, when parent processes are restarted, the child processes are reaped
crystal src/cnf-conformance.cr check_reaped
crystal src/cnf-conformance.cr volume_hostpath_not_found
crystal src/cnf-conformance.cr security
✔️ To check if any containers are running in privileged mode
crystal src/cnf-conformance.cr privileged
(To Do) To check if there are any shells running in the container
crystal src/cnf-conformance.cr shells
[To Do] To check if there are any protected directories or files that are accessed from within the container
crystal src/cnf-conformance.cr protected_access
crystal src/cnf-conformance.cr microservice
crystal src/cnf-conformance.cr reasonable_image_size
crystal src/cnf-conformance.cr reasonable_startup_time
crystal src/cnf-conformance.cr scalability
✔️ To test the increasing and decreasing of capacity
Optional: To install the sample coredns cnf:
crystal src/cnf-conformance.cr sample_coredns_setup helm_chart=<helm chart name>
# Or optionally modify the your cnf's cnf-conformance.yml file to include the helm_chart name
# e.g.
helm_chart: stable/coredns
To run the capacity test
crystal src/cnf-conformance.cr increase_decrease_capacity deployment_name=coredns-coredns
# Or optionally modify the your cnf's cnf-conformance.yml file to include the deployment name
# e.g.
deployment_name: coredns/coredns
crystal src/cnf-conformance.cr small_autoscaling
(To Do) To test large scale autoscaling
crystal src/cnf-conformance.cr large_autoscaling
crystal src/cnf-conformance.cr network_chaos
(To Do) To test if the CNF control layer uses external retry logic
crystal src/cnf-conformance.cr external_retry
crystal src/cnf-conformance.cr configuration_lifecycle
crystal src/cnf-conformance.cr versioned_helm_chart
crystal src/cnf-conformance.cr ip_addresses
crystal src/cnf-conformance.cr nodeport_not_used
✔️ To test if there are any (non-declarative) hardcoded IP addresses or subnet masks in the K8s runtime configuration
crystal src/cnf-conformance.cr hardcoded_ip_addresses_in_k8s_runtime_configuration
crystal src/cnf-conformance.cr liveness
crystal src/cnf-conformance.cr readiness
crystal src/cnf-conformance.cr no_volume_with_configuration
(To Do) To test if the CNF responds properly when being restarted
crystal src/cnf-conformance.cr reset_cnf
(To Do) To test if, when parent processes are restarted, the child processes are reaped
crystal src/cnf-conformance.cr check_reaped
(To Do) To test if the CNF can perform a rolling update
crystal src/cnf-conformance.cr rolling_update
crystal src/cnf-conformance.cr observability
crystal src/cnf-conformance.cr fluentd_traffic
crystal src/cnf-conformance.cr jaeger_traffic
crystal src/cnf-conformance.cr prometheus traffic
(To Do) Test if tracing calls are compatible with OpenTelemetry
crystal src/cnf-conformance.cr opentelemetry_compatible
(To Do) Test are if the monitoring calls are compatible with OpenMetric
crystal src/cnf-conformance.cr openmetric_compatible
crystal src/cnf-conformance.cr installability
(PoC) Test if the install script uses Helm v3
crystal src/cnf-conformance.cr install_script_helm
crystal src/cnf-conformance.cr helm_chart_published
✔️ Test if the Helm chart is valid)
crystal src/cnf-conformance.cr helm_chart_valid
# Use a cnf-conformance.yml to manually call helm_deploy
# e.g. cp -rf <your-cnf-directory> cnfs/<your-cnf-directory>
crystal src/cnf-conformance.cr helm_deploy cnfs/<your-cnf-directory>/cnf-conformance.yml
(To Do) To test if the CNF can perform a rolling update
crystal src/cnf-conformance.cr rolling_update
crystal src/cnf-conformance.cr hardware_affinity
crystal src/cnf-conformance.cr static_accessing_hardware
(To Do) Test if the CNF is accessing hardware directly during run-time (e.g. accessing the host /dev or /proc from a mount)
crystal src/cnf-conformance.cr dynamic_accessing_hardware
(To Do) Test if the CNF is accessing hugepages directly instead of via Kubernetes resources
crystal src/cnf-conformance.cr direct_hugepages
(To Do) Test if the CNF Testbed performance output shows adequate throughput and sessions using the CNF Testbed (vendor neutral) hardware environment
crystal src/cnf-conformance.cr performance
crystal src/cnf-conformance.cr resilience
crystal src/cnf-conformance.cr chaos_network_loss
crystal src/cnf-conformance.cr chaos_cpu_hog
crystal src/cnf-conformance.cr chaos_container_kill
crystal src/cnf-conformance.cr platform
crystal src/cnf-conformance.cr k8s_conformance
crystal src/cnf-conformance.cr platform:resilience poc
crystal src/cnf-conformance.cr platform:observability poc
Don't run this unless you have completely separate cluster (e.g. you are not running KIND on a dev box)
crystal src/cnf-conformance.cr platform:node_failure poc destructive
crystal src/cnf-conformance.cr platform:oci_compliant