Exemplo n.º 1
0
func deleteIngress(expClient client.ExtensionsInterface, ns string) error {
	items, err := expClient.Ingress(ns).List(unversioned.ListOptions{})
	if err != nil {
		return err
	}
	for i := range items.Items {
		err := expClient.Ingress(ns).Delete(items.Items[i].Name, nil)
		if err != nil && !errors.IsNotFound(err) {
			return err
		}
	}
	return nil
}
Exemplo n.º 2
0
func deleteIngress(expClient client.ExtensionsInterface, ns string) error {
	items, err := expClient.Ingress(ns).List(labels.Everything(), fields.Everything())
	if err != nil {
		return err
	}
	for i := range items.Items {
		err := expClient.Ingress(ns).Delete(items.Items[i].Name, nil)
		if err != nil && !errors.IsNotFound(err) {
			return err
		}
	}
	return nil
}