mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
fix(application): edit cluster ip services EE-4328 (#7775)
This commit is contained in:
parent
819dc4d561
commit
315c1c7e1e
10 changed files with 200 additions and 107 deletions
|
@ -308,13 +308,17 @@ class KubernetesApplicationHelper {
|
|||
svcport.targetPort = port.targetPort;
|
||||
|
||||
app.Ingresses.value.forEach((ingress) => {
|
||||
const ingressMatched = _.find(ingress.Paths, { ServiceName: service.metadata.name });
|
||||
if (ingressMatched) {
|
||||
const ingressNameMatched = ingress.Paths.find((ingPath) => ingPath.ServiceName === service.metadata.name);
|
||||
const ingressPortMatched = ingress.Paths.find((ingPath) => ingPath.Port === port.port);
|
||||
// only add ingress info to the port if the ingress serviceport matches the port in the service
|
||||
if (ingressPortMatched) {
|
||||
svcport.ingress = {
|
||||
IngressName: ingressMatched.IngressName,
|
||||
Host: ingressMatched.Host,
|
||||
Path: ingressMatched.Path,
|
||||
IngressName: ingressPortMatched.IngressName,
|
||||
Host: ingressPortMatched.Host,
|
||||
Path: ingressPortMatched.Path,
|
||||
};
|
||||
}
|
||||
if (ingressNameMatched) {
|
||||
svc.Ingress = true;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue