mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
fix error when edit pod application (#6418)
This commit is contained in:
parent
50b2f789a3
commit
a79aa221d3
1 changed files with 46 additions and 42 deletions
|
@ -279,6 +279,7 @@ class KubernetesApplicationHelper {
|
||||||
/* #region SERVICES -> SERVICES FORM VALUES */
|
/* #region SERVICES -> SERVICES FORM VALUES */
|
||||||
static generateServicesFormValuesFromServices(app) {
|
static generateServicesFormValuesFromServices(app) {
|
||||||
let services = [];
|
let services = [];
|
||||||
|
if (app.Services) {
|
||||||
app.Services.forEach(function (service) {
|
app.Services.forEach(function (service) {
|
||||||
const svc = new KubernetesService();
|
const svc = new KubernetesService();
|
||||||
svc.Namespace = service.metadata.namespace;
|
svc.Namespace = service.metadata.namespace;
|
||||||
|
@ -325,11 +326,14 @@ class KubernetesApplicationHelper {
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* #endregion */
|
/* #endregion */
|
||||||
static generateSelectorFromService(app) {
|
static generateSelectorFromService(app) {
|
||||||
|
if (app.Raw.kind !== 'Pod') {
|
||||||
const selector = app.Raw.spec.selector.matchLabels;
|
const selector = app.Raw.spec.selector.matchLabels;
|
||||||
return selector;
|
return selector;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* #region PUBLISHED PORTS FV <> PUBLISHED PORTS */
|
/* #region PUBLISHED PORTS FV <> PUBLISHED PORTS */
|
||||||
static generatePublishedPortsFormValuesFromPublishedPorts(serviceType, publishedPorts, ingress) {
|
static generatePublishedPortsFormValuesFromPublishedPorts(serviceType, publishedPorts, ingress) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue