-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
✨(kustomize/v1, go/v3) : Add new LeaderElectionReleaseOnCancel as true option commented to let users know when they can use it #2596
✨(kustomize/v1, go/v3) : Add new LeaderElectionReleaseOnCancel as true option commented to let users know when they can use it #2596
Conversation
7d61129
to
3f67d96
Compare
@joelanford @camilamacedo86 @AlmogBaku |
This feature wasn't supported in the |
3f67d96
to
915c186
Compare
@@ -238,13 +238,16 @@ func main() { | |||
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) | |||
|
|||
{{ if not .ComponentConfig }} | |||
// Setting LeaderElectionReleaseOnCancel to true prevents main.go | |||
// scripts to close when Manager is done and improves the performance of re-election. |
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.
@AlmogBaku All tests are passing now. Could you please review this explanation comment added before moving forward.
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 think we need to discuss if this option should or NOT be added by default?
Also, what is the motivation for that?
What issue are you facing that you want to add to the default scaffold?
See : #2593 (comment)
Let's discuss it in the issue.
/hold
915c186
to
38470dc
Compare
38470dc
to
43525de
Compare
@camilamacedo86 and @AlmogBaku Do we also need to add the comment here https://github.com/kubernetes-sigs/kubebuilder/blob/master/testdata/project-v3-config/main.go#L66? How can we check that it is possible via the |
Hi @NikhilSharmaWe, I think we also need to update the template used by the ComponentConfig option so that we will check its results in the sample. Why? Ensure that all have the same options, and follow the same standard making it easier for us to keep the project maintained. |
@camilamacedo86 Are talking about adding the comment for this case as well?
|
Hi @NikhilSharmaWe, The change shows to be here: Lines 47 to 57 in 019c185
We need to pass the option under the leader election options |
43525de
to
9fd41d4
Compare
9fd41d4
to
97062b2
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.
/lgtm
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, everettraven, NikhilSharmaWe 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 |
/test pull-kubebuilder-e2e-k8s-1-14-10 |
* Upgrade Kubebuilder dep from 3.4.1 to the commit 800fdeec6e5c Signed-off-by: Camila Macedo <[email protected]> - For Golang/Ansible/Helm language-based operators (go/v3, ansible/v1 and helm/v1): applying restrictive SCC for all containers scaffolded by the tool (k8s versions < 1.19 will no longer work with). - For Golang-based language (go/v2) fix the issue introduced by removing the GO111MODULE=on from Dockerfile. ([More info](kubernetes-sigs/kubebuilder#2678)) - For Golang/Ansible/Helm language-based operators (go/v3, ansible/v1 and helm/v1 language (go/v3), add a new comment with the option `leaderElectionReleaseOnCancel` ((More info)[kubernetes-sigs/kubebuilder#2596]) Only to get the changes from what we currently use in SDK from kubebuilder. - Ensure that scaffolds begin to be performed with a restrive Security Context - Be able to do specific follow up PR so we can discuss properly how we will consume the new additions on Kubebuilder - Make eaiser the process to keep SDK updated, otherwise, it is hard to properly review if we wait to do a big PR with all. - Ensure that SDK features can work with the latest changes performed in Kubebuilder **Extra info** You can check the latest changes on Kubebuilder by looking: kubernetes-sigs/kubebuilder@v3.4.1...master Note that SDK users Kubebuilder as a LIB. So that all that is currently important is updated by default when we bump. However, all that was added to Kubebuilder but still not imported/used in SDK will not be added here. Therefore we can do follow up PRs to get the additions. Why? we have significant changes and additions for example adding the support for the phase 2 plugin, but if we try to do it all in the same PR it will be very hard to get properly reviewed. Co-authored-by: Varsha <[email protected]> * trying to fix ansible lint Co-authored-by: Varsha <[email protected]>
…or-framework#5814) * Upgrade Kubebuilder dep from 3.4.1 to the commit 800fdeec6e5c Signed-off-by: Camila Macedo <[email protected]> - For Golang/Ansible/Helm language-based operators (go/v3, ansible/v1 and helm/v1): applying restrictive SCC for all containers scaffolded by the tool (k8s versions < 1.19 will no longer work with). - For Golang-based language (go/v2) fix the issue introduced by removing the GO111MODULE=on from Dockerfile. ([More info](kubernetes-sigs/kubebuilder#2678)) - For Golang/Ansible/Helm language-based operators (go/v3, ansible/v1 and helm/v1 language (go/v3), add a new comment with the option `leaderElectionReleaseOnCancel` ((More info)[kubernetes-sigs/kubebuilder#2596]) Only to get the changes from what we currently use in SDK from kubebuilder. - Ensure that scaffolds begin to be performed with a restrive Security Context - Be able to do specific follow up PR so we can discuss properly how we will consume the new additions on Kubebuilder - Make eaiser the process to keep SDK updated, otherwise, it is hard to properly review if we wait to do a big PR with all. - Ensure that SDK features can work with the latest changes performed in Kubebuilder **Extra info** You can check the latest changes on Kubebuilder by looking: kubernetes-sigs/kubebuilder@v3.4.1...master Note that SDK users Kubebuilder as a LIB. So that all that is currently important is updated by default when we bump. However, all that was added to Kubebuilder but still not imported/used in SDK will not be added here. Therefore we can do follow up PRs to get the additions. Why? we have significant changes and additions for example adding the support for the phase 2 plugin, but if we try to do it all in the same PR it will be very hard to get properly reviewed. Co-authored-by: Varsha <[email protected]> * trying to fix ansible lint Co-authored-by: Varsha <[email protected]>
Fixes #2593