Skip to content

feat(results): expose the remaining Results API settings - #4229

Open
adchauha wants to merge 2 commits into
tektoncd:mainfrom
adchauha:SRVKP-14641
Open

adchauha wants to merge 2 commits into
tektoncd:mainfrom
adchauha:SRVKP-14641

Conversation

@adchauha

Copy link
Copy Markdown
Contributor

Changes

Expose the Results API settings that were missing from TektonConfig.spec.result. The operator writes a set field into tekton-results-api-config and into the api container. An unset field keeps the Results default.
spec.result.performance.kube-api-qps and kube-api-burst are unchanged as CRD fields. They are now also applied to the Results API as K8S_QPS and K8S_BURST. A fractional QPS is truncated there because the API field is an integer. The watcher receives the same values as -qps and -burst.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

TektonConfig.spec.result now accepts the remaining Results API settings, including database pool size, TLS, feature gates, profiling, the record converter, and Loki line formatting. spec.result.performance.kube-api-qps and kube-api-burst are applied to the Results API and to the watcher.

Users can set the rest of the Results API options from TektonConfig
instead of editing tekton-results-api-config by hand. An unset field
keeps the value shipped with Results.
kube-api-qps and kube-api-burst stay on spec.result.performance. The
API receives them as K8S_QPS and K8S_BURST. The watcher receives them
as -qps and -burst, which are the flags that binary accepts.
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 12, 2026
@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 12, 2026
@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.53%. Comparing base (fef90b9) to head (02ea485).
⚠️ Report is 23 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4229      +/-   ##
==========================================
+ Coverage   30.25%   30.53%   +0.27%     
==========================================
  Files         478      478              
  Lines       23169    23274     +105     
==========================================
+ Hits         7010     7106      +96     
- Misses      16159    16168       +9     
Flag Coverage Δ
unit-tests 30.53% <ø> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@olegbet olegbet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No validation has been added for new fields to pkg/apis/operator/v1alpha1/tektonresult_validation.go.
sql_log_level and tls_min_version are effectively enums; db_max_idle_connections, db_max_open_connections, grpc_worker_pool, converter_db_limit should be >= 0.
Invalid values pass straight through and surface only as an API pod crash-loop.
Please suggest enum/range checks mirroring validateRouteTLSTermination (pkg/apis/operator/v1alpha1/tektonresult_validation.go:79).

sql_log_level and tls_min_version only accept the values Results understands.
The connection pool, gRPC worker pool, and converter batch size must be zero or greater.
TektonConfig and TektonResult both run these checks.
@adchauha

Copy link
Copy Markdown
Contributor Author

No validation has been added for new fields to pkg/apis/operator/v1alpha1/tektonresult_validation.go. sql_log_level and tls_min_version are effectively enums; db_max_idle_connections, db_max_open_connections, grpc_worker_pool, converter_db_limit should be >= 0. Invalid values pass straight through and surface only as an API pod crash-loop. Please suggest enum/range checks mirroring validateRouteTLSTermination (pkg/apis/operator/v1alpha1/tektonresult_validation.go:79).

Added. sql_log_level and tls_min_version are checked as enums, and db_max_idle_connections, db_max_open_connections, grpc_worker_pool, and converter_db_limit must be >= 0. The same checks run for TektonConfig and TektonResult. The webhook now rejects them so the CR is not accepted with a value Results will drop.

@adchauha
adchauha requested a review from olegbet October 13, 2026 08:25
@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found here.

Details 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants