mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
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>
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user