Bug Fix: Update ovs manifest for latest version. 93/72793/1
authorPawan Verma <pawanjbs5@gmail.com>
Mon, 26 Jul 2021 07:39:19 +0000 (13:09 +0530)
committerPawan Verma <pawanjbs5@gmail.com>
Tue, 27 Jul 2021 15:28:34 +0000 (20:58 +0530)
The newer image of ovs-cni-plugin terminates immediately after
creation. This patch fixes this by updating the manifest file.

Signed-off-by: Pawan Verma <pawanjbs5@gmail.com>
Change-Id: I9c5e4c1f15a39febdef7aa897c0791b701df2a45

tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/files/ovs-daemonset.yml

index 8a854c0..160bd53 100644 (file)
@@ -1,5 +1,5 @@
 kind: ClusterRole
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
 metadata:
   name: ovs-cni-marker-cr
 rules:
@@ -14,7 +14,7 @@ rules:
   - patch
 ---
 kind: ClusterRoleBinding
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
 metadata:
   name: ovs-cni-marker-crb
 roleRef:
@@ -58,10 +58,14 @@ spec:
       - key: node-role.kubernetes.io/master
         operator: Exists
         effect: NoSchedule
-      containers:
+      initContainers:
       - name: ovs-cni-plugin
-        image: quay.io/kubevirt/ovs-cni-plugin:latest
+        image: quay.io/kubevirt/ovs-cni-plugin:v0.22.0
         imagePullPolicy: IfNotPresent
+        command: ["cp"]
+        args:
+          - "/ovs"
+          - "/host/opt/cni/bin/ovs"
         resources:
           requests:
             cpu: "100m"
@@ -74,8 +78,16 @@ spec:
         volumeMounts:
         - name: cnibin
           mountPath: /host/opt/cni/bin
+      volumes:
+        - name: cnibin
+          hostPath:
+            path: /opt/cni/bin
+        - name: ovs-var-run
+          hostPath:
+            path: /var/run/openvswitch
+      containers: 
       - name: ovs-cni-marker
-        image: quay.io/kubevirt/ovs-cni-marker:latest
+        image: quay.io/kubevirt/ovs-cni-marker:v0.22.0
         imagePullPolicy: IfNotPresent
         securityContext:
           privileged: true
@@ -92,10 +104,4 @@ spec:
             valueFrom:
               fieldRef:
                 fieldPath: spec.nodeName
-      volumes:
-        - name: cnibin
-          hostPath:
-            path: /opt/cni/bin
-        - name: ovs-var-run
-          hostPath:
-            path: /var/run/openvswitch
+