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 17, 2021
1 parent dd43928 commit 58c0dd1
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions core/src/main/java/cz/xtf/core/openshift/OpenShift.java
Expand Up @@ -1110,15 +1110,8 @@ 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 +1128,6 @@ public boolean deleteTemplate(String name) {
}

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

Expand Down

0 comments on commit 58c0dd1

Please sign in to comment.