Skip to content

Helm: add leader election flags, use lease-based election#3446

Merged
joelanford merged 7 commits intooperator-framework:masterfrom
joelanford:helm-leader-election
Jul 17, 2020
Merged

Helm: add leader election flags, use lease-based election#3446
joelanford merged 7 commits intooperator-framework:masterfrom
joelanford:helm-leader-election

Conversation

@joelanford
Copy link
Copy Markdown
Member

Description of the change:
Helm operator: add leader election flags, use controller-runtime leader election

Motivation for the change:
In general, the controller-runtime leader election method (lease-based) is preferable for most use cases. In the future, if there is a use case to support leader-for-life, we can add another flag to let operator developers choose their leader election mechanism.

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@joelanford joelanford added this to the v1.0.0 milestone Jul 16, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 16, 2020
@joelanford joelanford force-pushed the helm-leader-election branch 2 times, most recently from a061a63 to e81015c Compare July 16, 2020 21:26
Comment thread hack/tests/e2e-helm.sh Outdated

# give permissions to reach the metrics endpoint
kubectl create clusterrolebinding nginx-operator-system-metrics-reader --clusterrole=nginx-operator-metrics-reader --serviceaccount=nginx-operator-system:default
kubectl create clusterrolebinding nginx-operator-system-metrics-reader --clusterrole=nginx-operator-metrics-reader --serviceaccount=${operator_namespace}:default
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread internal/plugins/helm/v1/scaffolds/init.go
Comment thread internal/plugins/helm/v1/scaffolds/templates/makefile.go
Comment thread hack/tests/e2e-helm.sh
Comment thread internal/plugins/helm/v1/scaffolds/templates/manager/config.go
@joelanford joelanford mentioned this pull request Jul 17, 2020
92 tasks
@joelanford joelanford changed the title WIP Helm: add leader election flags, use lease-based election Helm: add leader election flags, use lease-based election Jul 17, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 17, 2020
@joelanford joelanford force-pushed the helm-leader-election branch from 3f4b855 to 775702f Compare July 17, 2020 13:23
Copy link
Copy Markdown
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 17, 2020
@joelanford joelanford merged commit 8b95e1b into operator-framework:master Jul 17, 2020
@joelanford joelanford deleted the helm-leader-election branch July 17, 2020 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants