This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git


The following commit(s) were added to refs/heads/main by this push:
     new dc6308e  Use current namespace instead of hardcoded
dc6308e is described below

commit dc6308ebee7051f73ebca355255441bd7453d8d6
Author: Marat Gubaidullin <[email protected]>
AuthorDate: Tue Oct 18 10:39:57 2022 -0400

    Use current namespace instead of hardcoded
---
 .../java/org/apache/camel/karavan/service/KubernetesService.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/karavan-app/src/main/java/org/apache/camel/karavan/service/KubernetesService.java
 
b/karavan-app/src/main/java/org/apache/camel/karavan/service/KubernetesService.java
index 8d348f2..aa6aa35 100644
--- 
a/karavan-app/src/main/java/org/apache/camel/karavan/service/KubernetesService.java
+++ 
b/karavan-app/src/main/java/org/apache/camel/karavan/service/KubernetesService.java
@@ -104,13 +104,13 @@ public class KubernetesService {
         Optional<KaravanConfiguration.Environment> env = 
config.environments().stream()
                 .filter(environment -> 
environment.name().equals("dev")).findFirst();
         if (env.isPresent()) {
-            
watches.add(kubernetesClient().apps().deployments().inNamespace(env.get().namespace())
+            
watches.add(kubernetesClient().apps().deployments().inNamespace(currentNamespace)
                     .watch(new DeploymentWatcher(infinispanService, this)));
 
-            
watches.add(kubernetesClient().pods().inNamespace(env.get().namespace()).withLabel("app.openshift.io/runtime",
 "camel")
+            
watches.add(kubernetesClient().pods().inNamespace(currentNamespace).withLabel("app.openshift.io/runtime",
 "camel")
                     .watch(new PodWatcher(infinispanService, this)));
 
-            
watches.add(tektonClient().v1beta1().pipelineRuns().inNamespace(env.get().namespace())
+            
watches.add(tektonClient().v1beta1().pipelineRuns().inNamespace(currentNamespace)
                     .watch(new PipelineRunWatcher(infinispanService)));
         }
     }

Reply via email to