@@ -10,47 +10,34 @@ IMAGE_REPO=${IMG_REPO:-maiqueb}
10
10
IMAGE_NAME=" multus-dynamic-networks-controller"
11
11
IMAGE_TAG=" latest"
12
12
13
- setup_cluster () {
14
- export KUBEVIRTCI_TAG=` curl -L -Ss https://storage.googleapis.com/kubevirt-prow/release/kubevirt/kubevirtci/latest`
15
- git clone https://github.com/kubevirt/kubevirtci/
16
- trap " popd" RETURN SIGINT
17
- pushd kubevirtci
18
- KUBEVIRT_PROVIDER=" k8s-$K8S_VERSION " KUBEVIRT_NUM_SECONDARY_NICS=1 make cluster-up
19
- export KUBECONFIG=" $( pwd) /_ci-configs/k8s-1.24/.kubeconfig"
20
- }
21
-
22
13
push_local_image () {
23
14
OCI_BIN=" $OCI_BIN " IMAGE_REGISTRY=" registry:5000/$IMAGE_REPO " make manifests
24
15
OCI_BIN=" $OCI_BIN " IMAGE_REGISTRY=" $IMG_REGISTRY " make img-build
25
16
" $OCI_BIN " push --tls-verify=false " $IMG_REGISTRY /$IMAGE_NAME :$IMAGE_TAG "
26
17
}
27
18
28
- publish_kubeconfig () {
29
- local kube_config_dir=" ${HOME} /.kube/"
30
- mkdir -p " $kube_config_dir "
31
- cp kubevirtci/_ci-configs/k8s-1.24/.kubeconfig " $kube_config_dir /config"
32
- echo " ###"
33
- echo " Repo kubeconfig moved to $kube_config_dir /config"
34
- echo " ###"
19
+ setup_registry () {
20
+ # https://minikube.sigs.k8s.io/docs/handbook/registry/
21
+ minikube addons enable registry
22
+ " $OCI_BIN " run --rm -it --network=host alpine ash -c " apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:$( minikube ip) :5000"
35
23
}
36
24
37
25
cleanup () {
38
- rm -rf kubevirtci
39
26
git checkout -- manifests/
27
+ echo " =============="
28
+ echo " minikube logs:"
29
+ echo " =============="
30
+ minikube logs
40
31
}
41
32
42
33
trap " cleanup" EXIT
43
- setup_cluster
44
34
45
- registry_port=$( kubevirtci/cluster-up/cli.sh ports registry | tr -d ' \r' )
46
- registry=" localhost:$registry_port /$IMAGE_REPO "
35
+ setup_registry
47
36
48
- IMG_REGISTRY=" $registry " push_local_image
37
+ IMG_REGISTRY=" localhost:5000/ $IMAGE_REPO " push_local_image
49
38
50
39
kubectl apply -f https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/master/deployments/multus-daemonset-thick.yml
51
40
kubectl wait -nkube-system --for=condition=ready --timeout=180s -l app=multus pods
52
41
53
- publish_kubeconfig
54
-
55
42
kubectl apply -f manifests/dynamic-networks-controller.yaml
56
43
kubectl wait -nkube-system --for=condition=ready --timeout=180s -l app=dynamic-networks-controller pods
0 commit comments