diff options
author | Urvashi Mohnani <umohnani@redhat.com> | 2022-08-24 23:43:56 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2022-09-06 14:29:16 -0400 |
commit | d4b62e322b7c67b5c242a4c47e0f76250f2c0037 (patch) | |
tree | 146349bd55df3a0195eb182a74453983797da915 /libpod | |
parent | 063f332416c16532ada2465c3be53f1d4d8c8966 (diff) | |
download | podman-d4b62e322b7c67b5c242a4c47e0f76250f2c0037.tar.gz podman-d4b62e322b7c67b5c242a4c47e0f76250f2c0037.tar.bz2 podman-d4b62e322b7c67b5c242a4c47e0f76250f2c0037.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')
-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, |