-
Epic
-
Resolution: Done
-
Normal
-
None
-
None
-
None
-
Horizon Operator tests should validate Multus connections
-
5
-
False
-
-
False
-
Not Selected
-
Proposed
-
Proposed
-
To Do
-
Proposed
-
Proposed
-
0% To Do, 0% In Progress, 100% Done
-
-
Description
The horizon-operator is able to accept NetworkAttachment details to connect the Horizon pod to any given Multus network. This is leveraged in cases where Horizon needs access to remote storage. For example, when uploading an image to Glance.
https://github.com/openstack-k8s-operators/horizon-operator/pull/361
Problem
There is limited test coverage for Horizon in the Zuul and Prow jobs. Accordingly, this feature could easily be broken in future releases and not caught until a user tries to leverage this feature.
We should aim to have Kuttl and/or Functional test coverage for this feature to ensure functionality.
Proposal
For Kuttl:
- Add the parameter to the sample:
.spec.networkAttachment
2. Assert that a multus network has been annotated on the pod (example from dataplane pod):
$ oc get po configure-network-edpm-compute-openstack-edpm-ipam-j86qg -o yaml | yq .metadata.annotations { "k8s.ovn.org/pod-networks": "{\"default\":{\"ip_addresses\":[\"10.128.0.90/23\"],\"mac_address\":\"0a:58:0a:80:00:5a\",\"gateway_ips\":[\"10.128.0.1\"],\"routes\":[{\"dest\":\"10.128.0.0/14\",\"nextHop\":\"10.128.0.1\"},{\"dest\":\"172.30.0.0/16\",\"nextHop\":\"10.128.0.1\"},{\"dest\":\"100.64.0.0/16\",\"nextHop\":\"10.128.0.1\"}],\"ip_address\":\"10.128.0.90/23\",\"gateway_ip\":\"10.128.0.1\"}}", "k8s.v1.cni.cncf.io/network-status": "[{\n \"name\": \"ovn-kubernetes\",\n \"interface\": \"eth0\",\n \"ips\": [\n \"10.128.0.90\"\n ],\n \"mac\": \"0a:58:0a:80:00:5a\",\n \"default\": true,\n \"dns\": {}\n},{\n \"name\": \"openstack/ctlplane\",\n \"interface\": \"ctlplane\",\n \"ips\": [\n \"192.168.122.30\"\n ],\n \"mac\": \"26:75:bc:c2:25:10\",\n \"dns\": {}\n}]", "k8s.v1.cni.cncf.io/networks": "[{\"name\":\"ctlplane\",\"namespace\":\"openstack\",\"interface\":\"ctlplane\"}]", "openshift.io/scc": "restricted-v2", "seccomp.security.alpha.kubernetes.io/pod": "runtime/default" }
For functional tests. We would need to retrieve the pod in the test and assert the same. Might be a little easier to do comprehensively in functional tests, but just a basic Kuttl test might be useful.