1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

fix(k8s/ingress): remove only selected ingress (#5035)

* fix(k8s/ingress): remove only selected ingress

* fix(k8s/ingress): remove ingress from namespace
This commit is contained in:
Chaim Lev-Ari 2021-05-07 00:49:56 +03:00 committed by GitHub
parent 564bea7575
commit b7980f1b60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View file

@ -77,12 +77,11 @@ export function KubernetesIngressService($async, KubernetesIngresses) {
});
}
function _delete(ingress) {
function _delete(namespace, ingressClassName) {
return $async(async () => {
try {
const params = new KubernetesCommonParams();
params.id = ingress.Name;
const namespace = ingress.Namespace;
params.id = ingressClassName;
await KubernetesIngresses(namespace).delete(params).$promise;
} catch (err) {
throw new PortainerError('Unable to delete ingress', err);