mirror of
https://github.com/containers/podman.git
synced 2025-06-21 17:38:12 +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.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