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.
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:
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.