-
Notifications
You must be signed in to change notification settings - Fork 4k
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
VPA - Adding status to Admission Controller #2763
VPA - Adding status to Admission Controller #2763
Conversation
/assign @bskiba |
c240ef1
to
7de0eb1
Compare
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.
Nits only
return | ||
case <-time.After(updateInterval): | ||
if err := su.client.UpdateStatus(); err != nil { | ||
klog.Errorf("Admission Controller status update failed: %v", err) |
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.
nit: I think Warning should be enough
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 we want to have Updater logic to be dependent on this status, so error sounds reasonable.
Plus, there are retries implemented, so this situation shouldn't happen unless something is really off.
} | ||
|
||
// Start starts status updates. | ||
func (su *StatusUpdater) Start() { |
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.
nit: isn't Run more popular for k8s controllers?
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.
Changed to Run(<-chan struct{})
signature.
vertical-pod-autoscaler/go.mod
Outdated
@@ -5,6 +5,7 @@ go 1.12 | |||
require ( | |||
github.com/beorn7/perks v1.0.1 // indirect | |||
github.com/golang/mock v1.3.1 | |||
github.com/google/uuid v1.1.1 |
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.
Did you run go mod vendor? Not sure if this should cause a change in vendor forlder
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.
I realized that uuid was used during implementation, but I removed it from the final version...
I'm removing go.mod/go.sum changes.
Also, it seems that I messed some vendor update in one of the previous commit :/ The change is unrelated to current PR, so I will fix it in separate PR (#2770).
7de0eb1
to
91b9553
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bskiba The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adding status object (Lease) to Admission Controller.
Adding rbac entries for Leases manipulation.
ref #2738