From 2927747cddce9c62c43b64f22120a163f593e5d2 Mon Sep 17 00:00:00 2001 From: Lukas Krejci Date: Mon, 3 Jun 2019 13:25:23 +0200 Subject: [PATCH 1/3] Initialize the empty binding for allowed environment type upgrades in kubernetes infrastructure. Signed-off-by: Lukas Krejci --- .../infrastructure/kubernetes/KubernetesInfraModule.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java index d4ab3fa1c8e..a65a95034ba 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java @@ -205,5 +205,8 @@ protected void configure() { binder(), KubernetesEnvironment.TYPE); KubernetesDevfileBindings.addKubernetesBasedComponentTypeBindings( binder(), KUBERNETES_COMPONENT_TYPE); + + KubernetesDevfileBindings.addAllowedEnvironmentTypeUpgradeBindings( + binder(), KubernetesEnvironment.TYPE); } } From 339db91da8125f6bf5f4c988add5aa5e2f681120 Mon Sep 17 00:00:00 2001 From: Lukas Krejci Date: Mon, 3 Jun 2019 13:42:46 +0200 Subject: [PATCH 2/3] Add an explanatory comment for how we initialize the environment upgrade bindings in k8s infra. Signed-off-by: Lukas Krejci --- .../infrastructure/kubernetes/KubernetesInfraModule.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java index a65a95034ba..5a5e3bf8acd 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java @@ -206,6 +206,8 @@ protected void configure() { KubernetesDevfileBindings.addKubernetesBasedComponentTypeBindings( binder(), KUBERNETES_COMPONENT_TYPE); + // We need to intialize the bindings somehow. Because no other environment type is upgradable + // to kubernetes, we just call this in a way that initializes the binding with an empty map. KubernetesDevfileBindings.addAllowedEnvironmentTypeUpgradeBindings( binder(), KubernetesEnvironment.TYPE); } From bb76592646234a2df387cc7f2c0a8175cdcabde4 Mon Sep 17 00:00:00 2001 From: Angel Misevski Date: Mon, 3 Jun 2019 14:35:32 +0200 Subject: [PATCH 3/3] Fix a typo in the comment Co-Authored-By: Angel Misevski Signed-off-by: Lukas Krejci --- .../infrastructure/kubernetes/KubernetesInfraModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java index 5a5e3bf8acd..bbb46f9f690 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfraModule.java @@ -206,7 +206,7 @@ protected void configure() { KubernetesDevfileBindings.addKubernetesBasedComponentTypeBindings( binder(), KUBERNETES_COMPONENT_TYPE); - // We need to intialize the bindings somehow. Because no other environment type is upgradable + // We need to initialize the bindings somehow. Because no other environment type is upgradable // to kubernetes, we just call this in a way that initializes the binding with an empty map. KubernetesDevfileBindings.addAllowedEnvironmentTypeUpgradeBindings( binder(), KubernetesEnvironment.TYPE);