Skip to content

Commit

Permalink
Revert Fabric8 4.10 backward compatibility fix (xtf-cz#374) ad718b2
Browse files Browse the repository at this point in the history
as fabric8io/kubernetes-client#2373 was fixed, api version guessing can be streamlined.
  • Loading branch information
Vojtech Salbaba committed Jun 22, 2021
1 parent dd43928 commit 30b507b
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions core/src/main/java/cz/xtf/core/openshift/OpenShift.java
Expand Up @@ -1110,15 +1110,7 @@ public boolean deleteConfigMap(ConfigMap configMap) {
return configMaps().delete(configMap);
}

// Templates
private void updateTemplateApiVersion(Template template) {
if (OpenShifts.getVersion().startsWith("3")) {
template.setApiVersion("template.openshift.io/v1");
}
}

public Template createTemplate(Template template) {
updateTemplateApiVersion(template);
return templates().create(template);
}

Expand All @@ -1135,7 +1127,6 @@ public boolean deleteTemplate(String name) {
}

public boolean deleteTemplate(Template template) {
updateTemplateApiVersion(template);
return templates().delete(template);
}

Expand Down

0 comments on commit 30b507b

Please sign in to comment.