diff options
author | Urvashi Mohnani <umohnani@redhat.com> | 2022-08-24 23:43:56 -0400 |
---|---|---|
committer | Urvashi Mohnani <umohnani@redhat.com> | 2022-08-24 23:47:38 -0400 |
commit | 10b460512408a1101d6c766d84ec8586556e1939 (patch) | |
tree | c0bb4e669a4109c9e1550839558fe840e7a8bc72 /libpod/kube.go | |
parent | 9a83fe33b5c93eff0e65064cc45158d8d0f6ea0d (diff) | |
download | podman-10b460512408a1101d6c766d84ec8586556e1939.tar.gz podman-10b460512408a1101d6c766d84ec8586556e1939.tar.bz2 podman-10b460512408a1101d6c766d84ec8586556e1939.zip |
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 <umohnani@redhat.com>
Diffstat (limited to 'libpod/kube.go')
-rw-r--r-- | libpod/kube.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/kube.go b/libpod/kube.go index 8c09a6bb5..a0fb52973 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, |