Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TT-5482] Tyk Operator ignores "-f" during reconciliation infinite loops #469

Closed
sedkis opened this issue May 25, 2022 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@sedkis
Copy link
Contributor

sedkis commented May 25, 2022

As a developer, if I pass the -f flag to kubectl command to delete a resource, I expect it to delete the resource. However, the Tyk Operator hangs infinitely during the reconciliation loop.

Recreate Steps

As a developer, if I (accidentally) delete an API/Policy in the Dashboard that was created through the Operator, and then I try to delete the

IE, when I try to modify the resource through Operator, it hangs forever because the Dashboard resource does not exist.

Expected Behavior

If I pass the --force command to the kubectl delete, the Operator should respect that.

Possible Solution

Here, we should skip the reconciliation process if the -f / --force command is passed in from kubectl in addition to the current check that looks for a finalizer
https://github.com/TykTechnologies/tyk-operator/blob/master/controllers/apidefinition_controller.go#L482

@sedkis sedkis added the enhancement New feature or request label May 25, 2022
@sedkis sedkis changed the title Need to force-delete reconciliation infinite loops Tyk Operator ignores "-f" during reconciliation infinite loops May 25, 2022
@MichaelTyk MichaelTyk changed the title Tyk Operator ignores "-f" during reconciliation infinite loops [TT-5489] Tyk Operator ignores "-f" during reconciliation infinite loops May 25, 2022
@caroltyk
Copy link
Collaborator

caroltyk commented Sep 1, 2022

Alternatively, maybe we could check if the API does not exist on Dashboard, then treat it as deleted?

@caroltyk caroltyk changed the title [TT-5489] Tyk Operator ignores "-f" during reconciliation infinite loops [TT-5482] Tyk Operator ignores "-f" during reconciliation infinite loops Nov 24, 2022
buger pushed a commit that referenced this issue May 22, 2024
* ignore 404 when deleting an API, fixes #469

* Update CHANGELOG.md

* typo

* check for 404 error using tykclient.IsNotFound

* move change mention to Unreleased

* add bdd test scenario for deleting ApiDefinition not present in dashboard

* use a separate sample resource to test deletion of deleted apis

* fix linter

* fix createDashURL

* fix ::set-output warnings

* fix typos in feature files

* make bdd tests more reliable

* fix actionlint errors

* use gateway-api for deletion bdd test

* disable bdd strict

* change order of bdd example resources

* split apidefinition from context to fix test

* typos

* fix test

* (re)disable the failing test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants