1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 06:49:40 +02:00

fix(app): don't attach all ingresses to app [EE-5686] (#10537)

This commit is contained in:
Ali 2023-10-27 04:59:45 +01:00 committed by GitHub
parent 26036c05f2
commit 47fa1626c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View file

@ -271,7 +271,7 @@ class KubernetesApplicationHelper {
/* #endregion */
/* #region SERVICES -> SERVICES FORM VALUES */
static generateServicesFormValuesFromServices(app) {
static generateServicesFormValuesFromServices(app, ingresses) {
let services = [];
if (app.Services) {
app.Services.forEach(function (service) {
@ -303,7 +303,7 @@ class KubernetesApplicationHelper {
svcport.serviceName = service.metadata.name;
svcport.ingressPaths = [];
app.Ingresses.value.forEach((ingress) => {
ingresses.forEach((ingress) => {
const matchingIngressPaths = ingress.Paths.filter((ingPath) => ingPath.ServiceName === service.metadata.name && ingPath.Port === port.port);
// only add ingress info to the port if the ingress serviceport and name matches
const newPaths = matchingIngressPaths.map((ingPath) => ({