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
✨ use Deployment for v2 scaffolding #727
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mengqiy 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 |
This is ready for review. |
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 have a few comments.
FWIW, I'm not certain we actually need to switch (what's the actual benefit here?). Turning on leader election is still useful though. |
For the most common case (stateless controller), people don't get more benefits by using StatefulSet instead of Deployment when leader election is enabled. And using StatefulSet actually confuses the users, I saw multiple users confused by this before. |
d8721da
to
5881075
Compare
Addressed comments and rebased to resolve conflicts. |
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.
Looks good. Have a few minor comments.
@@ -76,9 +76,7 @@ spec: | |||
matchLabels: | |||
control-plane: controller-manager | |||
controller-tools.k8s.io: "1.0" |
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.
Can we remove this annotation from all manifests ?
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.
controller-tools.k8s.io: "1.0"
We can definitely remove these labels. But this may end up causing we duplicate almost all of the shared files, because most manifests files have that label. So I'd like to do it in a followup PR, since it's a cleanup.
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.
Filed #764 to track
I will squash commits before merging. So putting a hold label for now. |
/lgtm |
New changes are detected. LGTM label has been removed. |
Squashed commits |
v2 scaffolding: deployment w/ leader election (add necessary marks for rbac and change Makefile)
v1 scaffolding (no changes): statefulSet w/o leader election
fix a singular|plural noun bug introduced in ⚠️ controller-tools v0.2.0 scaffolding update #682 that causes it to not be able to locate a patch.
improve webhook scaffolding by re-org kustomize config and variable and better comments
close #535