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/12/16 21:19:41 UTC

[camel-karavan] branch main updated (873dfa1 -> 27bc665)

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

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


    from 873dfa1  Rollback camel to 3.18 in karavan-app. it wont impact on projects created by karavan
     new 80fba68  jkube push stuff for #561
     new 27bc665  Unified pod label name for project (springboot and quarkus)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/java/org/apache/camel/karavan/informer/PodEventHandler.java | 2 +-
 .../src/main/resources/quarkus-builder-script-kubernetes.sh          | 1 +
 .../src/main/resources/quarkus-builder-script-openshift.sh           | 1 +
 .../src/main/resources/spring-boot-builder-script-kubernetes.sh      | 5 +++--
 .../src/main/resources/spring-boot-builder-script-openshift.sh       | 5 +++--
 5 files changed, 9 insertions(+), 5 deletions(-)


[camel-karavan] 01/02: jkube push stuff for #561

Posted by ma...@apache.org.
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

commit 80fba68834d9a3df916a61768d217b3714719632
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Fri Dec 16 13:25:32 2022 -0500

    jkube push stuff for #561
---
 .../src/main/resources/spring-boot-builder-script-kubernetes.sh      | 5 +++--
 .../src/main/resources/spring-boot-builder-script-openshift.sh       | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/karavan-operator/src/main/resources/spring-boot-builder-script-kubernetes.sh b/karavan-operator/src/main/resources/spring-boot-builder-script-kubernetes.sh
index 63a6e71..c2ea625 100644
--- a/karavan-operator/src/main/resources/spring-boot-builder-script-kubernetes.sh
+++ b/karavan-operator/src/main/resources/spring-boot-builder-script-kubernetes.sh
@@ -21,7 +21,8 @@ export DATE=$(date '+%Y%m%d%H%M%S')
 export TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
 export NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)
 
-/opt/mvnd/bin/mvnd package k8s:build k8s:resource k8s:apply \
+/opt/mvnd/bin/mvnd package k8s:build k8s:push k8s:resource k8s:apply \
   -Pkubernetes \
   -Djkube.namespace=${NAMESPACE} \
-  -Djkube.generator.name=${IMAGE_REGISTRY}/${NAMESPACE}/$NAME:${DATE} \
\ No newline at end of file
+  -Djkube.docker.push.registry=${IMAGE_REGISTRY} \
+  -Djkube.generator.name=${IMAGE_REGISTRY}/${NAMESPACE}/$(inputs.params.project):${DATE}
\ No newline at end of file
diff --git a/karavan-operator/src/main/resources/spring-boot-builder-script-openshift.sh b/karavan-operator/src/main/resources/spring-boot-builder-script-openshift.sh
index 50b1fb6..21a660c 100644
--- a/karavan-operator/src/main/resources/spring-boot-builder-script-openshift.sh
+++ b/karavan-operator/src/main/resources/spring-boot-builder-script-openshift.sh
@@ -21,7 +21,8 @@ export DATE=$(date '+%Y%m%d%H%M%S')
 export TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
 export NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)
 
-/opt/mvnd/bin/mvnd package oc:build oc:resource oc:apply \
+/opt/mvnd/bin/mvnd package oc:build oc:push oc:resource oc:apply \
   -Popenshift \
   -Djkube.namespace=${NAMESPACE} \
-  -Djkube.generator.name=${IMAGE_REGISTRY}/${NAMESPACE}/$NAME:${DATE} \
+  -Djkube.docker.push.registry=${IMAGE_REGISTRY} \
+  -Djkube.generator.name=${IMAGE_REGISTRY}/${NAMESPACE}/$(inputs.params.project):${DATE}


[camel-karavan] 02/02: Unified pod label name for project (springboot and quarkus)

Posted by ma...@apache.org.
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

commit 27bc6658071caac0f167002176e0e7dcca348ec3
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Fri Dec 16 16:19:29 2022 -0500

    Unified pod label name for project (springboot and quarkus)
---
 .../main/java/org/apache/camel/karavan/informer/PodEventHandler.java    | 2 +-
 .../src/main/resources/quarkus-builder-script-kubernetes.sh             | 1 +
 karavan-operator/src/main/resources/quarkus-builder-script-openshift.sh | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/karavan-app/src/main/java/org/apache/camel/karavan/informer/PodEventHandler.java b/karavan-app/src/main/java/org/apache/camel/karavan/informer/PodEventHandler.java
index 0f960bf..1e89077 100644
--- a/karavan-app/src/main/java/org/apache/camel/karavan/informer/PodEventHandler.java
+++ b/karavan-app/src/main/java/org/apache/camel/karavan/informer/PodEventHandler.java
@@ -60,7 +60,7 @@ public class PodEventHandler implements ResourceEventHandler<Pod> {
 
 
     public PodStatus getPodStatus(Pod pod) {
-        String deployment = pod.getMetadata().getLabels().get("app.kubernetes.io/name");
+        String deployment = pod.getMetadata().getLabels().get("app");
         try {
             Optional<PodCondition> initialized = pod.getStatus().getConditions().stream().filter(c -> c.getType().equals("Initialized")).findFirst();
             Optional<PodCondition> ready = pod.getStatus().getConditions().stream().filter(c -> c.getType().equals("Initialized")).findFirst();
diff --git a/karavan-operator/src/main/resources/quarkus-builder-script-kubernetes.sh b/karavan-operator/src/main/resources/quarkus-builder-script-kubernetes.sh
index 91d4aa3..608cb81 100644
--- a/karavan-operator/src/main/resources/quarkus-builder-script-kubernetes.sh
+++ b/karavan-operator/src/main/resources/quarkus-builder-script-kubernetes.sh
@@ -32,6 +32,7 @@ export NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)
   -Dquarkus.kubernetes.deploy=true \
   -Dquarkus.kubernetes.deployment-target=kubernetes \
   -Dquarkus.kubernetes.add-version-to-label-selectors=false \
+  -Dquarkus.openshift.labels.\"app\"=$(inputs.params.project) \
   -Dquarkus.kubernetes.labels.\"app.kubernetes.io/runtime\"=camel \
   -Dquarkus.container-image.group=${NAMESPACE} \
   -Dquarkus.container-image.tag=${DATE}
\ No newline at end of file
diff --git a/karavan-operator/src/main/resources/quarkus-builder-script-openshift.sh b/karavan-operator/src/main/resources/quarkus-builder-script-openshift.sh
index 6fbb623..71e181d 100644
--- a/karavan-operator/src/main/resources/quarkus-builder-script-openshift.sh
+++ b/karavan-operator/src/main/resources/quarkus-builder-script-openshift.sh
@@ -34,6 +34,7 @@ export NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)
   -Dquarkus.kubernetes.deploy=true \
   -Dquarkus.openshift.deployment-kind=Deployment \
   -Dquarkus.openshift.add-version-to-label-selectors=false \
+  -Dquarkus.openshift.labels.\"app\"=$(inputs.params.project) \
   -Dquarkus.openshift.labels.\"app.openshift.io/runtime\"=camel \
   -Dquarkus.container-image.group=${NAMESPACE} \
   -Dquarkus.container-image.tag=${DATE}
\ No newline at end of file