forked from LaconicNetwork/kompose
Abstracted port checking function
To reduce the inconsistency of message printing created a function which can be called from both kubernetes and openshift
This commit is contained in:
@@ -153,9 +153,7 @@ func (k *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C
|
||||
}
|
||||
|
||||
// If ports not provided in configuration we will not make service
|
||||
if len(ports) == 0 {
|
||||
logrus.Warningf("[%s] Service cannot be created because of missing port.", name)
|
||||
} else {
|
||||
if kubernetes.PortsExist(name, service) {
|
||||
objects = append(objects, sc)
|
||||
}
|
||||
allobjects = append(allobjects, objects...)
|
||||
|
||||
Reference in New Issue
Block a user