Develop #155

Merged
metal3d merged 6 commits from develop into master 2025-08-03 12:20:17 +00:00
Showing only changes of commit 0b3f7b2b5c - Show all commits

View File

@@ -51,11 +51,7 @@ func NewService(service types.ServiceConfig, appName string) *Service {
// AddPort adds a port to the service. // AddPort adds a port to the service.
func (s *Service) AddPort(port types.ServicePortConfig, serviceName ...string) { func (s *Service) AddPort(port types.ServicePortConfig, serviceName ...string) {
name := s.service.Name var name string
if len(serviceName) > 0 {
name = serviceName[0]
}
var finalport intstr.IntOrString var finalport intstr.IntOrString
if targetPort := utils.GetServiceNameByPort(int(port.Target)); targetPort == "" { if targetPort := utils.GetServiceNameByPort(int(port.Target)); targetPort == "" {