Skip to content

Commit

Permalink
DNM: lets run tests
Browse files Browse the repository at this point in the history
Signed-off-by: Or Shoval <[email protected]>
  • Loading branch information
oshoval committed Sep 19, 2024
1 parent 5abb293 commit 08fe160
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
21 changes: 20 additions & 1 deletion contrib/kind-common
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ install_cert_manager() {
install_kubevirt_ipam_controller() {
echo "Installing KubeVirt IPAM controller manager ..."
manifest="https://raw.githubusercontent.com/kubevirt/ipam-extensions/main/dist/install.yaml"
run_kubectl apply -f "$manifest"
curl -sL $manifest | sed 's#ghcr.io/kubevirt/ipam-controller#quay.io/oshoval/kubevirt-ipam-controller#' > ipam.yaml
run_kubectl apply -f ipam.yaml
kubectl wait -n kubevirt-ipam-controller-system deployment kubevirt-ipam-controller-manager --for condition=Available --timeout 2m
}

Expand Down Expand Up @@ -605,6 +606,24 @@ spec:
}
]
}'
EOF

cat <<EOF | oc apply -f -
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: ovn-kubernetes
namespace: default
spec:
config: '{
"cniVersion": "0.4.0",
"name": "ovn-kubernetes",
"type": "ovn-k8s-cni-overlay",
"ipam": {},
"dns": {},
"runtimeConfig": {}
}'
EOF
}

Expand Down
22 changes: 11 additions & 11 deletions go-controller/pkg/util/multi_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -942,16 +942,16 @@ func TestGetPodNADToNetworkMappingWithActiveNetwork(t *testing.T) {
Role: ovntypes.NetworkRolePrimary,
AllowPersistentIPs: true,
},
inputPodAnnotations: map[string]string{
nadv1.NetworkAttachmentAnnot: GetNADName(namespaceName, "another-network"),
OvnUDNIPAMClaimName: "the-one-to-the-left-of-the-pony",
},
//inputPodAnnotations: map[string]string{
// nadv1.NetworkAttachmentAnnot: GetNADName(namespaceName, "another-network"),
// OvnUDNIPAMClaimName: "the-one-to-the-left-of-the-pony",
//},
expectedIsAttachmentRequested: true,
expectedNetworkSelectionElements: map[string]*nadv1.NetworkSelectionElement{
"ns1/attachment1": {
Name: "attachment1",
Namespace: "ns1",
IPAMClaimReference: "the-one-to-the-left-of-the-pony",
Name: "attachment1",
Namespace: "ns1",
//IPAMClaimReference: "the-one-to-the-left-of-the-pony",
},
},
},
Expand Down Expand Up @@ -998,10 +998,10 @@ func TestGetPodNADToNetworkMappingWithActiveNetwork(t *testing.T) {
Role: ovntypes.NetworkRolePrimary,
AllowPersistentIPs: true,
},
inputPodAnnotations: map[string]string{
nadv1.NetworkAttachmentAnnot: GetNADName(namespaceName, "another-network"),
OvnUDNIPAMClaimName: "the-one-to-the-left-of-the-pony",
},
//inputPodAnnotations: map[string]string{
// nadv1.NetworkAttachmentAnnot: GetNADName(namespaceName, "another-network"),
// OvnUDNIPAMClaimName: "the-one-to-the-left-of-the-pony",
//},
expectedIsAttachmentRequested: true,
expectedNetworkSelectionElements: map[string]*nadv1.NetworkSelectionElement{
"ns1/attachment1": {
Expand Down

0 comments on commit 08fe160

Please sign in to comment.