You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2022/10/18 14:40:15 UTC

[camel-karavan] branch main updated: Use current namespace instead of hardcoded

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 <ma...@gmail.com>
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)));
         }
     }