Skip to content

Commit

Permalink
Fix fabric8io#1570: change API_APPS_VERSION to apps/v1
Browse files Browse the repository at this point in the history
Change API_APPS_VERSION to apps/v1 and move deployment fragment creation
with apps/v1 apiVersion rather than extensions
  • Loading branch information
rohanKanojia committed Mar 12, 2019
1 parent f253a34 commit 8ad7842
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public class KubernetesResourceUtil {

public static final String API_VERSION = "v1";
public static final String API_EXTENSIONS_VERSION = "extensions/v1beta1";
public static final String API_APPS_VERSION = "apps/v1beta1";
public static final String API_APPS_VERSION = "apps/v1";
public static final String JOB_VERSION = "batch/v1";
public static final String OPENSHIFT_V1_VERSION = "apps.openshift.io/v1";
public static final ResourceVersioning DEFAULT_RESOURCE_VERSIONING = new ResourceVersioning()
Expand Down Expand Up @@ -249,9 +249,9 @@ private static Map<String, Object> readAndEnrichFragment(PlatformMode platformMo
addKind(fragment, kind, file.getName());

String apiVersion = apiVersions.getCoreVersion();
if (Objects.equals(kind, "Deployment") || Objects.equals(kind, "Ingress")) {
if (Objects.equals(kind, "Ingress")) {
apiVersion = apiVersions.getExtensionsVersion();
} else if (Objects.equals(kind, "StatefulSet")) {
} else if (Objects.equals(kind, "StatefulSet") || Objects.equals(kind, "Deployment")) {
apiVersion = apiVersions.getAppsVersion();
} else if (Objects.equals(kind, "Job")) {
apiVersion = apiVersions.getJobVersion();
Expand Down

0 comments on commit 8ad7842

Please sign in to comment.