mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 06:19:41 +02:00
fix(apps): don't delete the 'kubernetes' service or duplicate service names [r8s-124] (#90)
This commit is contained in:
parent
e9fc6d5598
commit
cd8c6d1ce0
2 changed files with 8 additions and 12 deletions
|
@ -341,7 +341,7 @@ func updateApplicationWithService(application *models.K8sApplication, services [
|
|||
for _, service := range services {
|
||||
serviceSelector := labels.SelectorFromSet(service.Spec.Selector)
|
||||
|
||||
if service.Namespace == application.ResourcePool && serviceSelector.Matches(labels.Set(application.MatchLabels)) {
|
||||
if service.Namespace == application.ResourcePool && !serviceSelector.Empty() && serviceSelector.Matches(labels.Set(application.MatchLabels)) {
|
||||
application.ServiceType = string(service.Spec.Type)
|
||||
application.Services = append(application.Services, service)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue