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

TEP-0085: Per-Namespace Controller Configuration [Proposal] #607

Closed
wants to merge 1 commit into from

Conversation

leiyanggz
Copy link

In TEP-0085 we proposed the support for overriding tekton-pipelines-controller's configuration on a per-namespace basis.

In this pull request, we include the proposal to configure the feature-flags configuration per namespace which is implemented in Tekton Pipelines Pull Request #4499

In summary, we propose enabling the controller's feature flags configuration per namespace via a new feature-flags ConfigMap in each of the candidate namespaces to override the properties defined in the feature-flags ConfigMap in the default system namespace, and the candidate namespaces are included in a new environment variable in the tekton-pipelines-controller.

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign khrm
You can assign the PR to them by writing /assign @khrm in a comment when ready.

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 24, 2022
@jerop
Copy link
Member

jerop commented Jan 24, 2022

thank you @leiyanggz 😸

/assign

cc @sbwsg @vdemeester @pritidesai @dibyom
(from the problem statement - #506)

@pritidesai
Copy link
Member

thank you @leiyanggz 👍
/assign

@pritidesai
Copy link
Member

Please add yourself as author and set the status to implementable:

status: implementable
title: Per-Namespace Controller Configuration
creation-date: '2021-08-25'
last-updated: '2022-01-24'
authors:
- '@sbwsg'
- '@jerop'
- '@leiyanggz'

@@ -79,6 +80,42 @@ As a contributor, I need to test my behavioral changes to ensure that they work
- Operator can allow for configuration to be defined on per-namespace basis
- User can specify and use a customized configuration for a given namespace

## Proposal

To enable the `tekton-pipelines-controller`'s feature flags configuration per namespace, we propose adding a new `configmap` with the same name `feature-flags` in each of the candidate namespaces, which contains the properties to override for all the `Pipelineruns` created in this specific namespace.
Copy link
Member

Choose a reason for hiding this comment

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

please add a link to the supported properties in the proposal.

Also, please update the documentation in the implementation PR to include this new configmap once the proposal is merged.

Copy link
Member

Choose a reason for hiding this comment

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

Since the customization is spreading across the entire namespace, I am guessing all the resources under that namespace will be impacted, including pipelineRun, taskRun, and run.

Copy link
Member

Choose a reason for hiding this comment

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

I would like for us to use a prefix here, like tekton-feature-flags (similar, tekton-defaults, …). Mainly to make sure we don't run the risk of conflictings with something else in the cluster/namespace that would have a different schema and mean something different.

scope-when-expressions-to-task: "true"
```

The candidate namespaces are included in a new environment variable `CONFIG_FEATURE_FLAGS_CUSTOMIZATION_NAMESPACES`.
Copy link
Member

Choose a reason for hiding this comment

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

Please add one more sentence explaining this env. variable can be set in the pipeline-controller deployment resource. Thanks for adding example below 👍

What happens when a namespace is listed in the deployment resource but does not exist in the system? Please add a little more explanation on such scenarios.

Copy link
Member

Choose a reason for hiding this comment

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

just to add to @pritidesai comment it would be great to know what happen when this env variable is modified, describing what happen to existing resources and if only apply to newly created resources.

scope-when-expressions-to-task: "true"
```

The candidate namespaces are included in a new environment variable `CONFIG_FEATURE_FLAGS_CUSTOMIZATION_NAMESPACES`.
Copy link
Member

Choose a reason for hiding this comment

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

just to add to @pritidesai comment it would be great to know what happen when this env variable is modified, describing what happen to existing resources and if only apply to newly created resources.

- name: tekton-pipelines-controller
image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/controller
env:
- name: CONFIG_FEATURE_FLAGS_CUSTOMIZATION_NAMESPACES
Copy link
Member

Choose a reason for hiding this comment

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

is it a conscious decision to use a env variable instead of an entry in the tekton-pipelines feature-flags configmap?

Copy link

Choose a reason for hiding this comment

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

One of the nice benefits of making this a field in the feature-flags configmap would be that adding new namespaces wouldn't require a controller restart.

Copy link
Member

Choose a reason for hiding this comment

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

  • Is this environment variable required or optional ? a.k.a. what happens when it's not present ?
  • Do we see value in supporting regular expression here ?

Asking those question as I think one of the main use-case here might be to enable this for all namespace but a certain set of them for example. It wouldn't scale if each time a new namespace is created in the cluster, the cluster-admin need to updated the pipeline deployment spec.

Copy link
Member

@chmouel chmouel Jan 26, 2022

Choose a reason for hiding this comment

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

this raises an extra question if we support regexp/globing, do we want to support negation ? i.e: "tekton-.*" but not "tekton-pipelines"

in the same spriit of negation, maybe it makes sense to say, matches it for every namespaces on the cluster, but not for the admin namespaces like tekton-* openshift-* kube-* or whatever system namespaces we have.

@vdemeester
Copy link
Member

/kind tep

@tekton-robot tekton-robot added the kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). label Jan 27, 2022
@jerop
Copy link
Member

jerop commented Mar 14, 2022

@leiyanggz - please join us in one of the API WG on Mondays 12pm ET to discuss the review comments in this TEP and move it forward, happy to schedule an ad-hoc meeting if the time doesn't work for you, please let us know :)

@afrittoli
Copy link
Member

/test pull-community-teps-lint

@tekton-robot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 19, 2022
@tekton-robot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 19, 2022
@vdemeester vdemeester self-assigned this Jul 25, 2022
@tekton-robot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Contributor

@tekton-robot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

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.

@vdemeester
Copy link
Member

vdemeester commented Aug 24, 2022

I will carry this one 😇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: UnAssigned
Development

Successfully merging this pull request may close these issues.

None yet

7 participants