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 977b848  Multiple improvements (#389)
977b848 is described below

commit 977b848ce5e12d30a23afd830aaa678c4639df10
Author: Marat Gubaidullin <[email protected]>
AuthorDate: Thu Jun 23 11:05:59 2022 -0400

    Multiple improvements (#389)
---
 karavan-app/pom.xml                                | 12 ++++
 .../apache/camel/karavan/api/TektonResource.java   |  2 -
 .../camel/karavan/health/KaravanLiveness.java      | 17 +++++
 .../camel/karavan/health/KaravanReadiness.java     | 17 +++++
 .../apache/camel/karavan/service/GitService.java   |  8 +--
 .../src/main/resources/application.properties      |  2 +
 .../src/main/webapp/src/builder/BuilderPage.tsx    | 16 +++++
 .../src/main/webapp/src/builder/FileSelector.tsx   | 16 +++++
 .../main/webapp/src/builder/ProfileSelector.tsx    | 16 +++++
 .../main/webapp/src/builder/PropertiesTable.tsx    | 16 +++++
 .../main/webapp/src/components/ComponentCard.tsx   | 17 ++++-
 .../main/webapp/src/components/ComponentModal.tsx  | 16 +++++
 .../main/webapp/src/components/ComponentsPage.tsx  | 16 +++++
 karavan-app/src/main/webapp/src/eip/EipCard.tsx    | 16 +++++
 karavan-app/src/main/webapp/src/eip/EipModal.tsx   | 16 +++++
 karavan-app/src/main/webapp/src/eip/EipPage.tsx    | 16 +++++
 .../src/main/webapp/src/kamelets/KameletCard.tsx   | 16 +++++
 .../src/main/webapp/src/kamelets/KameletModal.tsx  | 16 +++++
 .../src/main/webapp/src/kamelets/KameletsPage.tsx  | 16 +++++
 karavan-builder/openshift/karavan-acl.yaml         | 77 ++++++++++++++++++++++
 karavan-builder/openshift/karavan-app.yaml         | 21 ++++++
 karavan-builder/openshift/karavan-namespace.yaml   |  4 ++
 karavan-builder/openshift/kustomization.yaml       |  2 +
 23 files changed, 361 insertions(+), 10 deletions(-)

diff --git a/karavan-app/pom.xml b/karavan-app/pom.xml
index 086b59b..da17be1 100644
--- a/karavan-app/pom.xml
+++ b/karavan-app/pom.xml
@@ -79,6 +79,18 @@
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-kubernetes-client</artifactId>
         </dependency>
+        <dependency>
+            <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/TektonResource.java 
b/karavan-app/src/main/java/org/apache/camel/karavan/api/TektonResource.java
index d2c98ef..8b4777a 100644
--- a/karavan-app/src/main/java/org/apache/camel/karavan/api/TektonResource.java
+++ b/karavan-app/src/main/java/org/apache/camel/karavan/api/TektonResource.java
@@ -16,10 +16,8 @@
  */
 package org.apache.camel.karavan.api;
 
-import io.fabric8.tekton.pipeline.v1beta1.PipelineRun;
 import org.apache.camel.karavan.model.KaravanConfiguration;
 import org.apache.camel.karavan.model.Project;
-import org.apache.camel.karavan.model.ProjectFile;
 import org.apache.camel.karavan.service.InfinispanService;
 import org.apache.camel.karavan.service.KubernetesService;
 import org.jboss.logging.Logger;
diff --git 
a/karavan-app/src/main/java/org/apache/camel/karavan/health/KaravanLiveness.java
 
b/karavan-app/src/main/java/org/apache/camel/karavan/health/KaravanLiveness.java
new file mode 100644
index 0000000..e08c3ad
--- /dev/null
+++ 
b/karavan-app/src/main/java/org/apache/camel/karavan/health/KaravanLiveness.java
@@ -0,0 +1,17 @@
+package org.apache.camel.karavan.health;
+
+import org.eclipse.microprofile.health.HealthCheck;
+import org.eclipse.microprofile.health.HealthCheckResponse;
+import org.eclipse.microprofile.health.Liveness;
+
+import javax.enterprise.context.ApplicationScoped;
+
+@Liveness
+@ApplicationScoped
+public class KaravanLiveness implements HealthCheck {
+
+    @Override
+    public HealthCheckResponse call() {
+        return HealthCheckResponse.up("Karavan in running");
+    }
+}
diff --git 
a/karavan-app/src/main/java/org/apache/camel/karavan/health/KaravanReadiness.java
 
b/karavan-app/src/main/java/org/apache/camel/karavan/health/KaravanReadiness.java
new file mode 100644
index 0000000..1faeb3b
--- /dev/null
+++ 
b/karavan-app/src/main/java/org/apache/camel/karavan/health/KaravanReadiness.java
@@ -0,0 +1,17 @@
+package org.apache.camel.karavan.health;
+
+import org.eclipse.microprofile.health.HealthCheck;
+import org.eclipse.microprofile.health.HealthCheckResponse;
+import org.eclipse.microprofile.health.Readiness;
+
+import javax.enterprise.context.ApplicationScoped;
+
+@Readiness
+@ApplicationScoped
+public class KaravanReadiness implements HealthCheck {
+
+    @Override
+    public HealthCheckResponse call() {
+        return HealthCheckResponse.up("Karavan in ready");
+    }
+}
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 7cf37a2..44fa655 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
@@ -25,6 +25,7 @@ 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.PushResult;
 import org.eclipse.jgit.transport.URIish;
 import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
@@ -70,13 +71,6 @@ public class GitService {
         LOGGER.info("Git service for repo: " + uri);
     }
 
-    public void cloneRepo() throws GitAPIException {
-        LOGGER.info("Cloning repository...");
-        try (Git git = 
Git.cloneRepository().setDirectory(Path.of(integrations).toFile()).setURI(uri).call())
 {
-            LOGGER.info("Git status: " + git.status().call());
-        }
-    }
-
     public static void main(String[] args) throws GitAPIException, 
IOException, URISyntaxException {
         GitService g = new GitService();
         g.save("cameleer", "xxx.yaml", "yaml");
diff --git a/karavan-app/src/main/resources/application.properties 
b/karavan-app/src/main/resources/application.properties
index b3724db..2fe8ecb 100644
--- a/karavan-app/src/main/resources/application.properties
+++ b/karavan-app/src/main/resources/application.properties
@@ -67,6 +67,8 @@ quarkus.container-image.builder=docker
 
 quarkus.kubernetes-client.trust-certs=true
 quarkus.kubernetes.deployment-target=openshift
+quarkus.kubernetes-config.enabled=true
+quarkus.kubernetes-config.secrets.enabled=true
 
 quarkus.openshift.route.expose=true
 quarkus.openshift.name=karavan
diff --git a/karavan-app/src/main/webapp/src/builder/BuilderPage.tsx 
b/karavan-app/src/main/webapp/src/builder/BuilderPage.tsx
index 5ffeed0..605521c 100644
--- a/karavan-app/src/main/webapp/src/builder/BuilderPage.tsx
+++ b/karavan-app/src/main/webapp/src/builder/BuilderPage.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     Badge,
diff --git a/karavan-app/src/main/webapp/src/builder/FileSelector.tsx 
b/karavan-app/src/main/webapp/src/builder/FileSelector.tsx
index 2d0f2ab..ead44b9 100644
--- a/karavan-app/src/main/webapp/src/builder/FileSelector.tsx
+++ b/karavan-app/src/main/webapp/src/builder/FileSelector.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     Button,
diff --git a/karavan-app/src/main/webapp/src/builder/ProfileSelector.tsx 
b/karavan-app/src/main/webapp/src/builder/ProfileSelector.tsx
index b5f4351..ef140a4 100644
--- a/karavan-app/src/main/webapp/src/builder/ProfileSelector.tsx
+++ b/karavan-app/src/main/webapp/src/builder/ProfileSelector.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     Button,
diff --git a/karavan-app/src/main/webapp/src/builder/PropertiesTable.tsx 
b/karavan-app/src/main/webapp/src/builder/PropertiesTable.tsx
index f59cec6..e3f5958 100644
--- a/karavan-app/src/main/webapp/src/builder/PropertiesTable.tsx
+++ b/karavan-app/src/main/webapp/src/builder/PropertiesTable.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     Button, Flex, FlexItem,
diff --git a/karavan-app/src/main/webapp/src/components/ComponentCard.tsx 
b/karavan-app/src/main/webapp/src/components/ComponentCard.tsx
index 925c720..6d465f3 100644
--- a/karavan-app/src/main/webapp/src/components/ComponentCard.tsx
+++ b/karavan-app/src/main/webapp/src/components/ComponentCard.tsx
@@ -1,9 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     CardHeader, Card, CardTitle, CardBody, CardActions, CardFooter,Badge
 } from '@patternfly/react-core';
 import '../designer/karavan.css';
-import {KameletModel} from "karavan-core/lib/model/KameletModels";
 import {camelIcon, CamelUi} from "../designer/utils/CamelUi";
 import {Component} from "karavan-core/lib/model/ComponentModels";
 
diff --git a/karavan-app/src/main/webapp/src/components/ComponentModal.tsx 
b/karavan-app/src/main/webapp/src/components/ComponentModal.tsx
index 04ad022..0e73bc4 100644
--- a/karavan-app/src/main/webapp/src/components/ComponentModal.tsx
+++ b/karavan-app/src/main/webapp/src/components/ComponentModal.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     Button,
diff --git a/karavan-app/src/main/webapp/src/components/ComponentsPage.tsx 
b/karavan-app/src/main/webapp/src/components/ComponentsPage.tsx
index f1b5dc8..182ce03 100644
--- a/karavan-app/src/main/webapp/src/components/ComponentsPage.tsx
+++ b/karavan-app/src/main/webapp/src/components/ComponentsPage.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     Toolbar,
diff --git a/karavan-app/src/main/webapp/src/eip/EipCard.tsx 
b/karavan-app/src/main/webapp/src/eip/EipCard.tsx
index 310d429..0fab47e 100644
--- a/karavan-app/src/main/webapp/src/eip/EipCard.tsx
+++ b/karavan-app/src/main/webapp/src/eip/EipCard.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     CardHeader, Card, CardTitle, CardBody, CardFooter,Badge
diff --git a/karavan-app/src/main/webapp/src/eip/EipModal.tsx 
b/karavan-app/src/main/webapp/src/eip/EipModal.tsx
index f6ee6d9..34777ca 100644
--- a/karavan-app/src/main/webapp/src/eip/EipModal.tsx
+++ b/karavan-app/src/main/webapp/src/eip/EipModal.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     Button,
diff --git a/karavan-app/src/main/webapp/src/eip/EipPage.tsx 
b/karavan-app/src/main/webapp/src/eip/EipPage.tsx
index dd6e301..352d59a 100644
--- a/karavan-app/src/main/webapp/src/eip/EipPage.tsx
+++ b/karavan-app/src/main/webapp/src/eip/EipPage.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     Toolbar,
diff --git a/karavan-app/src/main/webapp/src/kamelets/KameletCard.tsx 
b/karavan-app/src/main/webapp/src/kamelets/KameletCard.tsx
index 3708af8..31ac3c6 100644
--- a/karavan-app/src/main/webapp/src/kamelets/KameletCard.tsx
+++ b/karavan-app/src/main/webapp/src/kamelets/KameletCard.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     CardHeader, Card, CardTitle, CardBody, CardActions, CardFooter,Badge
diff --git a/karavan-app/src/main/webapp/src/kamelets/KameletModal.tsx 
b/karavan-app/src/main/webapp/src/kamelets/KameletModal.tsx
index fb9532d..270683a 100644
--- a/karavan-app/src/main/webapp/src/kamelets/KameletModal.tsx
+++ b/karavan-app/src/main/webapp/src/kamelets/KameletModal.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React, {Component} from 'react';
 import {
     Button,
diff --git a/karavan-app/src/main/webapp/src/kamelets/KameletsPage.tsx 
b/karavan-app/src/main/webapp/src/kamelets/KameletsPage.tsx
index f4c26ce..9176532 100644
--- a/karavan-app/src/main/webapp/src/kamelets/KameletsPage.tsx
+++ b/karavan-app/src/main/webapp/src/kamelets/KameletsPage.tsx
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
 import {
     Toolbar,
diff --git a/karavan-builder/openshift/karavan-acl.yaml 
b/karavan-builder/openshift/karavan-acl.yaml
new file mode 100644
index 0000000..ab97714
--- /dev/null
+++ b/karavan-builder/openshift/karavan-acl.yaml
@@ -0,0 +1,77 @@
+# Service account
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: karavan
+  labels:
+    app.kubernetes.io/name: karavan
+    app.openshift.io/runtime: camel
+---
+# Role view-secrets
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+  name: karavan-view-secrets
+rules:
+  - apiGroups:
+      - ""
+    resources:
+      - secrets
+    verbs:
+      - get
+---
+# Role tekton run pipeline
+kind: Role
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: karavan-tekton-run
+rules:
+  - verbs:
+      - get
+      - list
+      - watch
+      - create
+    apiGroups:
+      - tekton.dev
+    resources:
+      - pipelinerun
+---
+# Role bindings
+kind: RoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: karavan-tekton
+subjects:
+  - kind: ServiceAccount
+    name: karavan
+    namespace: karavan
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: Role
+  name: karavan-tekton-run
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+  name: karavan-view
+roleRef:
+  kind: ClusterRole
+  apiGroup: rbac.authorization.k8s.io
+  name: view
+subjects:
+  - kind: ServiceAccount
+    name: karavan
+    namespace: karavan
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+  name: karavan-view-secrets
+roleRef:
+  kind: Role
+  apiGroup: rbac.authorization.k8s.io
+  name: karavan-view-secrets
+subjects:
+  - kind: ServiceAccount
+    name: karavan
+    namespace: karavan
\ No newline at end of file
diff --git a/karavan-builder/openshift/karavan-app.yaml 
b/karavan-builder/openshift/karavan-app.yaml
index dab502b..45e7cf2 100644
--- a/karavan-builder/openshift/karavan-app.yaml
+++ b/karavan-builder/openshift/karavan-app.yaml
@@ -33,6 +33,7 @@ spec:
       labels:
         app: karavan
     spec:
+      serviceAccountName: karavan
       containers:
         - env:
             - name: KUBERNETES_NAMESPACE
@@ -64,6 +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    
       volumes:
         - name: karavan-data
           persistentVolumeClaim:
diff --git a/karavan-builder/openshift/karavan-namespace.yaml 
b/karavan-builder/openshift/karavan-namespace.yaml
new file mode 100644
index 0000000..768a8b5
--- /dev/null
+++ b/karavan-builder/openshift/karavan-namespace.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: karavan
\ No newline at end of file
diff --git a/karavan-builder/openshift/kustomization.yaml 
b/karavan-builder/openshift/kustomization.yaml
index 18072c7..b046577 100644
--- a/karavan-builder/openshift/kustomization.yaml
+++ b/karavan-builder/openshift/kustomization.yaml
@@ -2,6 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
 kind: Kustomization
 
 resources:
+- karavan-namespace.yaml
+- karavan-acl.yaml
 - karavan-pvc.yaml
 - karavan-secret.yaml
 - karavan-quarkus-task.yaml

Reply via email to