Refactor /inventory code to expose some helpers#4090
Merged
Conversation
86a9aaa to
6f356db
Compare
dbea5b3 to
dae5fc6
Compare
2 tasks
bigkevmcd
reviewed
Nov 3, 2023
| result = append(result, entry) | ||
| resultMu.Unlock() | ||
| }(*o) | ||
| // FIXME: do we need this? |
Contributor
There was a problem hiding this comment.
When you are getting them from Kubernetes, they should have their namespace (even if it's corev1.NamespaceDefault).
| if unstructuredObj.GetKind() == "Secret" { | ||
| unstructuredObj, err = sanitizeUnstructuredSecret(unstructuredObj) | ||
| var err error | ||
| unstructuredObj, err = SanitizeUnstructuredSecret(unstructuredObj) |
Contributor
There was a problem hiding this comment.
SanitizeUnstructuredSecret isn't used outside of the server package?
1c2e26e to
4199b60
Compare
ranatrk
approved these changes
Nov 8, 2023
- That can be used by other similar inventory endpoints
Fix tests
Co-authored-by: Kevin McDermott <kevin@weave.works>
…et in inventory and tests
97584fa to
71167b3
Compare
Merged
This was referenced Jan 15, 2025
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.
weaveworks/weave-gitops-enterprise#2776
What changed?
Why was this change made?
Other similar CRDs that match the flux inventory pattern can share similar code like this
How was this change implemented?
How did you validate the change?
unit tests
Release notes
Expose some inventory directory helper functions
Documentation Changes