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 23:31:55 UTC
[camel-karavan] 01/02: Pod management
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 e16a2e373e5bf5547a50688140688cdef15a54d9
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Fri Dec 16 18:24:06 2022 -0500
Pod management
---
.../main/java/org/apache/camel/karavan/informer/PodEventHandler.java | 2 +-
.../java/org/apache/camel/karavan/operator/resource/KaravanRole.java | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
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 1e89077..78f01be 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
@@ -47,7 +47,7 @@ public class PodEventHandler implements ResourceEventHandler<Pod> {
public void onDelete(Pod pod, boolean deletedFinalStateUnknown) {
try {
LOGGER.info("onDelete " + pod.getMetadata().getName());
- String deployment = pod.getMetadata().getLabels().get("app.kubernetes.io/name");
+ String deployment = pod.getMetadata().getLabels().get("app");
PodStatus ps = new PodStatus(
pod.getMetadata().getName(),
deployment,
diff --git a/karavan-operator/src/main/java/org/apache/camel/karavan/operator/resource/KaravanRole.java b/karavan-operator/src/main/java/org/apache/camel/karavan/operator/resource/KaravanRole.java
index fef92c6..8bf2c52 100644
--- a/karavan-operator/src/main/java/org/apache/camel/karavan/operator/resource/KaravanRole.java
+++ b/karavan-operator/src/main/java/org/apache/camel/karavan/operator/resource/KaravanRole.java
@@ -43,7 +43,8 @@ public class KaravanRole extends CRUDKubernetesDependentResource<Role, Karavan>
new PolicyRuleBuilder().withApiGroups("").withResources("secrets", "configmaps").withVerbs("get", "list").build(),
new PolicyRuleBuilder().withApiGroups("").withResources("persistentvolumes", "persistentvolumeclaims").withVerbs("get", "list", "watch").build(),
new PolicyRuleBuilder().withApiGroups("tekton.dev").withResources("pipelineruns").withVerbs("*").build(),
- new PolicyRuleBuilder().withApiGroups("", "apps").withResources("deployments", "services", "routes", "replicationcontrollers").withVerbs("*").build()
+ new PolicyRuleBuilder().withApiGroups("").withResources("pods", "services", "routes", "replicationcontrollers").withVerbs("*").build(),
+ new PolicyRuleBuilder().withApiGroups("apps").withResources("deployments").withVerbs("*").build()
)
.build();
}