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/10/26 00:14:00 UTC
[camel-karavan] branch main updated: Ephemeral volume for Karavan app /tmp
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 f23b9ac Ephemeral volume for Karavan app /tmp
f23b9ac is described below
commit f23b9ac48044ccb63739daa602478d210ce196af
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Tue Oct 25 20:13:51 2022 -0400
Ephemeral volume for Karavan app /tmp
---
.../camel/karavan/operator/resource/KaravanDeployment.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/karavan-operator/src/main/java/org/apache/camel/karavan/operator/resource/KaravanDeployment.java b/karavan-operator/src/main/java/org/apache/camel/karavan/operator/resource/KaravanDeployment.java
index 2169837..a4d6258 100644
--- a/karavan-operator/src/main/java/org/apache/camel/karavan/operator/resource/KaravanDeployment.java
+++ b/karavan-operator/src/main/java/org/apache/camel/karavan/operator/resource/KaravanDeployment.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.karavan.operator.resource;
+import io.fabric8.kubernetes.api.model.EmptyDirVolumeSource;
import io.fabric8.kubernetes.api.model.EnvVar;
import io.fabric8.kubernetes.api.model.EnvVarSourceBuilder;
import io.fabric8.kubernetes.api.model.ObjectFieldSelector;
@@ -114,10 +115,16 @@ public class KaravanDeployment extends CRUDKubernetesDependentResource<Deploymen
.withName(Constants.NAME)
.endPort()
.withResources(new ResourceRequirementsBuilder().withRequests(Map.of("memory", new Quantity("2048Mi"))).build())
- .withVolumeMounts(new VolumeMountBuilder().withName("karavan-data").withMountPath("/deployments/karavan-data").build())
+ .withVolumeMounts(
+ new VolumeMountBuilder().withName("karavan-data").withMountPath("/deployments/karavan-data").build(),
+ new VolumeMountBuilder().withName("ephemeral").withMountPath("/tmp").build()
+ )
.endContainer()
.withServiceAccount(Constants.NAME)
- .withVolumes(new VolumeBuilder().withName("karavan-data").withPersistentVolumeClaim(new PersistentVolumeClaimVolumeSource("karavan-data", false)).build())
+ .withVolumes(
+ new VolumeBuilder().withName("karavan-data").withPersistentVolumeClaim(new PersistentVolumeClaimVolumeSource("karavan-data", false)).build(),
+ new VolumeBuilder().withName("ephemeral").withEmptyDir(new EmptyDirVolumeSource()).build()
+ )
.endSpec()
.endTemplate()
.endSpec()