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

check deployment name before deleting deployment from cache #266

Merged
merged 1 commit into from
Nov 14, 2022

Conversation

nirvanagit
Copy link
Collaborator

Current state

Given deployment cache has a valid deployment in its cache
And the deployment does not have an env annotation
And a debug deployment exists, without the env annotation
And debug deployment has the admiral.io/ignore annotation set to true,
And the env key is derived from namespace
When admiral receives an update event for the debug deployment, admiral calls this function
Then, the valid deployment is deleted because the deployment cache stores the deployment by key, which is the same for the valid deployment, as well as the debug deployment.

Change in PR

To prevent admiral from deleting the valid deployment, it will now match the deployment name it found in its cache, with the debug deployment (could be any deployment with ignore annotation, and same identity, and env (which can come from namespace)). The cache will be deleted only when the names match.

Signed-off-by: Anubhav Aeron <anubhav_aeron@intuit.com>
@aattuluri aattuluri merged commit 34f7392 into master Nov 14, 2022
@aattuluri aattuluri deleted the delete-deployment-guard branch November 14, 2022 02:05
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.

None yet

2 participants