Skip to content

Commit dea0950

Browse files
committed
Update antrea-agent ClusterRole manifest to update Pod annotation
Signed-off-by: Wenqi Qiu <[email protected]>
1 parent 5177eef commit dea0950

File tree

7 files changed

+8
-1
lines changed

7 files changed

+8
-1
lines changed

build/charts/antrea/templates/agent/clusterrole.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ rules:
3939
- pods/status
4040
verbs:
4141
- patch
42+
- update
4243
- apiGroups:
4344
- ""
4445
resources:

build/yamls/antrea-aks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4620,6 +4620,7 @@ rules:
46204620
- pods/status
46214621
verbs:
46224622
- patch
4623+
- update
46234624
- apiGroups:
46244625
- ""
46254626
resources:

build/yamls/antrea-eks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4620,6 +4620,7 @@ rules:
46204620
- pods/status
46214621
verbs:
46224622
- patch
4623+
- update
46234624
- apiGroups:
46244625
- ""
46254626
resources:

build/yamls/antrea-gke.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4620,6 +4620,7 @@ rules:
46204620
- pods/status
46214621
verbs:
46224622
- patch
4623+
- update
46234624
- apiGroups:
46244625
- ""
46254626
resources:

build/yamls/antrea-ipsec.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4633,6 +4633,7 @@ rules:
46334633
- pods/status
46344634
verbs:
46354635
- patch
4636+
- update
46364637
- apiGroups:
46374638
- ""
46384639
resources:

build/yamls/antrea.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4620,6 +4620,7 @@ rules:
46204620
- pods/status
46214621
verbs:
46224622
- patch
4623+
- update
46234624
- apiGroups:
46244625
- ""
46254626
resources:

pkg/agent/secondarynetwork/podwatch/controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,11 @@ func (pc *PodController) configurePodSecondaryNetwork(pod *corev1.Pod, networkLi
481481

482482
// update Pod annotation
483483
if netStatus != nil {
484-
klog.InfoS("Update Pod annotation", "NetworkStatus", netStatus)
485484
if err := netdefutils.SetNetworkStatus(pc.kubeClient, pod, netStatus); err != nil {
485+
klog.ErrorS(err, "Update Pod annotation failed", "Pod", klog.KRef(pod.Namespace, pod.Name))
486486
return err
487487
}
488+
klog.InfoS("Update Pod annotation successfully", "Pod", klog.KRef(pod.Namespace, pod.Name), "NetworkStatus", netStatus)
488489
}
489490
return nil
490491
}

0 commit comments

Comments
 (0)