You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/10/11 09:18:47 UTC

[GitHub] [camel] essobedo opened a new pull request, #8512: CAMEL-16909: camel-kubernetes - Event support

essobedo opened a new pull request, #8512:
URL: https://github.com/apache/camel/pull/8512

   Fix for https://issues.apache.org/jira/browse/CAMEL-16909
   
   ## Motivation
   
   The events are not yet supported by the camel-kubernetes component and we would like to add its support.
   
   ## Modifications:
   
   * Add a new component called `kubernetes-events` based on other components of the same type 
   * Remove all classes from the package `org.apache.camel.component.kubernetes.consumer.common` as they are useless (not directly related to the initial issue)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #8512: CAMEL-16909: camel-kubernetes - Event support

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8512:
URL: https://github.com/apache/camel/pull/8512#issuecomment-1274554600

   :heavy_check_mark: Finished component verification: 0 component(s) test failed out of **1 component(s) tested**


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] essobedo merged pull request #8512: CAMEL-16909: camel-kubernetes - Event support

Posted by GitBox <gi...@apache.org>.
essobedo merged PR #8512:
URL: https://github.com/apache/camel/pull/8512


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] orpiske commented on a diff in pull request #8512: CAMEL-16909: camel-kubernetes - Event support

Posted by GitBox <gi...@apache.org>.
orpiske commented on code in PR #8512:
URL: https://github.com/apache/camel/pull/8512#discussion_r992181280


##########
components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/events/KubernetesEventsConsumer.java:
##########
@@ -0,0 +1,140 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.kubernetes.events;
+
+import java.util.concurrent.ExecutorService;
+
+import io.fabric8.kubernetes.api.model.events.v1.Event;
+import io.fabric8.kubernetes.api.model.events.v1.EventList;
+import io.fabric8.kubernetes.client.Watch;
+import io.fabric8.kubernetes.client.Watcher;
+import io.fabric8.kubernetes.client.WatcherException;
+import io.fabric8.kubernetes.client.dsl.FilterWatchListDeletable;
+import io.fabric8.kubernetes.client.dsl.Resource;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.kubernetes.AbstractKubernetesEndpoint;
+import org.apache.camel.component.kubernetes.KubernetesConstants;
+import org.apache.camel.component.kubernetes.KubernetesHelper;
+import org.apache.camel.support.DefaultConsumer;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class KubernetesEventsConsumer extends DefaultConsumer {
+
+    private static final Logger LOG = LoggerFactory.getLogger(KubernetesEventsConsumer.class);
+
+    private final Processor processor;
+    private ExecutorService executor;
+    private EventsConsumerTask eventWatcher;
+
+    public KubernetesEventsConsumer(AbstractKubernetesEndpoint endpoint, Processor processor) {
+        super(endpoint, processor);
+        this.processor = processor;
+    }
+
+    @Override
+    public AbstractKubernetesEndpoint getEndpoint() {
+        return (AbstractKubernetesEndpoint) super.getEndpoint();
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        executor = getEndpoint().createExecutor();
+
+        eventWatcher = new EventsConsumerTask();
+        executor.submit(eventWatcher);
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        super.doStop();
+
+        LOG.debug("Stopping Kubernetes Event Consumer");
+        if (executor != null) {
+            KubernetesHelper.close(eventWatcher, eventWatcher::getWatch);
+
+            if (getEndpoint() != null && getEndpoint().getCamelContext() != null) {
+                getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor);
+            } else {
+                executor.shutdownNow();
+            }
+        }
+        executor = null;
+    }
+
+    class EventsConsumerTask implements Runnable {
+
+        private Watch watch;
+
+        @Override
+        public void run() {
+
+            FilterWatchListDeletable<Event, EventList, Resource<Event>> w = null;
+            if (ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getLabelKey())
+                    && ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getLabelValue())) {
+                w = getEndpoint().getKubernetesClient().events().v1().events().withLabel(
+                        getEndpoint().getKubernetesConfiguration().getLabelKey(),
+                        getEndpoint().getKubernetesConfiguration().getLabelValue());
+            }
+            if (ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getResourceName())) {
+                Resource<Event> eventResource = getEndpoint()
+                        .getKubernetesClient().events().v1().events()
+                        .withName(getEndpoint().getKubernetesConfiguration().getResourceName());
+                w = (FilterWatchListDeletable<Event, EventList, Resource<Event>>) eventResource;
+            }
+            if (w == null) {
+                throw new RuntimeCamelException("Consumer label key or consumer resource name need to be set.");
+            }
+            watch = w.watch(new Watcher<>() {
+
+                @Override
+                public void eventReceived(Action action, Event resource) {
+                    Exchange exchange = createExchange(false);
+                    exchange.getIn().setBody(resource);
+                    exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_EVENT_ACTION, action);
+                    exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_EVENT_TIMESTAMP, System.currentTimeMillis());

Review Comment:
   Just out of curiosity: wouldn't it be better/possible to use a more elaborate data type for the timestamp? 
   
   My concern here is that this data may be confusing / hard to work with in scenarios where events may happen in different timezone.
   
   Would it make sense or is it irrelevant in this context?  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] orpiske commented on a diff in pull request #8512: CAMEL-16909: camel-kubernetes - Event support

Posted by GitBox <gi...@apache.org>.
orpiske commented on code in PR #8512:
URL: https://github.com/apache/camel/pull/8512#discussion_r992252161


##########
components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/events/KubernetesEventsConsumer.java:
##########
@@ -0,0 +1,140 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.kubernetes.events;
+
+import java.util.concurrent.ExecutorService;
+
+import io.fabric8.kubernetes.api.model.events.v1.Event;
+import io.fabric8.kubernetes.api.model.events.v1.EventList;
+import io.fabric8.kubernetes.client.Watch;
+import io.fabric8.kubernetes.client.Watcher;
+import io.fabric8.kubernetes.client.WatcherException;
+import io.fabric8.kubernetes.client.dsl.FilterWatchListDeletable;
+import io.fabric8.kubernetes.client.dsl.Resource;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.kubernetes.AbstractKubernetesEndpoint;
+import org.apache.camel.component.kubernetes.KubernetesConstants;
+import org.apache.camel.component.kubernetes.KubernetesHelper;
+import org.apache.camel.support.DefaultConsumer;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class KubernetesEventsConsumer extends DefaultConsumer {
+
+    private static final Logger LOG = LoggerFactory.getLogger(KubernetesEventsConsumer.class);
+
+    private final Processor processor;
+    private ExecutorService executor;
+    private EventsConsumerTask eventWatcher;
+
+    public KubernetesEventsConsumer(AbstractKubernetesEndpoint endpoint, Processor processor) {
+        super(endpoint, processor);
+        this.processor = processor;
+    }
+
+    @Override
+    public AbstractKubernetesEndpoint getEndpoint() {
+        return (AbstractKubernetesEndpoint) super.getEndpoint();
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        executor = getEndpoint().createExecutor();
+
+        eventWatcher = new EventsConsumerTask();
+        executor.submit(eventWatcher);
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        super.doStop();
+
+        LOG.debug("Stopping Kubernetes Event Consumer");
+        if (executor != null) {
+            KubernetesHelper.close(eventWatcher, eventWatcher::getWatch);
+
+            if (getEndpoint() != null && getEndpoint().getCamelContext() != null) {
+                getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor);
+            } else {
+                executor.shutdownNow();
+            }
+        }
+        executor = null;
+    }
+
+    class EventsConsumerTask implements Runnable {
+
+        private Watch watch;
+
+        @Override
+        public void run() {
+
+            FilterWatchListDeletable<Event, EventList, Resource<Event>> w = null;
+            if (ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getLabelKey())
+                    && ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getLabelValue())) {
+                w = getEndpoint().getKubernetesClient().events().v1().events().withLabel(
+                        getEndpoint().getKubernetesConfiguration().getLabelKey(),
+                        getEndpoint().getKubernetesConfiguration().getLabelValue());
+            }
+            if (ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getResourceName())) {
+                Resource<Event> eventResource = getEndpoint()
+                        .getKubernetesClient().events().v1().events()
+                        .withName(getEndpoint().getKubernetesConfiguration().getResourceName());
+                w = (FilterWatchListDeletable<Event, EventList, Resource<Event>>) eventResource;
+            }
+            if (w == null) {
+                throw new RuntimeCamelException("Consumer label key or consumer resource name need to be set.");
+            }
+            watch = w.watch(new Watcher<>() {
+
+                @Override
+                public void eventReceived(Action action, Event resource) {
+                    Exchange exchange = createExchange(false);
+                    exchange.getIn().setBody(resource);
+                    exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_EVENT_ACTION, action);
+                    exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_EVENT_TIMESTAMP, System.currentTimeMillis());

Review Comment:
   Thanks for clarifying!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] orpiske commented on a diff in pull request #8512: CAMEL-16909: camel-kubernetes - Event support

Posted by GitBox <gi...@apache.org>.
orpiske commented on code in PR #8512:
URL: https://github.com/apache/camel/pull/8512#discussion_r992181280


##########
components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/events/KubernetesEventsConsumer.java:
##########
@@ -0,0 +1,140 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.kubernetes.events;
+
+import java.util.concurrent.ExecutorService;
+
+import io.fabric8.kubernetes.api.model.events.v1.Event;
+import io.fabric8.kubernetes.api.model.events.v1.EventList;
+import io.fabric8.kubernetes.client.Watch;
+import io.fabric8.kubernetes.client.Watcher;
+import io.fabric8.kubernetes.client.WatcherException;
+import io.fabric8.kubernetes.client.dsl.FilterWatchListDeletable;
+import io.fabric8.kubernetes.client.dsl.Resource;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.kubernetes.AbstractKubernetesEndpoint;
+import org.apache.camel.component.kubernetes.KubernetesConstants;
+import org.apache.camel.component.kubernetes.KubernetesHelper;
+import org.apache.camel.support.DefaultConsumer;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class KubernetesEventsConsumer extends DefaultConsumer {
+
+    private static final Logger LOG = LoggerFactory.getLogger(KubernetesEventsConsumer.class);
+
+    private final Processor processor;
+    private ExecutorService executor;
+    private EventsConsumerTask eventWatcher;
+
+    public KubernetesEventsConsumer(AbstractKubernetesEndpoint endpoint, Processor processor) {
+        super(endpoint, processor);
+        this.processor = processor;
+    }
+
+    @Override
+    public AbstractKubernetesEndpoint getEndpoint() {
+        return (AbstractKubernetesEndpoint) super.getEndpoint();
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        executor = getEndpoint().createExecutor();
+
+        eventWatcher = new EventsConsumerTask();
+        executor.submit(eventWatcher);
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        super.doStop();
+
+        LOG.debug("Stopping Kubernetes Event Consumer");
+        if (executor != null) {
+            KubernetesHelper.close(eventWatcher, eventWatcher::getWatch);
+
+            if (getEndpoint() != null && getEndpoint().getCamelContext() != null) {
+                getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor);
+            } else {
+                executor.shutdownNow();
+            }
+        }
+        executor = null;
+    }
+
+    class EventsConsumerTask implements Runnable {
+
+        private Watch watch;
+
+        @Override
+        public void run() {
+
+            FilterWatchListDeletable<Event, EventList, Resource<Event>> w = null;
+            if (ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getLabelKey())
+                    && ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getLabelValue())) {
+                w = getEndpoint().getKubernetesClient().events().v1().events().withLabel(
+                        getEndpoint().getKubernetesConfiguration().getLabelKey(),
+                        getEndpoint().getKubernetesConfiguration().getLabelValue());
+            }
+            if (ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getResourceName())) {
+                Resource<Event> eventResource = getEndpoint()
+                        .getKubernetesClient().events().v1().events()
+                        .withName(getEndpoint().getKubernetesConfiguration().getResourceName());
+                w = (FilterWatchListDeletable<Event, EventList, Resource<Event>>) eventResource;
+            }
+            if (w == null) {
+                throw new RuntimeCamelException("Consumer label key or consumer resource name need to be set.");
+            }
+            watch = w.watch(new Watcher<>() {
+
+                @Override
+                public void eventReceived(Action action, Event resource) {
+                    Exchange exchange = createExchange(false);
+                    exchange.getIn().setBody(resource);
+                    exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_EVENT_ACTION, action);
+                    exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_EVENT_TIMESTAMP, System.currentTimeMillis());

Review Comment:
   Just out of curiosity: wouldn't it be better/possible to use a more elaborate data type for the timestamp? 
   
   My concern here is that this data may be confusing / hard to work with in scenarios where events may happen in different timezone.
   
   Does it make sense or is it irrelevant in this context?  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] essobedo commented on a diff in pull request #8512: CAMEL-16909: camel-kubernetes - Event support

Posted by GitBox <gi...@apache.org>.
essobedo commented on code in PR #8512:
URL: https://github.com/apache/camel/pull/8512#discussion_r992251120


##########
components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/events/KubernetesEventsConsumer.java:
##########
@@ -0,0 +1,140 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.kubernetes.events;
+
+import java.util.concurrent.ExecutorService;
+
+import io.fabric8.kubernetes.api.model.events.v1.Event;
+import io.fabric8.kubernetes.api.model.events.v1.EventList;
+import io.fabric8.kubernetes.client.Watch;
+import io.fabric8.kubernetes.client.Watcher;
+import io.fabric8.kubernetes.client.WatcherException;
+import io.fabric8.kubernetes.client.dsl.FilterWatchListDeletable;
+import io.fabric8.kubernetes.client.dsl.Resource;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.kubernetes.AbstractKubernetesEndpoint;
+import org.apache.camel.component.kubernetes.KubernetesConstants;
+import org.apache.camel.component.kubernetes.KubernetesHelper;
+import org.apache.camel.support.DefaultConsumer;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class KubernetesEventsConsumer extends DefaultConsumer {
+
+    private static final Logger LOG = LoggerFactory.getLogger(KubernetesEventsConsumer.class);
+
+    private final Processor processor;
+    private ExecutorService executor;
+    private EventsConsumerTask eventWatcher;
+
+    public KubernetesEventsConsumer(AbstractKubernetesEndpoint endpoint, Processor processor) {
+        super(endpoint, processor);
+        this.processor = processor;
+    }
+
+    @Override
+    public AbstractKubernetesEndpoint getEndpoint() {
+        return (AbstractKubernetesEndpoint) super.getEndpoint();
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        executor = getEndpoint().createExecutor();
+
+        eventWatcher = new EventsConsumerTask();
+        executor.submit(eventWatcher);
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        super.doStop();
+
+        LOG.debug("Stopping Kubernetes Event Consumer");
+        if (executor != null) {
+            KubernetesHelper.close(eventWatcher, eventWatcher::getWatch);
+
+            if (getEndpoint() != null && getEndpoint().getCamelContext() != null) {
+                getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor);
+            } else {
+                executor.shutdownNow();
+            }
+        }
+        executor = null;
+    }
+
+    class EventsConsumerTask implements Runnable {
+
+        private Watch watch;
+
+        @Override
+        public void run() {
+
+            FilterWatchListDeletable<Event, EventList, Resource<Event>> w = null;
+            if (ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getLabelKey())
+                    && ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getLabelValue())) {
+                w = getEndpoint().getKubernetesClient().events().v1().events().withLabel(
+                        getEndpoint().getKubernetesConfiguration().getLabelKey(),
+                        getEndpoint().getKubernetesConfiguration().getLabelValue());
+            }
+            if (ObjectHelper.isNotEmpty(getEndpoint().getKubernetesConfiguration().getResourceName())) {
+                Resource<Event> eventResource = getEndpoint()
+                        .getKubernetesClient().events().v1().events()
+                        .withName(getEndpoint().getKubernetesConfiguration().getResourceName());
+                w = (FilterWatchListDeletable<Event, EventList, Resource<Event>>) eventResource;
+            }
+            if (w == null) {
+                throw new RuntimeCamelException("Consumer label key or consumer resource name need to be set.");
+            }
+            watch = w.watch(new Watcher<>() {
+
+                @Override
+                public void eventReceived(Action action, Event resource) {
+                    Exchange exchange = createExchange(false);
+                    exchange.getIn().setBody(resource);
+                    exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_EVENT_ACTION, action);
+                    exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_EVENT_TIMESTAMP, System.currentTimeMillis());

Review Comment:
   This timestamp is actually the same as other resource types, for the sake of consistency, I think that we should keep the same type. BTW, please note that you have a more specific type in the event itself stored in the message body.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #8512: CAMEL-16909: camel-kubernetes - Event support

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8512:
URL: https://github.com/apache/camel/pull/8512#issuecomment-1274384086

   :warning: This PR changes Camel components and will be tested automatically.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org