From d4b62e322b7c67b5c242a4c47e0f76250f2c0037 Mon Sep 17 00:00:00 2001 From: Urvashi Mohnani Date: Wed, 24 Aug 2022 23:43:56 -0400 Subject: [PATCH] Remove duplicate annotations in generated service yaml Don't add the same annotations as the pod yaml to the service yaml as it is not needed. [NO NEW TESTS NEEDED] Signed-off-by: Urvashi Mohnani --- libpod/kube.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libpod/kube.go b/libpod/kube.go index 8c09a6bb59..a0fb529732 100644 --- a/libpod/kube.go +++ b/libpod/kube.go @@ -267,6 +267,8 @@ func GenerateKubeServiceFromV1Pod(pod *v1.Pod, servicePorts []v1.ServicePort) (Y } service.Spec = serviceSpec service.ObjectMeta = pod.ObjectMeta + // Reset the annotations for the service as the pod annotations are not needed for the service + service.ObjectMeta.Annotations = nil tm := v12.TypeMeta{ Kind: "Service", APIVersion: pod.TypeMeta.APIVersion,