Implement hashing functions for Kubernetes manifests and add tests#5417
Merged
Implement hashing functions for Kubernetes manifests and add tests#5417
Conversation
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Warashi
commented
Dec 13, 2024
| limitations under the License. | ||
| */ | ||
|
|
||
| package provider |
Member
Author
There was a problem hiding this comment.
This file is copied from below, and the package name has been changed.
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package provider |
Member
Author
There was a problem hiding this comment.
This file is copied from below, and the package name has been changed.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5417 +/- ##
==========================================
+ Coverage 25.81% 25.89% +0.08%
==========================================
Files 449 450 +1
Lines 48472 48565 +93
==========================================
+ Hits 12513 12576 +63
- Misses 34981 35000 +19
- Partials 978 989 +11 ☔ View full report in Codecov by Sentry. |
Warashi
commented
Dec 13, 2024
Comment on lines
+42
to
+45
| // ConvertToStructuredObject converts the manifest into a structured Kubernetes object. | ||
| // The provided interface should be a pointer to a concrete Kubernetes type (e.g. *v1.Pod). | ||
| // It first marshals the manifest to JSON and then unmarshals it into the provided object. | ||
| func (m Manifest) ConvertToStructuredObject(o interface{}) error { |
Member
Author
There was a problem hiding this comment.
IMHO, I want to implement without this function, but it's tough to keep compatibility without this.
Merged
Merged
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 this PR does:
I copied hashing functions implemented in the current Kubernetes platform provider to the Kubernetes plugin.
Why we need it:
To implement annotateConfigHash, we need functions to hash configmaps and secrets.
Which issue(s) this PR fixes:
Part of #4980
Does this PR introduce a user-facing change?: No