Skip to content

VMAlert finalizer does not clean up main SecretConfigResourceKind secret #1527

@caryjpaepen

Description

@caryjpaepen

Description:
When deleting a VMAlert CR, the operator’s finalizer removes the deployment, services, TLSAssets secret, etc., but it does not remove the main config secret (SecretConfigResourceKind) created at /etc/vmalert/remote_secrets.

This results in the secret being orphaned, with a finalizer still attached, preventing normal teardown and requiring manual cleanup.

Steps to reproduce:

  1. Create a VMAlert CR.
  2. Observe that both TLSAssets and config secrets are created with the operator’s finalizer.
  3. Delete the VMAlert CR.
  4. The TLSAssets secret is removed, but the config secret remains.

Expected behavior:
All secrets owned by the VMAlert CR (including the main config secret) should be cleaned up by OnVMAlertDelete.

References:

Versions:
victoriametrics/operator:v0.62.0
victoriametrics/vmalert:v1.125.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions