TEP-0085: Add design proposal for per-namespace controller configuration#1250
TEP-0085: Add design proposal for per-namespace controller configuration#1250waveywaves wants to merge 1 commit intotektoncd:mainfrom
Conversation
92d7102 to
03e600d
Compare
|
PR is in draft state right now, so reviews are not necessary as I need to take a few passes through the draft still and present it in the working group call first. |
03e600d to
da27ad3
Compare
|
/test pull-community-teps-lint |
da27ad3 to
e04d77f
Compare
|
/test pull-community-teps-lint |
1 similar comment
|
/test pull-community-teps-lint |
afrittoli
left a comment
There was a problem hiding this comment.
Just a small question, looks good to me, thank you for reviving this!
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afrittoli The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test pull-community-teps-lint |
4a8d153 to
38b0700
Compare
38b0700 to
e55a4be
Compare
b3e9006 to
0eff574
Compare
0eff574 to
507d421
Compare
vdemeester
left a comment
There was a problem hiding this comment.
Few comments, overall looks good.
| | Section | Summary | | ||
| |---------|---------| | ||
| | [Overview](#overview) | Four-component design: ConfigMaps, gate, merging, field categorization | | ||
| | [Namespace ConfigMap Discovery](#namespace-configmap-discovery) | Label-based discovery, ConfigMap naming conventions | | ||
| | [Operator Control via enforcedConfigLevel](#operator-control-via-enforcedconfiglevel) | Cluster-level gate: `cluster` (default) or `namespace` | | ||
| | [Configuration Hierarchy and Merging](#configuration-hierarchy-and-merging) | Three-level precedence, raw map merge before parsing | | ||
| | [Overridable Fields](#overridable-fields) | Field-by-field categorization for config-defaults and feature-flags | | ||
| | [Security Considerations](#security-considerations) | Six safeguards: opt-in, non-overridable fields, RBAC, system NS exclusion | | ||
| | [Displaying Merged Configuration](#displaying-merged-configuration) | Annotation, logs, and future CLI for config inspection | |
There was a problem hiding this comment.
nit: we usually don't have those summary 🙃
There was a problem hiding this comment.
We don't but I added the summary table to the doc for making this easier to read. It was a mindful addition. Should I remove it ?
Rewrite TEP-0085 with a complete design proposal based on lessons learned from implementing TEP-0138 and reviewing PR tektoncd#607 feedback. Key changes: - Label-based namespace ConfigMap discovery (modeled after Tekton Pruner) - enforcedConfigLevel gate in cluster feature-flags ConfigMap - Field-by-field merge at raw map level before parsing (boolean disambiguation) - Explicit overridable/cluster-only field categorization for config-defaults and feature-flags - Namespace-aware webhook defaulting via shared NamespaceConfigCache (no Knative vendor changes) - Operator lockdown via non-overridable-fields key - Security model: opt-in, stability gating, system namespace exclusion - Six mermaid diagrams illustrating architecture and data flow - Prior art analysis (ResourceQuota, Prometheus Operator, cert-manager, CoreDNS) - Six alternatives evaluated with rationale - Test plan with CI testing matrix - Implementation milestones Also updates teps/README.md status from proposed to implementable. Addresses: tektoncd/pipeline#9153, tektoncd/pipeline#4190
507d421 to
48b5dfd
Compare
|
Consider changing the name of the tenant configmaps to either be configuratble or have them be more unique |
Adds support for namespace-scoped ConfigMap overrides of config-defaults and feature-flags. When per-namespace-configuration is enabled, ConfigMaps named tekton-config-defaults and tekton-feature-flags in user namespaces (labeled with tekton.dev/pipeline-config: "true") override the cluster-level defaults on a field-by-field basis. Key features: - LRU cache for namespace ConfigMaps (configurable size) - Field-by-field merge with security field protection - Non-overridable fields cannot be overridden per namespace - Operators can lock additional fields via non-overridable-fields - Integrated into TaskRun/PipelineRun reconcilers and webhook defaulting Part of: tektoncd/community#1250 (TEP-0085) Fixes: tektoncd#4190 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds support for namespace-scoped ConfigMap overrides of config-defaults and feature-flags. When per-namespace-configuration is enabled, ConfigMaps named tekton-config-defaults and tekton-feature-flags in user namespaces (labeled with tekton.dev/pipeline-config: "true") override the cluster-level defaults on a field-by-field basis. Key features: - LRU cache for namespace ConfigMaps (configurable size) - Field-by-field merge with security field protection - Non-overridable fields cannot be overridden per namespace - Operators can lock additional fields via non-overridable-fields - Integrated into TaskRun/PipelineRun reconcilers and webhook defaulting Part of: tektoncd/community#1250 (TEP-0085) Fixes: tektoncd#4190
Adds support for namespace-scoped ConfigMap overrides of config-defaults and feature-flags. When per-namespace-configuration is enabled, ConfigMaps named tekton-config-defaults and tekton-feature-flags in user namespaces (labeled with tekton.dev/pipeline-config: "true") override the cluster-level defaults on a field-by-field basis. Key features: - LRU cache for namespace ConfigMaps (configurable size) - Field-by-field merge with security field protection - Non-overridable fields cannot be overridden per namespace - Operators can lock additional fields via non-overridable-fields - Integrated into TaskRun/PipelineRun reconcilers and webhook defaulting Part of: tektoncd/community#1250 (TEP-0085) Fixes: tektoncd#4190 Co-Authored-By: Claude <noreply@anthropic.com>
Adds support for namespace-scoped ConfigMap overrides of config-defaults and feature-flags. When per-namespace-configuration is enabled, ConfigMaps named tekton-config-defaults and tekton-feature-flags in user namespaces (labeled with tekton.dev/pipeline-config: "true") override the cluster-level defaults on a field-by-field basis. Key features: - LRU cache for namespace ConfigMaps (configurable size) - Field-by-field merge with security field protection - Non-overridable fields cannot be overridden per namespace - Operators can lock additional fields via non-overridable-fields - Integrated into TaskRun/PipelineRun reconcilers and webhook defaulting Part of: tektoncd/community#1250 (TEP-0085) Fixes: tektoncd#4190 Co-Authored-By: Claude <noreply@anthropic.com>
Adds support for namespace-scoped ConfigMap overrides of config-defaults and feature-flags. When per-namespace-configuration is enabled, ConfigMaps named tekton-config-defaults and tekton-feature-flags in user namespaces (labeled with tekton.dev/pipeline-config: "true") override the cluster-level defaults on a field-by-field basis. Key features: - LRU cache for namespace ConfigMaps (configurable size) - Field-by-field merge with security field protection - Non-overridable fields cannot be overridden per namespace - Operators can lock additional fields via non-overridable-fields - Integrated into TaskRun/PipelineRun reconcilers and webhook defaulting Part of: tektoncd/community#1250 (TEP-0085) Fixes: tektoncd#4190 Co-Authored-By: Claude <noreply@anthropic.com>
Adds support for namespace-scoped ConfigMap overrides of config-defaults and feature-flags. When per-namespace-configuration is enabled, ConfigMaps named tekton-config-defaults and tekton-feature-flags in user namespaces (labeled with tekton.dev/pipeline-config: "true") override the cluster-level defaults on a field-by-field basis. Key features: - LRU cache for namespace ConfigMaps (configurable size) - Field-by-field merge with security field protection - Non-overridable fields cannot be overridden per namespace - Operators can lock additional fields via non-overridable-fields - Integrated into TaskRun/PipelineRun reconcilers and webhook defaulting Part of: tektoncd/community#1250 (TEP-0085) Fixes: tektoncd#4190 Co-Authored-By: Claude <noreply@anthropic.com>
Summary
This PR revises TEP-0085 from a problem-statement-only document (merged in PR #506) into a full design proposal for per-namespace controller configuration in Tekton Pipelines.
The original design proposal (PR #607) was closed without addressing reviewer feedback from @vdemeester, @chmouel, and @pritidesai. This revision incorporates all that feedback and updates the design to reflect the current Tekton architecture.
/kind tep
Design Overview
Cluster-level changes (new fields in
feature-flagsConfigMap):enforced-config-level:cluster(default, off) ornamespace(enables per-NS overrides)namespace-config-cache-size: LRU cache cap for the controller (default: 1000)non-overridable-fields: operator lockdown for additional fields beyond built-in cluster-only setNamespace-level: Namespace admins create labeled ConfigMaps (
tekton-config-defaults,tekton-feature-flags) with two required labels:app.kubernetes.io/part-of: tekton-pipelines(Kubernetes standard, identifies as Tekton resource)tekton.dev/config-type: namespace(marks as namespace config override)Architecture:
NamespaceConfigCachewith LRU eviction. Loads namespace ConfigMaps on first reconciliation via direct GET, starts namespace-scoped WATCH for updates. No cluster-wide LIST at startup.map[string]stringmerge before parsing (preserves boolean field disambiguation). Precedence: namespace > cluster > hardcoded defaults.non-overridable-fieldsoperator lockdown, system namespace exclusion.Key Design Decisions
Addresses Prior Feedback
All reviewer feedback from the closed PR #607:
Related
/cc @vdemeester @jerop