From 78b3280926a91976a12f710bdd045b41fcfd4073 Mon Sep 17 00:00:00 2001 From: Tomofumi Hayashi Date: Fri, 18 Feb 2022 20:54:52 +0900 Subject: [PATCH] Remove old network status annotation This change removes old/obsolated network status annotation. --- pkg/apis/k8s.cni.cncf.io/v1/types.go | 2 -- pkg/utils/net-attach-def.go | 1 - 2 files changed, 3 deletions(-) diff --git a/pkg/apis/k8s.cni.cncf.io/v1/types.go b/pkg/apis/k8s.cni.cncf.io/v1/types.go index 103659b08..31ada4928 100644 --- a/pkg/apis/k8s.cni.cncf.io/v1/types.go +++ b/pkg/apis/k8s.cni.cncf.io/v1/types.go @@ -166,8 +166,6 @@ const ( NetworkAttachmentAnnot = "k8s.v1.cni.cncf.io/networks" // Pod annotation for network status NetworkStatusAnnot = "k8s.v1.cni.cncf.io/network-status" - // Old Pod annotation for network status (which is used before but it will be obsolated) - OldNetworkStatusAnnot = "k8s.v1.cni.cncf.io/networks-status" ) // NoK8sNetworkError indicates error, no network in kubernetes diff --git a/pkg/utils/net-attach-def.go b/pkg/utils/net-attach-def.go index 5e78761d7..6e1d56dd5 100644 --- a/pkg/utils/net-attach-def.go +++ b/pkg/utils/net-attach-def.go @@ -92,7 +92,6 @@ func setPodNetworkStatus(client kubernetes.Interface, pod *corev1.Pod, networkst pod.Annotations = make(map[string]string) } pod.Annotations[v1.NetworkStatusAnnot] = networkstatus - pod.Annotations[v1.OldNetworkStatusAnnot] = networkstatus _, err = coreClient.Pods(namespace).UpdateStatus(context.TODO(), pod, metav1.UpdateOptions{}) return err })