Define persistence using helm chart to deploy localstack community

Greetings LocalStack Community,

I’m trying to maintain persistence for Localstack using the official helm chart. The goal is to ensure that the created resources remain available even after restarting the pod. In the Helm Chart values file, I enabled persistence as shown below:

localstack:
  debug: true
  serviceAccount:
    create: true
    annotations:
      eks.amazonaws.com/role-arn: arn:aws:iam::xxxxx:role/xxxxxxx
    name: "localstack"
  mountDind:
    enabled: true
    forceTLS: false

  persistence:
    enabled: true
    storageClass: ""
    accessModes:
      - ReadWriteOnce

However, upon restart, I noticed that everything created was gone. I observed that in the deployment volume data, there are:

volumes:
  - name: aws-iam-token
    projected:
      defaultMode: 420
      sources:
      - serviceAccountToken:
          audience: sts.amazonaws.com
          expirationSeconds: 86400
          path: token
  - name: data
    persistentVolumeClaim:
      claimName: localstack-svc
  - emptyDir: {}
    name: dind-storage

How can I activate persistence?"

Hello @cflmarques,

To enable LocalStack persistence, please follow the steps in Persistence | Docs (localstack.cloud).

All the parameters from the configuration can be added using extraEnvVars.
Ref. Configuration | Docs

   - name: PERSISTENCE
     value: "1"
   - name: DEBUG
     value: "1"   

Source: helm-charts/charts/localstack at main · localstack/helm-charts (github.com)

Hello @Marcel

Thank you for your assistance.

Are you indicating that persistence features are exclusively accessible in the pro version?

Indeed, persistence is a feature of the pro version.

By default, LocalStack is an ephemeral environment, meaning that, once you terminate your LocalStack instance, all state will be discarded. Persistence is a LocalStack Pro feature that can save and restore the state of LocalStack including all AWS resources and their data.