1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 14:29:40 +02:00

fix(k8s/ingress): ensure new ports are only added to ingress only if app is published via ingress (#6153)

* fix(k8s/ingress): ensure new ports are only added to ingress only if app is published via ingress

* refactor(k8s/ingress): removed deleted ports of ingress in a single pass
This commit is contained in:
LP B 2021-11-30 05:14:52 +01:00 committed by GitHub
parent 69c17986d9
commit b6fbf8eecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 53 additions and 32 deletions

View file

@ -346,10 +346,14 @@ class KubernetesApplicationService {
await apiService.patch(oldAppPayload, newAppPayload);
}
// accept either formValues or applications as parameters
// depending on partial value
// accept either formValues or applications as parameters depending on partial value
// true = KubernetesApplication
// false = KubernetesApplicationFormValues
//
// e.g. signatures are
//
// patch(oldValues: KubernetesApplication, newValues: KubernetesApplication, partial: (undefined | false)): Promise<unknown>
// patch(oldValues: KubernetesApplicationFormValues, newValues: KubernetesApplicationFormValues, partial: true): Promise<unknown>
patch(oldValues, newValues, partial = false) {
if (partial) {
return this.$async(this.patchPartialAsync, oldValues, newValues);