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

Avoid unnecessary DELETE for non-existent secrets #5488

Merged
merged 5 commits into from
Mar 16, 2022

Conversation

pebrc
Copy link
Collaborator

@pebrc pebrc commented Mar 16, 2022

Related to #5450

This PR guards DELETE calls on secrets (cluster license, secure settings, legacy transport certs) with a GET call through a new shared utility function to remove unnecessary load on the API server.

It also renames keystore.NewResources to keystore.ReconcileResources, which I am happy to back out into a separate PR if that's people are uncomfortable. The reason for this rename was that while I was tracking down these DELETES, I was confused and surprised to find reconciliation activity happening in a function that appeared to be a simple constructor with New* in the name.

@pebrc pebrc added >enhancement Enhancement of existing functionality v2.2.0 labels Mar 16, 2022
Copy link
Contributor

@thbkrkr thbkrkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pebrc pebrc merged commit 850e999 into elastic:main Mar 16, 2022
@thbkrkr thbkrkr added >bug Something isn't working and removed >enhancement Enhancement of existing functionality labels Apr 11, 2022
@thbkrkr thbkrkr changed the title Avoid DELETEs of non-existent secrets Avoid unnecessary DELETE for non-existent secrets Apr 11, 2022
fantapsody pushed a commit to fantapsody/cloud-on-k8s that referenced this pull request Feb 7, 2023
This change guards DELETE calls on secrets (cluster license, secure settings, legacy transport certs) with a GET call through a new shared utility function to remove unnecessary load on the API server.

It also renames keystore.NewResources to keystore.ReconcileResources. The reason for this rename was that while I was tracking down these DELETES, I was confused and surprised to find reconciliation activity happening in a function that appeared to be a simple constructor with New* in the name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v2.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants