Ejemplo n.º 1
0
func deleteReplicaSets(expClient extensions_unversioned.ExtensionsInterface, ns string) error {
	items, err := expClient.ReplicaSets(ns).List(api.ListOptions{})
	if err != nil {
		return err
	}
	for i := range items.Items {
		err := expClient.ReplicaSets(ns).Delete(items.Items[i].Name, nil)
		if err != nil && !errors.IsNotFound(err) {
			return err
		}
	}
	return nil
}
func deleteReplicaSets(expClient unversionedextensions.ExtensionsInterface, ns string) error {
	return expClient.ReplicaSets(ns).DeleteCollection(nil, api.ListOptions{})
}