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 e0ce2cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ After this we will switch probably to real [Semantic Versioning 2.0.0](http://se
* Feature 1498: Allow users to define secrets from annotations
* Feature 1498: Allow users to define secrets from annotations
* Fix 1522: Remove need to initialize DockerAccess when on Openshift
* Fix 1570: Failure in applying Deployments using fabric8-maven-plugin
* Fix 1517: update vmp groupid and vert.x version
* Feature 456: Add labels from label-schema.org to the generator images.

Expand Down
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 e0ce2cc

Please sign in to comment.