-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(chart): VPA Updater leaderElection #8777
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
feat(chart): VPA Updater leaderElection #8777
Conversation
|
Hi @phuhung273. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
omerap12
left a comment
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.
Thanks for this, overall looks ok but two comments from my end :)
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| name: {{ include "vertical-pod-autoscaler.updater.fullname" . }}-leader-locking | ||
| namespace: {{ .Release.Namespace }} | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: Role | ||
| name: {{ include "vertical-pod-autoscaler.updater.fullname" . }}-leader-locking | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ include "vertical-pod-autoscaler.updater.fullname" . }} | ||
| namespace: {{ .Release.Namespace }} | ||
| {{- end -}} |
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.
Since all other components use a dedicated role-binding file, can we align this one as well? I don’t mind if the role definition is included in the same file as the role binding, but we should keep it consistent with the other components.
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.
Agree. I was copying from this file https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/charts/vertical-pod-autoscaler/templates/recommender-leader-election-rbac.yaml. But yeah can see most files are following role + rolebinding pattern.
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.
Yeah we should align all components :)
vertical-pod-autoscaler/charts/vertical-pod-autoscaler/templates/updater-role.yaml
Outdated
Show resolved
Hide resolved
|
/ok-to-test |
7894677 to
d7c1988
Compare
| - apiGroups: | ||
| - "coordination.k8s.io" | ||
| resourceNames: | ||
| - vpa-updater |
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.
@adrianmoisey , do you think we can remove 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.
Removing vpa-updater from resourceNames and still work. Waiting if Adrian knows other edge cases.
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.
Yup, I think that's safe to remove
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.
Thank you, it is removed
d7c1988 to
71433cc
Compare
Signed-off-by: phuhung273 <[email protected]>
71433cc to
6645a73
Compare
omerap12
left a comment
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.
Thanks!
/assign @adrianmoisey
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianmoisey, omerap12, phuhung273 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 |
|
/lgtm |
|
/retest |
What type of PR is this?
/kind feature
What this PR does / why we need it:
leaderElectionfor VPA Updaterupdater-roleto only create whenleaderElection.enabled. The role name and its permissions clearly states that it belongs toleaderElectioninstead ofserviceAccount.Which issue(s) this PR fixes:
Relates #8587
Special notes for your reviewer:
Quick test using
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: