Skip to content

Commit

Permalink
Fix - ignore openshift-service-ca.crt config map - needed for OCP 4.8…
Browse files Browse the repository at this point in the history
…+ to avoid failures during cleaning up of namespace - see issue #449
  • Loading branch information
mnovak1 authored and simkam committed Aug 4, 2021
1 parent a1a1fe0 commit d391c50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/cz/xtf/core/openshift/OpenShift.java
Original file line number Diff line number Diff line change
Expand Up @@ -1096,13 +1096,14 @@ public List<ConfigMap> getConfigMaps() {
}

/**
* Retrieves all configmaps but "kube-root-ca.crt" which is created out of the box.
* Retrieves all configmaps but "kube-root-ca.crt" and "openshift-service-ca.crt" which are created out of the box.
*
* @return List of configmaps created by user
*/
public List<ConfigMap> getUserConfigMaps() {
return configMaps().withLabelNotIn(OpenShift.KEEP_LABEL, "", "true").list().getItems().stream()
.filter(cm -> !cm.getMetadata().getName().equals("kube-root-ca.crt"))
.filter(cm -> !cm.getMetadata().getName().equals("openshift-service-ca.crt"))
.collect(Collectors.toList());
}

Expand Down

0 comments on commit d391c50

Please sign in to comment.