seal-io / walrus

Walrus is an open-source application management platform based on IaC tools including OpenTofu, Terraform and others. It helps platform engineers build golden paths for developers and empowers developers with self-service capabilities.
Apache License 2.0
427 stars 48 forks source link

default-local namespace will be deleted after restarting Walrus #2014

Open Finenyaco opened 9 months ago

Finenyaco commented 9 months ago

Describe the bug

Steps to reproduce

  1. Run Walrus by docker compose.

    version: '3.6'
    services:
    seal:
    image: "sealio/walrus:main"
    restart: always
    privileged: true
    container_name: seal
    command:
      - "walrus"
      - "--log-debug"
      - "--log-verbosity=4"
    environment:
      - K3S_RESOLV_CONF=
    ports:
      - "80:80"
      - "443:443"
      - "54322:5432"
    volumes:
      - 'walrus-app:/var/run/walrus'
    volumes:
    walrus-app: {}
  2. Create several resources in the default-local environment.

  3. Execute docker-compose down.

  4. Execute docker-compose up.

  5. Redeploy to resources.

Result

  1. Failed to redeploy. The "default-local" namespace was deleted.
image

Expected behavior

Redeploy resource successfully.

Can we retain this namespace? Or automatically recreate the namespace upon restarting Wlarus.

Environment

Additional context Add any other context about the problem here.

thxCode commented 9 months ago

as https://github.com/seal-io/walrus/pull/1999#issue-2095261691 mentioned, it's dangerous to run workloads in the default-local environment when the infra network changes frequently.

we might be able to recreate the default-local namespace, but we cannot recover the workloads inside it.

linyinli commented 9 months ago

When using an external database, deleting and re-running the walrus container can also cause this.