Skip to content
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

Different configmap for Leader Election per deployment #7014

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

khrm
Copy link
Contributor

@khrm khrm commented Aug 2, 2023

Change configmap for leader election. This is so that we can apply changes per deployment. Also changed the resolvers leader election name so that we can avoid conflict with the controllers config if we install in the same namespace.

Fixes #6979

Changes

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Change configmap for LeaderElection of webhook to config-leader-election-webhook, event controller to config-leader-election-event and resolvers to config-leader-election-resolvers

/kind bug

@tekton-robot tekton-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Aug 2, 2023
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 2, 2023
@khrm
Copy link
Contributor Author

khrm commented Aug 2, 2023

Can we include this in v0.50.x?

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

One comment, otherwise LGTM 👼🏼
cc @tektoncd/core-maintainers

config/resolvers/resolvers-deployment.yaml Show resolved Hide resolved
config/config-leader-election-event.yaml Outdated Show resolved Hide resolved
@piyush-garg
Copy link
Contributor

we should change the name for pipelines-controller too, not use the default atleast

@khrm khrm force-pushed the b/leaderElectionConfig branch 2 times, most recently from 2001eaa to e045c1c Compare August 2, 2023 08:57
Copy link
Contributor Author

@khrm khrm left a comment

Choose a reason for hiding this comment

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

/retest

@khrm
Copy link
Contributor Author

khrm commented Aug 14, 2023

I just remember I need to update roles. That should fix the test failures.

@khrm khrm force-pushed the b/leaderElectionConfig branch 4 times, most recently from 2e94e09 to d5f6ee9 Compare August 14, 2023 07:00
@khrm
Copy link
Contributor Author

khrm commented Aug 14, 2023

I have changed the config name for pipelines-controller also.

@khrm
Copy link
Contributor Author

khrm commented Aug 14, 2023

@vdemeester @lbernick @dibyom Can we get this merged?

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 14, 2023
@khrm
Copy link
Contributor Author

khrm commented Aug 14, 2023

Should we include this fix in 0.50.2? Without this fix, setting HA for pipelines controller is changing triggers, webhook, events and resolvers (if in same namespace) config also.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JeromeJu, vdemeester

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@Yongxuanzhang Yongxuanzhang left a comment

Choose a reason for hiding this comment

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

nit: I think this doc link needs to be updated?

Leader election can be configured in [config-leader-election.yaml](./../config/config-leader-election.yaml). The ConfigMap defines the following parameters:

@wlynch wlynch removed their request for review August 30, 2023 17:41
@jerop jerop added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 20, 2023
@jerop jerop removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 20, 2023
@jerop jerop added this to the Pipelines v0.52 milestone Sep 20, 2023
@jerop
Copy link
Member

jerop commented Sep 20, 2023

@khrm if you have a moment to update the docs, can review this in time for v0.52 release (added it to the milestone) 🙏🏾

@khrm
Copy link
Contributor Author

khrm commented Sep 20, 2023

@jerop It's quite late. I will update it tomorrow morning.

@jerop
Copy link
Member

jerop commented Sep 20, 2023

no rush, moved it to the next milestone -- @pritidesai is cutting the release today

Change configmap for leader election. This is so that we can
apply changes per deployment. Also changed resolvers leader election
name so that we can avoid conflict with controllers config if we install
in same namespace.
@khrm khrm force-pushed the b/leaderElectionConfig branch from d5f6ee9 to 89e82fd Compare September 29, 2023 10:58
@vdemeester
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 2, 2023
@vdemeester
Copy link
Member

/cherry-pick release-v0.50.x

@tekton-robot
Copy link
Collaborator

@vdemeester: once the present PR merges, I will cherry-pick it on top of release-v0.50.x in a new PR and assign it to you.

In response to this:

/cherry-pick release-v0.50.x

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/test-infra repository.

@tekton-robot tekton-robot merged commit 1e0cea2 into tektoncd:main Oct 2, 2023
2 checks passed
@tekton-robot
Copy link
Collaborator

@vdemeester: #7014 failed to apply on top of branch "release-v0.50.x":

Applying: Different config map for Leader Election per deployment
Using index info to reconstruct a base tree...
M	config/200-role.yaml
Falling back to patching base and 3-way merge...
Auto-merging config/200-role.yaml
CONFLICT (content): Merge conflict in config/200-role.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Different config map for Leader Election per deployment
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-v0.50.x

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/test-infra repository.

piyush-garg added a commit to piyush-garg/operator that referenced this pull request Nov 28, 2023
This will update the name of the configmap responsible for
controller to contain config of leader election

Based on the PR on pipeline upstream
tektoncd/pipeline#7014
piyush-garg added a commit to piyush-garg/operator that referenced this pull request Nov 28, 2023
This will update the name of the configmap responsible for
controller to contain config of leader election

Based on the PR on pipeline upstream
tektoncd/pipeline#7014
tekton-robot pushed a commit to tektoncd/operator that referenced this pull request Nov 28, 2023
This will update the name of the configmap responsible for
controller to contain config of leader election

Based on the PR on pipeline upstream
tektoncd/pipeline#7014
tekton-robot pushed a commit to tekton-robot/operator that referenced this pull request Nov 28, 2023
This will update the name of the configmap responsible for
controller to contain config of leader election

Based on the PR on pipeline upstream
tektoncd/pipeline#7014
tekton-robot pushed a commit to tektoncd/operator that referenced this pull request Nov 28, 2023
This will update the name of the configmap responsible for
controller to contain config of leader election

Based on the PR on pipeline upstream
tektoncd/pipeline#7014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split HA configuration per controller or controller's binary
7 participants