mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09:41 +02:00
fix(app): allow editing pod services [EE-6480] (#10875)
* fix(app): allow editing pod services [EE-6480] * address review comment --------- Co-authored-by: testa113 <testa113> Co-authored-by: prabhat khera <prabhat.khera@portainer.io>
This commit is contained in:
parent
7cba02226e
commit
4c0049edbe
5 changed files with 60 additions and 11 deletions
|
@ -315,7 +315,12 @@ class KubernetesApplicationHelper {
|
|||
ports.push(svcport);
|
||||
});
|
||||
svc.Ports = ports;
|
||||
svc.Selector = app.Raw.spec.selector.matchLabels;
|
||||
// if the app is a pod (doesn't have a selector), then get the pod labels
|
||||
if (app.Raw.spec.selector) {
|
||||
svc.Selector = app.Raw.spec.selector.matchLabels;
|
||||
} else {
|
||||
svc.Selector = app.Raw.metadata.labels || { app: app.Name };
|
||||
}
|
||||
services.push(svc);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue