Merge pull request #7587 from ParkerVR/kube-underscores

Allowed underscores to remain in name for YAML (Kube generate)
This commit is contained in:
OpenShift Merge Robot
2020-09-11 05:36:49 -04:00
committed by GitHub

View File

@ -191,7 +191,7 @@ func addContainersAndVolumesToPodObject(containers []v1.Container, volumes []v1.
labels["app"] = removeUnderscores(podName) labels["app"] = removeUnderscores(podName)
om := v12.ObjectMeta{ om := v12.ObjectMeta{
// The name of the pod is container_name-libpod // The name of the pod is container_name-libpod
Name: removeUnderscores(podName), Name: podName,
Labels: labels, Labels: labels,
// CreationTimestamp seems to be required, so adding it; in doing so, the timestamp // CreationTimestamp seems to be required, so adding it; in doing so, the timestamp
// will reflect time this is run (not container create time) because the conversion // will reflect time this is run (not container create time) because the conversion