We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
listRemovableResources
The is no way to prevent Openshift.clean() from deleting these:
Openshift.clean()
removables.addAll(getUserSecrets()); removables.addAll(getUserServiceAccounts()); removables.addAll(getUserRoleBindings());
but it should be doable, e.g.:
List<HasMetadata> listRemovableResources() { ... removables.addAll(getUserSecrets().stream().filter(withoutKeepLabel()).collect(Collectors.toList())); removables.addAll(getUserServiceAccounts().stream().filter(withoutKeepLabel()).collect(Collectors.toList())); removables.addAll(getUserRoleBindings().stream().filter(withoutKeepLabel()).collect(Collectors.toList())); ... return removables; } private Predicate<HasMetadata> withoutKeepLabel() { return (hasMetadata) -> { if (hasMetadata.getMetadata().getLabels() != null) { return !(hasMetadata.getMetadata().getLabels().containsKey(KEEP_LABEL)); } else { return true; } }; }
The text was updated successfully, but these errors were encountered:
I see now that this is not an issue actually as getUser methods do take the KEEP_LABEL into account, I was fooled by #306. Closing this one.
Sorry, something went wrong.
No branches or pull requests
The is no way to prevent
Openshift.clean()
from deleting these:but it should be doable, e.g.:
The text was updated successfully, but these errors were encountered: