diff --git a/config/samples/octavia_v1beta1_octavia.yaml b/config/samples/octavia_v1beta1_octavia.yaml index 93155e4c..49f0dd00 100644 --- a/config/samples/octavia_v1beta1_octavia.yaml +++ b/config/samples/octavia_v1beta1_octavia.yaml @@ -1,3 +1,28 @@ +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: octavia +spec: + config: | + { + "cniVersion": "0.3.1", + "name": "octavia", + "type": "bridge", + "bridge": "octbr", + "ipam": { + "type": "whereabouts", + "range": "172.23.0.0/24", + "range_start": "172.23.0.30", + "range_end": "172.23.0.70", + "routes": [ + { + "dst": "172.24.0.0/16", + "gw" : "172.23.0.150" + } + ] + } + } +--- apiVersion: octavia.openstack.org/v1beta1 kind: Octavia metadata: diff --git a/tests/kuttl/common/assert_sample_deployment.yaml b/tests/kuttl/common/assert_sample_deployment.yaml index 16fbd805..c14c1c5f 100644 --- a/tests/kuttl/common/assert_sample_deployment.yaml +++ b/tests/kuttl/common/assert_sample_deployment.yaml @@ -244,3 +244,18 @@ commands: fi done exit 0 + - script: | + pod=$(oc get pods -n $NAMESPACE -l service=octavia-healthmanager --field-selector=status.phase=Running -o name | head -1) + if [ "$pod" = "" ]; then + exit 1 + fi + # Check that the octavia-healthmanager pods has 2 IP addresses on the octavia interface + n_addresses=$(oc logs -n $NAMESPACE -c init "$pod" | grep "addr 172\.23\..* dev octavia" | wc -l) + if [ "$n_addresses" != "2" ]; then + exit 1 + fi + # and a route to the lb-mgmt-subnet + if ! oc logs -n $NAMESPACE -c init "$pod" | grep 'route 172.24.0.0/16 via 172.23.0.150 dev octavia'; then + exit 1 + fi + exit 0