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

Run events controller as separate binary #6529

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

afrittoli
Copy link
Member

Changes

This is the first step towards moving the whole cloudevents logic to a dedicated controller.

The Run controller is already separated from the other controllers, but it's compiled and deployed in the shared binary. In this change we move that controller to a dedicated binary, with its own deployment, service account, roles and bindings.

This new binary shares the config maps from the pipeline binary, so that existing configuration options and docs continue to apply with no change.

Because of injection, all the informers are setup for this binary, which means that the service account requires read access to the various tekton resources. This is fine however considering that eventually this controller will handle events for all tekton pipeline resources.

The publish task is amended to expect the new events image by default as well.

Partially-fixes: #2944
Signed-off-by: Andrea Frittoli [email protected]

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)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

The cloudevents controller for `Run` has been moved to its own binary, with dedicated deployment, service, pod, service account, roles and role bindings. No functional change, no configuration change.

/kind misc

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/misc Categorizes issue or PR as a miscellaneuous one. labels Apr 13, 2023
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 13, 2023
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 13, 2023
config/200-serviceaccount.yaml Outdated Show resolved Hide resolved
config/201-rolebinding.yaml Show resolved Hide resolved
namespace: tekton-pipelines
roleRef:
kind: Role
name: tekton-pipelines-leader-election
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if there's a way to isolate this set of leader election resources with the main controller 🤔 (i don't know if this is feasible)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the leader's election of the new binary will be independent, even if they share the role, but I will double-check.

config/events.yaml Outdated Show resolved Hide resolved
config/events.yaml Outdated Show resolved Hide resolved
This is the first step towards moving the whole cloudevents logic
to a dedicated controller.

The `Run` controller is already separated from the other controllers,
but it's compiled and deployed in the shared binary.
In this change we move that controller to a dedicated binary, with
its own deployment, service account, roles and bindings.

This new binary shares the config maps from the pipeline binary, so
that existing configuration options and docs continue to apply with
no change.

Because of injection, all the informers are setup for this binary,
which means that the service account requires read access to the
various tekton resources. This is fine however considering that
eventually this controller will handle events for all tekton
pipeline resources.

The publish task is amended to expect the new events image by
default as well.

Partially-fixes: tektoncd#2944

Signed-off-by: Andrea Frittoli <[email protected]>
@afrittoli
Copy link
Member Author

/test pull-tekton-pipeline-alpha-integration-tests

Copy link
Member

@wlynch wlynch left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 27, 2023
@afrittoli
Copy link
Member Author

/easycla

@afrittoli afrittoli closed this Apr 27, 2023
@afrittoli afrittoli reopened this Apr 27, 2023
@jerop jerop closed this Apr 27, 2023
@jerop jerop reopened this Apr 27, 2023
@tekton-robot tekton-robot merged commit 626669e into tektoncd:main Apr 27, 2023
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/misc Categorizes issue or PR as a miscellaneuous one. 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.

Move Cloud Events publishing into a separate controller binary
5 participants