# Setting Data Retention Policy for Camunda Self Managed v8.2.0

**URL:** <https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140>\
**Category:** Discussion & Questions\
**Tags:** zeebe\
**Created:** [January 24, 2024, 4:52pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140 "2024-01-24T16:52:05Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![aravindhrs](https://forum.camunda.io/user_avatar/forum.camunda.io/aravindhrs/32/32503_2.png) [@aravindhrs](https://forum.camunda.io/u/aravindhrs)\
**Post date:** [January 24, 2024, 4:52pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/1 "2024-01-24T16:52:05Z")

</div>

Hey Community!

Does camunda 8 self managed version supports **Elasticsearch ILM** configuration for data retention policy or we have to rely only on the **Elasticsearch curator** cron job?

_ **Camunda Self Managed version** _: 8.2.0

---

<div class="post-metadata">

**Author:** ![cpbpm](https://forum.camunda.io/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@cpbpm](https://forum.camunda.io/u/cpbpm)\
**Post date:** [January 24, 2024, 5:01pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/2 "2024-01-24T17:01:50Z")

</div>

> [@aravindhrs](#):
>
> **Elasticsearch ILM**

As per documentation, it supports ILM.

> **[Data retention | Camunda 8 Docs](https://docs.camunda.io/docs/self-managed/operate-deployment/data-retention/)**
>
> Let's take a closer look at how Operate stores and archives data.

---

<div class="post-metadata">

**Author:** ![aravindhrs](https://forum.camunda.io/user_avatar/forum.camunda.io/aravindhrs/32/32503_2.png) [@aravindhrs](https://forum.camunda.io/u/aravindhrs)\
**Post date:** [January 24, 2024, 5:03pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/3 "2024-01-24T17:03:11Z")

</div>

@cpbpm The above reference link points to 8.4 version, but I’m using 8.2.0

---

<div class="post-metadata">

**Author:** ![cpbpm](https://forum.camunda.io/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@cpbpm](https://forum.camunda.io/u/cpbpm)\
**Post date:** [January 24, 2024, 5:03pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/4 "2024-01-24T17:03:37Z")

</div>

Checked for 8.2 also.

> **[Data retention | Camunda 8 Docs](https://docs.camunda.io/docs/8.2/self-managed/operate-deployment/data-retention/)**
>
> Let's take a closer look at how Operate stores and archives data.

---

<div class="post-metadata">

**Author:** ![aravindhrs](https://forum.camunda.io/user_avatar/forum.camunda.io/aravindhrs/32/32503_2.png) [@aravindhrs](https://forum.camunda.io/u/aravindhrs)\
**Post date:** [January 24, 2024, 5:07pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/5 "2024-01-24T17:07:10Z")

</div>

@cpbpm Do you know exactly where can we find this **application.yaml** file for operate & tasklist?

> **[Data retention | Camunda 8 Docs](https://docs.camunda.io/docs/8.2/self-managed/operate-deployment/data-retention/#a-snippet-from-applicationyml)**
>
> Let's take a closer look at how Operate stores and archives data.

I have read this docs, but unable to find where to apply this settings.

Helm chart shows config for ES curator only.

> <https://github.com/camunda/camunda-platform-helm/blob/4e497e65cc82684e2065eeeab1f88e7cee7cf1ce/charts/camunda-platform/values.yaml#L2441>

---

<div class="post-metadata">

**Author:** ![cpbpm](https://forum.camunda.io/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@cpbpm](https://forum.camunda.io/u/cpbpm)\
**Post date:** [January 24, 2024, 5:20pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/6 "2024-01-24T17:20:18Z")

</div>

Let me check the helm chart and update you.

---

<div class="post-metadata">

**Author:** ![cpbpm](https://forum.camunda.io/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@cpbpm](https://forum.camunda.io/u/cpbpm)\
**Post date:** [January 24, 2024, 7:11pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/7 "2024-01-24T19:11:06Z")

</div>

Found the value in the chart: It’s slightly different compare to the main documentation:

# Retention can be used to define the data in Elasticsearch (ILM).

retention:  
## @param operate.retention.enabled if true, the ILM Policy is created and applied to the index templates.  
enabled: false  
## @param operate.retention.minimumAge defines how old the data must be, before the data is deleted as a duration.  
minimumAge: 30d

Link: [camunda-platform-helm/charts/camunda-platform/values.yaml at 0b7b220ba69d1b949f5a9fbc3706da5550c1ae30 · camunda/camunda-platform-helm · GitHub](https://github.com/camunda/camunda-platform-helm/blob/0b7b220ba69d1b949f5a9fbc3706da5550c1ae30/charts/camunda-platform/values.yaml)

---

<div class="post-metadata">

**Author:** ![aravindhrs](https://forum.camunda.io/user_avatar/forum.camunda.io/aravindhrs/32/32503_2.png) [@aravindhrs](https://forum.camunda.io/u/aravindhrs)\
**Post date:** [January 24, 2024, 8:02pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/8 "2024-01-24T20:02:38Z")

</div>

Hi @cpbpm Thanks for your reply. But this docs describing for version [8.4](https://github.com/camunda/camunda-platform-helm/blob/0b7b220ba69d1b949f5a9fbc3706da5550c1ae30/charts/camunda-platform/values.yaml#L57)

---

<div class="post-metadata">

**Author:** ![nathan.loding](https://forum.camunda.io/user_avatar/forum.camunda.io/nathan.loding/32/24171_2.png) [@nathan.loding](https://forum.camunda.io/u/nathan.loding)\
**Post date:** [January 25, 2024, 3:31pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/9 "2024-01-25T15:31:23Z")

</div>

@aravindhrs - I believe the application.yml mentioned is the [application configuration file](https://www.baeldung.com/spring-yaml), not part of the Helm charts. In other words, it inside the deployed container. If you connect to your pod (for instance, with `kubectl exec`), you can edit the file and save it. I think the application will pick up the changes immediately, but maybe restart the pod just to be safe.

---

<div class="post-metadata">

**Author:** ![aravindhrs](https://forum.camunda.io/user_avatar/forum.camunda.io/aravindhrs/32/32503_2.png) [@aravindhrs](https://forum.camunda.io/u/aravindhrs)\
**Post date:** [January 25, 2024, 5:53pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/10 "2024-01-25T17:53:07Z")

</div>

Hi @nathan.loding , Thank you for helping in identifying the file and also it brought up the question that is:

If we add some configuration properties (ex: data retention configs) in the application.yaml file in operate and after sometime if we restart the operate service do we lose those configurations which we added or it will be preserved?

Also if kubernetes decided to bring up new pod for operate, then how does the updated data retention configs will be carried over to the default application.yaml file of operate?

---

<div class="post-metadata">

**Author:** ![nathan.loding](https://forum.camunda.io/user_avatar/forum.camunda.io/nathan.loding/32/24171_2.png) [@nathan.loding](https://forum.camunda.io/u/nathan.loding)\
**Post date:** [January 25, 2024, 6:06pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/11 "2024-01-25T18:06:05Z")

</div>

@aravindhrs - just restarting the pod should not result in a loss of data, as I understand it. Kubernetes should retain the volume. However, the volumes aren’t persistent so if you tear it down (which happens during upgrades I believe) you will lose it, and new pods won’t have the configuration if you scale up.

I admit, I don’t know the best way to push a custom file into a pod during deployment. I will ask around and do some research and let you know what I find!

---

<div class="post-metadata">

**Author:** ![nathan.loding](https://forum.camunda.io/user_avatar/forum.camunda.io/nathan.loding/32/24171_2.png) [@nathan.loding](https://forum.camunda.io/u/nathan.loding)\
**Post date:** [January 26, 2024, 4:07pm UTC](https://forum.camunda.io/t/setting-data-retention-policy-for-camunda-self-managed-v8-2-0/50140/12 "2024-01-26T16:07:09Z")

</div>

@aravindhrs - here’s the answer from our SRE team:

> The best way is to create a ConfigMap, and then make use of extraVolumes and extraVolumeMounts in each component in values.yaml to bind it in. I’ll give you an example:

```auto
optimize:
  extraVolumeMounts:
    - mountPath: /optimize/config/environment-config.yaml
      subPath: environment-config.yaml
      name: environmentConfig
  extraVolumes:
    - name: environmentConfig
      configMap:
        name: optimize-environment-config
        defaultMode: 0400

```

```auto
metadata:
  name: optimize-environment-config
apiVersion: v1
data:
  environment-config.yaml: |
     CONTENTS_OF_FILE

```
