Stop storing stateless kubernetes keystores#21880
Merged
ChrsMark merged 8 commits intoelastic:masterfrom Oct 19, 2020
Merged
Conversation
Contributor
|
Pinging @elastic/integrations-platforms (Team:Platforms) |
Contributor
Signed-off-by: chrismark <chrismarkou92@gmail.com>
d1bfa21 to
e5abbda
Compare
Signed-off-by: chrismark <chrismarkou92@gmail.com>
jsoriano
reviewed
Oct 16, 2020
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
jsoriano
reviewed
Oct 16, 2020
Comment on lines
+82
to
+83
| storedKeystore, _ := kr.kubernetesKeystores.LoadOrStore(namespace, k8sKeystore) | ||
| return storedKeystore.(keystore.Keystore) |
Member
There was a problem hiding this comment.
This way we are instantiating a new keystore on every call, this is why I mentioned that we could need to store an object that creates the keystore lazily.
But, I have been looking at the implementation of the k8s keystore and it actually doesn't keep any state at all, so maybe we can return a new one each time and don't keep a registry?
Suggested change
| storedKeystore, _ := kr.kubernetesKeystores.LoadOrStore(namespace, k8sKeystore) | |
| return storedKeystore.(keystore.Keystore) | |
| return k8sKeystore |
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
jsoriano
approved these changes
Oct 19, 2020
Member
jsoriano
left a comment
There was a problem hiding this comment.
LGTM, only a suggestion about a comment.
| @@ -76,11 +71,7 @@ func (kr *KubernetesKeystoresRegistry) GetKeystore(event bus.Event) keystore.Key | |||
| } | |||
| if namespace != "" { | |||
| // either retrieve already stored keystore or create a new one for the namespace | |||
Member
There was a problem hiding this comment.
This comment is not needed anymore.
Suggested change
| // either retrieve already stored keystore or create a new one for the namespace |
Signed-off-by: chrismark <chrismarkou92@gmail.com>
jsoriano
approved these changes
Oct 19, 2020
jsoriano
reviewed
Oct 19, 2020
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
jsoriano
approved these changes
Oct 19, 2020
ChrsMark
added a commit
to ChrsMark/beats
that referenced
this pull request
Oct 19, 2020
(cherry picked from commit b2d1929)
ChrsMark
added a commit
to ChrsMark/beats
that referenced
this pull request
Oct 19, 2020
(cherry picked from commit b2d1929)
This was referenced Oct 19, 2020
ChrsMark
added a commit
to ChrsMark/beats
that referenced
this pull request
Oct 19, 2020
(cherry picked from commit b2d1929)
ChrsMark
added a commit
that referenced
this pull request
Oct 20, 2020
ChrsMark
added a commit
that referenced
this pull request
Oct 20, 2020
ChrsMark
added a commit
that referenced
this pull request
Oct 20, 2020
v1v
added a commit
to v1v/beats
that referenced
this pull request
Oct 21, 2020
* upstream/master: feat: package aliases for snapshots (elastic#21960) [DOC] Add firewall as possible troubleshooting issue (elastic#21743) [Filebeat] Add max_number_of_messages config parameter for S3 input (elastic#21993) [Elastic Agent] Fix missing elastic_agent event data (elastic#21994) Document auditbeat system process module config (elastic#21766) Update links (elastic#22012) dynamically find librpm (elastic#21936) Fix Istio docs (elastic#22019) [beats-tester][packaging] store packages in another location (elastic#21903) [Kubernetes] Remove redundant dockersock volume mount (elastic#22009) [Ingest Manager] Always try snapshot repo for agent upgrade (elastic#21951) Azure storage metricset values not inside the metricset name (elastic#21845) fix diskio and memory bugs under windows (elastic#21992) Fix TestDockerStart flaky test (elastic#21681) filebeat: add SSL options to checkpoint module (elastic#19560) Stop storing stateless kubernetes keystores (elastic#21880) [Elastic Agent] Fix named pipe communication on Windows 7 (elastic#21931) [Elastic Agent] Fix index for Agent monitoring to to elastic_agent. (elastic#21932)
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
This PR removes
kubernetesKeystoressince it does not store anything that actually needs to be shared.Related issues