mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
Merge pull request #15474 from umohnani8/gen-kube
Remove duplicate annotations in generated service yaml
This commit is contained in:
@ -267,6 +267,8 @@ func GenerateKubeServiceFromV1Pod(pod *v1.Pod, servicePorts []v1.ServicePort) (Y
|
|||||||
}
|
}
|
||||||
service.Spec = serviceSpec
|
service.Spec = serviceSpec
|
||||||
service.ObjectMeta = pod.ObjectMeta
|
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{
|
tm := v12.TypeMeta{
|
||||||
Kind: "Service",
|
Kind: "Service",
|
||||||
APIVersion: pod.TypeMeta.APIVersion,
|
APIVersion: pod.TypeMeta.APIVersion,
|
||||||
|
Reference in New Issue
Block a user