-
Notifications
You must be signed in to change notification settings - Fork 80
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
Create the MedusaConfiguration API #1180
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1180 +/- ##
==========================================
- Coverage 57.19% 56.92% -0.27%
==========================================
Files 101 103 +2
Lines 10529 10526 -3
==========================================
- Hits 6022 5992 -30
- Misses 3980 4007 +27
Partials 527 527
|
) | ||
|
||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! | ||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. |
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.
[nitpick] Can we remove those generated comments (here, in the spec below, and in the controller)? It makes it look like there's some unfinished work.
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.
sounds good 👍
} | ||
|
||
configuration := instance.DeepCopy() | ||
patch := client.MergeFrom(configuration.DeepCopy()) |
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.
[question] why call DeepCopy
twice?
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.
The patch and the original object we're patching need to be in separate addresses for when we invoke .Status().Patch()
.
I'm not sure why we initially do a DeepCopy() on the object we get from the kube api, but I'm just following the convention we use elsewhere, which could be unnecessary but at least works fine :)
c231e2a
to
8af65ea
Compare
|
What this PR does:
Adds a MedusaConfiguration API.
Which issue(s) this PR fixes:
Fixes #1157
Checklist