summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-08-26 05:25:21 -0400
committerGitHub <noreply@github.com>2022-08-26 05:25:21 -0400
commitd307d1aba49b1801caa37d740fcd4a0cf0e9448c (patch)
treec39e41d5a435a00be100fbc7e8e99a86de751f25
parent339797c01665031fcc6512ca4985434263b8a486 (diff)
parent10b460512408a1101d6c766d84ec8586556e1939 (diff)
downloadpodman-d307d1aba49b1801caa37d740fcd4a0cf0e9448c.tar.gz
podman-d307d1aba49b1801caa37d740fcd4a0cf0e9448c.tar.bz2
podman-d307d1aba49b1801caa37d740fcd4a0cf0e9448c.zip
Merge pull request #15474 from umohnani8/gen-kube
Remove duplicate annotations in generated service yaml
-rw-r--r--libpod/kube.go2
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,