-
Notifications
You must be signed in to change notification settings - Fork 157
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
Implement hashing functions for Kubernetes manifests and add tests #5417
Conversation
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
limitations under the License. | ||
*/ | ||
|
||
package provider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
// 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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, I want to implement without this function, but it's tough to keep compatibility without this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
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