Reconciliation of individual API key secrets within an AuthConfig #297
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Avoids reconciling the entire AuthConfig whenever a new API Key secret is reconciled.
Ensures that API keys secrets are added, updated or removed individually in the cache of each AuthConfig where it applies, reflecting the corresponding operations of creating/updating/deleting Kubernetes Secrets, including modification in the labels of the Secret.
Closes #264
Verification steps
Build and deploy:
make local-setup FF=1 kubectl -n authorino port-forward deployment/envoy 8000:8000 &
Create an AuthConfig:
Check the API is not yet accessible before creating the API key:
For every iteration involving modifying an API key Secret below, send requests to the API on the different host names.
Create an API key:
Modify the vaue of the API key:
Remove the API key secret from teh scope of the AuthConfig:
Add the API key back again to the scope of the AuthConfig:
Remove the API key from the scope of Authorino:
Add the API key back to the scope of Authorino:
Delete the Api key: