Skip to content

feat: Add excludeResourceType config to prevent ADC from deleting API managed resources - #2794

Open
luarx wants to merge 3 commits into
apache:masterfrom
luarx:feat/exclude-resource-type-config
Open

feat: Add excludeResourceType config to prevent ADC from deleting API managed resources#2794
luarx wants to merge 3 commits into
apache:masterfrom
luarx:feat/exclude-resource-type-config

Conversation

@luarx

@luarx luarx commented Jun 18, 2026

Copy link
Copy Markdown

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

Introduces a new provider.exclude_resource_type config field (e.g. [Consumer, ConsumerGroup]) that is threaded through ProviderConfig → provider.Options → adcclient.New → Client.Sync(), so periodic ADC reconciliation sweeps skip resources of those types that were created via API rather than CRD — preventing the controller from deleting them.

Implements this issue: #2795

▎--> And will enable this PR to be merged if accepted apache/apisix-helm-chart#983

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

▎ Backward compatible: Yes — exclude_resource_type defaults to []/unset. Options.ApplyToList only overrides ExcludeResourceType when len(o.ExcludeResourceType) > 0, so existing configs behave exactly as before.

@luarx

luarx commented Jul 24, 2026

Copy link
Copy Markdown
Author

Friendly ping on this 👋 Has anyone had a chance to review it yet? 🙏

I'd really appreciate any feedback @nic-6443 @shreemaan-abhishek @AlinsRan, if one of you has some time, I'd love to get this moving as it is blocking us and maybe you know any other solution 😇

Btw, I am the same one that opened this unrelated merged PR too :)

luarx added 3 commits July 24, 2026 12:09
…-managed resources

Introduces a new `provider.exclude_resource_type` config field (e.g. `[Consumer, ConsumerGroup]`)
that is threaded through ProviderConfig → provider.Options → adcclient.New → Client.Sync(),
so periodic ADC reconciliation sweeps skip resources of those types that were created via API
rather than CRD — preventing the controller from deleting them.
@luarx
luarx force-pushed the feat/exclude-resource-type-config branch from bcf0c5c to b1f7d94 Compare July 24, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant