Skip to content

feat: As a user, I want to exclude resource types from ADC reconciliation sweeps, so that API-managed resources are not deleted by the controller #2795

Description

@luarx

Description

Description:

Currently, the controller's periodic ADC reconciliation sweep (Sync) fetches all resources from APISIX and deletes anything that has no corresponding CRD in the cluster. This means resources created directly via the APISIX Admin API (e.g. consumers managed by an external auth service) are silently deleted on every sync cycle.

There is no way to tell the controller "don't garbage-collect this resource type" — the sweep is all-or-nothing.

As a user, I want to configure a list of resource types to exclude from the reconciliation sweep, so that API managed resources of those types (e.g. Consumer, ConsumerGroup) can coexist with CRD-managed resources without being deleted.

Proposed solution:

Add an exclude_resource_type field to the provider section of config.yaml:

provider:
   type: "apisix"
   sync_period: 1h
   exclude_resource_type:
     - Consumer

This maps to the --exclude-resource-type flag already supported by ADC, which tells it to skip GC for specific resource types during a sync. The controller would pass this flag when
executing the periodic full sync, while per-event reconciliation (update/delete of individual CRDs) remains unaffected.

Backward compatibility: fully backward compatible — defaults to [] (empty), preserving current behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions