mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
use len > 0 to replace port > 0
This commit is contained in:
parent
1854bdcb0c
commit
9ef3ef3f17
@ -830,7 +830,7 @@ func updateV1PodPorts(params map[string]string, podSpec *v1.PodSpec) (err error)
|
||||
}
|
||||
|
||||
// Don't include the port if it was not specified.
|
||||
if port > 0 {
|
||||
if len(params["port"]) > 0 {
|
||||
podSpec.Containers[0].Ports = []v1.ContainerPort{
|
||||
{
|
||||
ContainerPort: int32(port),
|
||||
|
Loading…
Reference in New Issue
Block a user