cnti-testcatalog / testsuite

πŸ“žπŸ“±β˜ŽοΈπŸ“‘πŸŒ Cloud Native Telecom Initiative (CNTI) Test Catalog is a tool to check for and provide feedback on the use of K8s + cloud native best practices in networking applications and platforms
https://wiki.lfnetworking.org/display/LN/Test+Catalog
Apache License 2.0
169 stars 70 forks source link

[Improvement] hardcoded_ip_addresses_in_k8s_runtime_configuration should give more information on failure #2093

Open martin-mat opened 2 days ago

martin-mat commented 2 days ago

Is your feature request related to a problem? Please describe. When hardcoded_ip_address_in_k8s_configuration fails, no description/additional information about exact reason of failure is given:

🎬 Testing: [hardcoded_ip_addresses_in_k8s_runtime_configuration]
βœ–οΈ  πŸ†FAILED: [hardcoded_ip_addresses_in_k8s_runtime_configuration] Hard-coded IP addresses found in the runtime K8s configuration

Describe the solution you'd like Print out more information (similarly as other tests), for example like in non_root_containers:

🎬 Testing: [non_root_containers]
Failed resource: StatefulSet grafana in test-cnf namespace
Failed resource: Deployment prometheus-thanos in test-cnf namespace
Failed resource: StatefulSet prometheus in test-cnf namespace
Remediation: If your application does not need root privileges, make sure to define runAsNonRoot as true or explicitly set the runAsUser using ID 1000 or higher under the PodSecurityContext or container securityContext. In addition, set an explicit value for runAsGroup using ID 1000 or higher.
βœ–οΈ  πŸ†FAILED: [non_root_containers] Found containers running with root user or user with root group membership πŸ”“πŸ”‘

For hardcoded_ip_addresses_in_k8s_runtime_configuration, print out: