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/06/23 17:44:51 UTC

[camel-karavan] branch main updated: Saas feature12 (#390)

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 fb44516  Saas feature12 (#390)
fb44516 is described below

commit fb44516024c08d4df3337a676b6cd5484b45773c
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Thu Jun 23 13:44:46 2022 -0400

    Saas feature12 (#390)
    
    * Tekton pipeline run access
    
    * Git secrets config
---
 karavan-app/pom.xml                                |   8 -
 .../org/apache/camel/karavan/api/GitResource.java  |  16 +-
 .../org/apache/camel/karavan/model/GitConfig.java  |  47 +++++
 .../apache/camel/karavan/service/GitService.java   | 194 +++++++--------------
 .../camel/karavan/service/KubernetesService.java   |  32 +++-
 .../src/main/resources/application.properties      |  18 +-
 karavan-builder/openshift/karavan-acl.yaml         |   2 +-
 karavan-builder/openshift/karavan-app.yaml         |  40 ++---
 8 files changed, 166 insertions(+), 191 deletions(-)

diff --git a/karavan-app/pom.xml b/karavan-app/pom.xml
index da17be1..9f6169f 100644
--- a/karavan-app/pom.xml
+++ b/karavan-app/pom.xml
@@ -83,14 +83,6 @@
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-smallrye-health</artifactId>
         </dependency>
-        <dependency>
-            <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-kubernetes-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-openshift</artifactId>
-        </dependency>
         <dependency>
             <groupId>io.fabric8</groupId>
             <artifactId>tekton-client</artifactId>
diff --git a/karavan-app/src/main/java/org/apache/camel/karavan/api/GitResource.java b/karavan-app/src/main/java/org/apache/camel/karavan/api/GitResource.java
index 5fa989f..1907537 100644
--- a/karavan-app/src/main/java/org/apache/camel/karavan/api/GitResource.java
+++ b/karavan-app/src/main/java/org/apache/camel/karavan/api/GitResource.java
@@ -17,34 +17,20 @@
 package org.apache.camel.karavan.api;
 
 import io.vertx.core.Vertx;
-import org.apache.camel.karavan.KaravanLifecycleBean;
 import org.apache.camel.karavan.model.Project;
 import org.apache.camel.karavan.model.ProjectFile;
 import org.apache.camel.karavan.service.GitService;
 import org.apache.camel.karavan.service.InfinispanService;
-import org.eclipse.jgit.api.Git;
 import org.jboss.logging.Logger;
 
 import javax.inject.Inject;
 import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
 import javax.ws.rs.HeaderParam;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import java.io.File;
-import java.io.IOException;
-import java.net.URLDecoder;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.Comparator;
 import java.util.List;
-import java.util.UUID;
-import java.util.stream.Collectors;
 
 @Path("/git")
 public class GitResource {
@@ -66,7 +52,7 @@ public class GitResource {
     public Project push(@HeaderParam("username") String username, Project project) throws Exception {
         Project p = infinispanService.getProject(project.getProjectId());
         List<ProjectFile> files = infinispanService.getProjectFiles(project.getProjectId());
-        String commitId = gitService.save(p, files);
+        String commitId = gitService.commitAndPushProject(p, files);
         p.setLastCommit(commitId);
         infinispanService.saveProject(p);
         return p;
diff --git a/karavan-app/src/main/java/org/apache/camel/karavan/model/GitConfig.java b/karavan-app/src/main/java/org/apache/camel/karavan/model/GitConfig.java
new file mode 100644
index 0000000..2a5ac15
--- /dev/null
+++ b/karavan-app/src/main/java/org/apache/camel/karavan/model/GitConfig.java
@@ -0,0 +1,47 @@
+package org.apache.camel.karavan.model;
+
+public class GitConfig {
+    private String uri;
+    private String username;
+    private String password;
+    private String mainBranch;
+
+    public GitConfig(String uri, String username, String password, String mainBranch) {
+        this.uri = uri;
+        this.username = username;
+        this.password = password;
+        this.mainBranch = mainBranch;
+    }
+
+    public String getUri() {
+        return uri;
+    }
+
+    public void setUri(String uri) {
+        this.uri = uri;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getMainBranch() {
+        return mainBranch;
+    }
+
+    public void setMainBranch(String mainBranch) {
+        this.mainBranch = mainBranch;
+    }
+}
diff --git a/karavan-app/src/main/java/org/apache/camel/karavan/service/GitService.java b/karavan-app/src/main/java/org/apache/camel/karavan/service/GitService.java
index 44fa655..e26bb1a 100644
--- a/karavan-app/src/main/java/org/apache/camel/karavan/service/GitService.java
+++ b/karavan-app/src/main/java/org/apache/camel/karavan/service/GitService.java
@@ -16,89 +16,98 @@
  */
 package org.apache.camel.karavan.service;
 
+import io.fabric8.kubernetes.api.model.Secret;
 import io.quarkus.runtime.StartupEvent;
 import io.vertx.core.Vertx;
+import org.apache.camel.karavan.model.GitConfig;
 import org.apache.camel.karavan.model.Project;
 import org.apache.camel.karavan.model.ProjectFile;
 import org.eclipse.jgit.api.*;
 import org.eclipse.jgit.api.errors.GitAPIException;
-import org.eclipse.jgit.api.errors.RefNotAdvertisedException;
 import org.eclipse.jgit.api.errors.RefNotFoundException;
 import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.storage.file.FileBasedConfig;
+import org.eclipse.jgit.transport.CredentialsProvider;
 import org.eclipse.jgit.transport.PushResult;
 import org.eclipse.jgit.transport.URIish;
 import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
-import org.eclipse.microprofile.config.inject.ConfigProperty;
+import org.eclipse.microprofile.config.ConfigProvider;
 import org.jboss.logging.Logger;
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.event.Observes;
 import javax.inject.Inject;
+import java.io.File;
 import java.io.IOException;
 import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.time.LocalDate;
+import java.util.Base64;
 import java.util.List;
+import java.util.Objects;
 import java.util.UUID;
 
 @ApplicationScoped
 public class GitService {
 
-    @ConfigProperty(name = "karavan.folder.integrations")
-    String integrations;
-
-    @ConfigProperty(name = "karavan.git.uri")
-    String uri;
-
-    @ConfigProperty(name = "karavan.git.username")
-    String username;
-
-    @ConfigProperty(name = "karavan.git.password")
-    String password;
-
-    @ConfigProperty(name = "karavan.git.main")
-    String mainBranch;
-
     @Inject
     Vertx vertx;
 
+    @Inject
+    KubernetesService kubernetesService;
+
     private static final Logger LOGGER = Logger.getLogger(GitService.class.getName());
 
     void onStart(@Observes StartupEvent ev) {
-        LOGGER.info("Git service for repo: " + uri);
-    }
-
-    public static void main(String[] args) throws GitAPIException, IOException, URISyntaxException {
-        GitService g = new GitService();
-        g.save("cameleer", "xxx.yaml", "yaml");
+        LOGGER.info("Git service for repo: " + getGitConfig().getUri());
+    }
+
+    private GitConfig getGitConfig() {
+        String mainBranch = ConfigProvider.getConfig().getValue("karavan.git-main", String.class);
+        if (kubernetesService.inKubernetes()){
+            Secret secret =  kubernetesService.getKaravanSecret();
+            String uri = new String(Base64.getDecoder().decode(secret.getData().get("git-repository").getBytes(StandardCharsets.UTF_8)));
+            String username = new String(Base64.getDecoder().decode(secret.getData().get("git-username").getBytes(StandardCharsets.UTF_8)));
+            String password = new String(Base64.getDecoder().decode(secret.getData().get("git-password").getBytes(StandardCharsets.UTF_8)));
+            return new GitConfig(uri, username, password, mainBranch);
+        } else {
+            String uri = ConfigProvider.getConfig().getValue("karavan.git-repository", String.class);
+            String username = ConfigProvider.getConfig().getValue("karavan.git-username", String.class);
+            String password = ConfigProvider.getConfig().getValue("karavan.git-password", String.class);
+            return new GitConfig(uri, username, password, mainBranch);
+        }
     }
 
-    public String save(Project project, List<ProjectFile> files) throws GitAPIException, IOException, URISyntaxException {
-        LOGGER.info("Save project " + project.getProjectId());
+    public String commitAndPushProject(Project project, List<ProjectFile> files) throws GitAPIException, IOException, URISyntaxException {
+        LOGGER.info("Commit and push project " + project.getProjectId());
+        GitConfig gitConfig = getGitConfig();
+        CredentialsProvider cred = new UsernamePasswordCredentialsProvider(gitConfig.getUsername(), gitConfig.getPassword());
         String uuid = UUID.randomUUID().toString();
         String folder = vertx.fileSystem().createTempDirectoryBlocking(uuid);
         LOGGER.infof("Temp folder created: {}", folder);
         Git git = null;
         try {
-            git = clone(folder);
-            checkout(git, false, null, null);
+            git = clone(folder, gitConfig.getUri(), gitConfig.getMainBranch(), cred);
+            checkout(git, false, null, null, gitConfig.getMainBranch());
         } catch (RefNotFoundException e) {
             LOGGER.error("New repository");
-            git = init(folder);
+            git = init(folder, gitConfig.getUri(), gitConfig.getMainBranch());
         } catch (Exception e) {
             LOGGER.error("Error", e);
         }
         writeProjectToFolder(folder, project, files);
-        return commitAddedAndPush(git).getId().getName();
+        addDeletedFilesToIndex(git, folder, project, files);
+        return commitAddedAndPush(git, gitConfig.getMainBranch(), cred).getId().getName();
     }
 
     private void writeProjectToFolder(String folder, Project project, List<ProjectFile> files) throws IOException {
         Files.createDirectories(Paths.get(folder, project.getProjectId()));
+        LOGGER.info("Write files for project " + project.getProjectId());
         files.forEach(file -> {
             try {
+                LOGGER.info("Add file " + file.getName());
                 Files.writeString(Paths.get(folder, project.getProjectId(), file.getName()), file.getCode());
             } catch (IOException e) {
                 throw new RuntimeException(e);
@@ -106,101 +115,51 @@ public class GitService {
         });
     }
 
-    public void save(String branch, String fileName, String yaml) throws GitAPIException, IOException, URISyntaxException {
-        LOGGER.info("Save " + fileName);
-        String dir = vertx.fileSystem().createTempDirectoryBlocking(branch);
-        Git git = null;
-        try {
-            git = clone(dir);
-            checkout(git, false, null, null);
-        } catch (RefNotFoundException e) {
-            LOGGER.error("New repository");
-            git = init(branch, dir);
-        } catch (Exception e) {
-            LOGGER.error("Error", e);
-        }
-//        fileSystemService.saveFile(dir, fileName, yaml);
-        commitAddedAndPush(git, branch, fileName);
-    }
-
-
-    public void delete(String branch, String fileName) throws GitAPIException, IOException, URISyntaxException {
-        LOGGER.info("Delete " + fileName);
-        String dir = pullIntegrations(branch);
-        Git git = Git.open(Path.of(dir).toFile());
-//        fileSystemService.delete(dir, fileName);
-        commitDeletedAndPush(git, branch, fileName);
+    private void addDeletedFilesToIndex(Git git, String folder, Project project, List<ProjectFile> files) throws IOException {
+        Path path = Paths.get(folder, project.getProjectId());
+        LOGGER.info("Add deleted files to git index for project " + project.getProjectId());
+        vertx.fileSystem().readDirBlocking(path.toString()).forEach(f -> {
+            String[] filenames = f.split(File.separator);
+            String filename = filenames[filenames.length -1];
+            LOGGER.info("Checking file " + filename);
+            if (files.stream().filter(pf -> Objects.equals(pf.getName(), filename)).count() == 0){
+                try {
+                    LOGGER.info("Add deleted file " + filename);
+                    git.rm().addFilepattern(project.getProjectId() + File.separator + filename).call();
+                } catch (GitAPIException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        });
     }
 
-    public RevCommit commitAddedAndPush(Git git) throws GitAPIException, IOException, URISyntaxException {
+    public RevCommit commitAddedAndPush(Git git, String branch, CredentialsProvider cred) throws GitAPIException, IOException, URISyntaxException {
         LOGGER.info("Commit and push changes");
         LOGGER.info("Git add: " + git.add().addFilepattern(".").call());
         RevCommit commit = git.commit().setMessage(LocalDate.now().toString()).call();
         LOGGER.info("Git commit: " + commit);
-        Iterable<PushResult> result = git.push().add(mainBranch).setRemote("origin").setCredentialsProvider(new UsernamePasswordCredentialsProvider(username, password)).call();
+        Iterable<PushResult> result = git.push().add(branch).setRemote("origin").setCredentialsProvider(cred).call();
         LOGGER.info("Git push: " + result);
         return commit;
     }
 
-    public void commitAddedAndPush(Git git, String branch, String fileName) throws GitAPIException, IOException, URISyntaxException {
-        LOGGER.info("Commit and push changes for " + fileName);
-        LOGGER.info("Git add: " + git.add().addFilepattern(fileName).call());
-        LOGGER.info("Git commit: " + git.commit().setMessage(LocalDate.now().toString()).call());
-        LOGGER.info("Git push: " + git.push().add(branch).setRemote("origin").setCredentialsProvider(new UsernamePasswordCredentialsProvider(username, password)).call());
-    }
-
-    public void commitDeletedAndPush(Git git, String branch, String fileName) throws GitAPIException, IOException, URISyntaxException {
-        LOGGER.info("Commit and push changes for " + fileName);
-        LOGGER.info("Git add: " + git.add().addFilepattern(fileName).call());
-        LOGGER.info("Git commit: " + git.commit().setAll(true).setMessage(LocalDate.now().toString()).call());
-        LOGGER.info("Git push: " + git.push().add(branch).setRemote("origin").setCredentialsProvider(new UsernamePasswordCredentialsProvider(username, password)).call());
-    }
-
-    public String pullIntegrations(String branch) throws GitAPIException {
-        String dir = vertx.fileSystem().createTempDirectoryBlocking(branch);
-        LOGGER.info("Pulling into " + dir);
-        try {
-            Git git = clone(dir);
-            LOGGER.info("Git pull branch : " + git.pull().call());
-//            if (fileSystemService.getIntegrationList(dir).isEmpty()) {
-//                LOGGER.info("Git pull remote branch : " + git.pull().setRemoteBranchName(mainBranch).call());
-//            }
-        } catch (RefNotAdvertisedException e) {
-            LOGGER.error("New repository");
-        } catch (Exception e) {
-            LOGGER.error("Error", e);
-        }
-        return dir;
-    }
-
-    public Git init(String branch, String dir) throws GitAPIException, IOException, URISyntaxException {
-        Git git = Git.init().setInitialBranch(mainBranch).setDirectory(Path.of(dir).toFile()).call();
-        Files.writeString(Path.of(dir).resolve("README.md"), "#Karavan");
-        git.add().addFilepattern("README.md").call();
-        git.commit().setMessage("initial commit").call();
-        addRemote(git);
-        push(git);
-        checkout(git, true, null, null);
+    public Git init(String dir, String uri, String branch) throws GitAPIException, IOException, URISyntaxException {
+        Git git = Git.init().setInitialBranch(branch).setDirectory(Path.of(dir).toFile()).call();
+        addRemote(git, uri);
         return git;
     }
 
-    public Git init(String dir) throws GitAPIException, IOException, URISyntaxException {
-        Git git = Git.init().setInitialBranch(mainBranch).setDirectory(Path.of(dir).toFile()).call();
-        addRemote(git);
-        return git;
-    }
-
-    private Git clone(String dir) throws GitAPIException {
+    private Git clone(String dir, String uri, String branch, CredentialsProvider cred) throws GitAPIException {
         CloneCommand cloneCommand = Git.cloneRepository();
         cloneCommand.setCloneAllBranches(false);
         cloneCommand.setDirectory(Paths.get(dir).toFile());
         cloneCommand.setURI(uri);
-        cloneCommand.setBranch(mainBranch);
-        cloneCommand.setCredentialsProvider(new UsernamePasswordCredentialsProvider(username, password));
+        cloneCommand.setBranch(branch);
+        cloneCommand.setCredentialsProvider(cred);
         return cloneCommand.call();
     }
 
-    private void addRemote(Git git) throws URISyntaxException, GitAPIException {
+    private void addRemote(Git git, String uri) throws URISyntaxException, GitAPIException {
         // add remote repo:
         RemoteAddCommand remoteAddCommand = git.remoteAdd();
         remoteAddCommand.setName("origin");
@@ -208,10 +167,10 @@ public class GitService {
         remoteAddCommand.call();
     }
 
-    private void checkout(Git git, boolean create, String path, String startPoint) throws GitAPIException {
+    private void checkout(Git git, boolean create, String path, String startPoint, String branch) throws GitAPIException {
         // create branch:
         CheckoutCommand checkoutCommand = git.checkout();
-        checkoutCommand.setName(mainBranch);
+        checkoutCommand.setName(branch);
         checkoutCommand.setCreateBranch(create);
         if (startPoint != null){
             checkoutCommand.setStartPoint(startPoint);
@@ -221,25 +180,4 @@ public class GitService {
         }
         checkoutCommand.call();
     }
-
-    private void createBranch(Git git, String branch) throws GitAPIException {
-        // create branch:
-        CreateBranchCommand branchCreate = git.branchCreate();
-        branchCreate.setName(branch);
-        branchCreate.call();
-    }
-
-    private void push(Git git) throws GitAPIException {
-        // push to remote:
-        PushCommand pushCommand = git.push();
-        pushCommand.setCredentialsProvider(new UsernamePasswordCredentialsProvider(username, password));
-        pushCommand.call();
-    }
-
-    public void pull(Git git) throws GitAPIException {
-        // push to remote:
-        PullCommand pullCommand = git.pull();
-        pullCommand.setCredentialsProvider(new UsernamePasswordCredentialsProvider(username, password));
-        pullCommand.call();
-    }
 }
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 7a5f221..9433c0e 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
@@ -18,7 +18,9 @@ package org.apache.camel.karavan.service;
 
 import io.fabric8.kubernetes.api.model.ObjectMeta;
 import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
+import io.fabric8.kubernetes.api.model.Secret;
 import io.fabric8.kubernetes.client.DefaultKubernetesClient;
+import io.fabric8.kubernetes.client.KubernetesClient;
 import io.fabric8.tekton.client.DefaultTektonClient;
 import io.fabric8.tekton.pipeline.v1beta1.ParamBuilder;
 import io.fabric8.tekton.pipeline.v1beta1.PipelineRef;
@@ -34,21 +36,29 @@ import org.jboss.logging.Logger;
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.Produces;
 import java.util.Map;
+import java.util.Objects;
 
 @ApplicationScoped
 public class KubernetesService {
 
-    @ConfigProperty(name = "karavan.config.runtime")
-    String runtime;
+
+    @ConfigProperty(name = "kubernetes.namespace", defaultValue = "localhost")
+    String namespace;
+
+    @Produces
+    public KubernetesClient kubernetesClient() {
+        return new DefaultKubernetesClient();
+    }
 
     @Produces
     public DefaultTektonClient tektonClient() {
-        return new DefaultTektonClient(new DefaultKubernetesClient());
+        return new DefaultTektonClient(kubernetesClient());
     }
 
     private static final Logger LOGGER = Logger.getLogger(KubernetesService.class.getName());
 
     public String createPipelineRun(Project project, String namespace) throws Exception {
+        LOGGER.info("Pipeline is creating for " + project.getProjectId());
 
         Map<String, String> labels = Map.of(
                 "karavan-project-id", project.getProjectId(),
@@ -69,14 +79,24 @@ public class KubernetesService {
                 .withParams(new ParamBuilder().withName("PROJECT_NAME").withNewValue(project.getProjectId()).build())
                 .build();
 
-        PipelineRunBuilder pipelineRun = new PipelineRunBuilder()
+        PipelineRunBuilder pipelineRunBuilder = new PipelineRunBuilder()
                 .withMetadata(meta)
                 .withSpec(spec);
 
-        return tektonClient().v1beta1().pipelineRuns().create(pipelineRun.build()).getMetadata().getName();
+        PipelineRun pipelineRun = tektonClient().v1beta1().pipelineRuns().create(pipelineRunBuilder.build());
+        LOGGER.info("Pipeline run started " + pipelineRun.getMetadata().getName());
+        return pipelineRun.getMetadata().getName();
     }
 
-    public PipelineRun getPipelineRun(String name, String namespace) throws Exception {
+    public PipelineRun getPipelineRun(String name, String namespace)  {
         return tektonClient().v1beta1().pipelineRuns().inNamespace(namespace).withName(name).get();
     }
+
+    public Secret getKaravanSecret() {
+        return kubernetesClient().secrets().inNamespace(namespace).withName("karavan").get();
+    }
+
+    public boolean inKubernetes(){
+        return !Objects.equals(namespace, "localhost");
+    }
 }
diff --git a/karavan-app/src/main/resources/application.properties b/karavan-app/src/main/resources/application.properties
index 2fe8ecb..ddf8e4d 100644
--- a/karavan-app/src/main/resources/application.properties
+++ b/karavan-app/src/main/resources/application.properties
@@ -9,25 +9,17 @@ karavan.folder.integrations=integrations
 %dev.karavan.folder.integrations=target/classes/integrations
 
 # Git repository Configuration
-quarkus.openshift.env.secrets=karavan
-quarkus.openshift.env.mapping.git-repository.from-secret=karavan
-quarkus.openshift.env.mapping.git-repository.with-key=git-repository
-quarkus.openshift.env.mapping.git-username.from-secret=karavan
-quarkus.openshift.env.mapping.git-username.with-key=git-username
-quarkus.openshift.env.mapping.git-token.from-secret=karavan
-quarkus.openshift.env.mapping.git-token.with-key=git-token
-
-karavan.git.uri=${GIT_REPOSITORY}
-karavan.git.username=${GIT_USERNAME}
-karavan.git.password=${GIT_TOKEN}
-karavan.git.main=main
+karavan.git-repository=${GIT_REPOSITORY}
+karavan.git-username=${GIT_USERNAME}
+karavan.git-password=${GIT_TOKEN}
+karavan.git-main=main
 
 
 # Projects configuration
 karavan.config.group-id=org.camel.karavan.demo
 karavan.config.image-group=karavan
 karavan.config.runtime=QUARKUS
-karavan.config.runtime-version=2.9.2.Final
+karavan.config.runtime-version=2.10.0.Final
 karavan.config.environments[0].name=dev
 karavan.config.environments[0].namespace=karavan
 karavan.config.environments[0].cluster=kubernetes.default.svc
diff --git a/karavan-builder/openshift/karavan-acl.yaml b/karavan-builder/openshift/karavan-acl.yaml
index ab97714..015c67a 100644
--- a/karavan-builder/openshift/karavan-acl.yaml
+++ b/karavan-builder/openshift/karavan-acl.yaml
@@ -34,7 +34,7 @@ rules:
     apiGroups:
       - tekton.dev
     resources:
-      - pipelinerun
+      - pipelineruns
 ---
 # Role bindings
 kind: RoleBinding
diff --git a/karavan-builder/openshift/karavan-app.yaml b/karavan-builder/openshift/karavan-app.yaml
index 45e7cf2..6f98794 100644
--- a/karavan-builder/openshift/karavan-app.yaml
+++ b/karavan-builder/openshift/karavan-app.yaml
@@ -65,26 +65,26 @@ spec:
             - containerPort: 8080
               name: http
               protocol: TCP
-          livenessProbe:
-            failureThreshold: 3
-            httpGet:
-              path: /q/health/live
-              port: 8080
-              scheme: HTTP
-            initialDelaySeconds: 0
-            periodSeconds: 30
-            successThreshold: 1
-            timeoutSeconds: 10
-          readinessProbe:
-            failureThreshold: 3
-            httpGet:
-              path: /q/health/ready
-              port: 8080
-              scheme: HTTP
-            initialDelaySeconds: 0
-            periodSeconds: 30
-            successThreshold: 1
-            timeoutSeconds: 10    
+          # livenessProbe:
+          #   failureThreshold: 3
+          #   httpGet:
+          #     path: /q/health/live
+          #     port: 8080
+          #     scheme: HTTP
+          #   initialDelaySeconds: 0
+          #   periodSeconds: 30
+          #   successThreshold: 1
+          #   timeoutSeconds: 10
+          # readinessProbe:
+          #   failureThreshold: 3
+          #   httpGet:
+          #     path: /q/health/ready
+          #     port: 8080
+          #     scheme: HTTP
+          #   initialDelaySeconds: 0
+          #   periodSeconds: 30
+          #   successThreshold: 1
+          #   timeoutSeconds: 10    
       volumes:
         - name: karavan-data
           persistentVolumeClaim: