Skip to content

plugin(logs): support customizeable variable resolution for Loki and Splunk - #1362

Open
michaelalang wants to merge 3 commits into
tektoncd:mainfrom
michaelalang:configurable_uid_keys
Open

plugin(logs): support customizeable variable resolution for Loki and Splunk#1362
michaelalang wants to merge 3 commits into
tektoncd:mainfrom
michaelalang:configurable_uid_keys

Conversation

@michaelalang

Copy link
Copy Markdown
Contributor

Changes

  • This commit represents Part 2 of the PR split. It introduces configurable UID keys for PipelineRuns and TaskRuns in the logging plugin.

  • Instead of relying on direct os.Getenv() calls mid-process, this change integrates the keys into the central config.Config struct using LOGGING_PLUGIN_PIPELINERUN_UID_KEY and LOGGING_PLUGIN_TASKRUN_UID_KEY.

  • details

    • Adding LOGGING_PLUGIN_PIPELINERUN_UID_KEY and LOGGING_PLUGIN_TASKRUN_UID_KEY to pkg/api/server/config/config.go.
    • Updating getLogRequestParams() to read these keys from s.config, falling back to the standard defaults if not provided in the configuration.
    • Adding a test case to verify the configurable UID key functionality.

Release Notes

This commit represents Part 2 of the PR split. It introduces configurable
UID keys for PipelineRuns and TaskRuns in the logging plugin.

Instead of relying on direct `os.Getenv()` calls mid-process, this change
integrates the keys into the central `config.Config` struct using
`LOGGING_PLUGIN_PIPELINERUN_UID_KEY` and `LOGGING_PLUGIN_TASKRUN_UID_KEY`.

Changes include:
- Adding `LOGGING_PLUGIN_PIPELINERUN_UID_KEY` and `LOGGING_PLUGIN_TASKRUN_UID_KEY`
  to `pkg/api/server/config/config.go`.
- Updating `getLogRequestParams()` to read these keys from `s.config`, falling
  back to the standard defaults if not provided in the configuration.
- Adding a test case to verify the configurable UID key functionality.

This ensures logging configuration remains centralized, aligns with the
existing `mapstructure` pattern, enables validation at startup, and
prevents configuration values from changing dynamically mid-process.
@tekton-robot

Copy link
Copy Markdown
Contributor

@michaelalang: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

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

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign khrm after the PR has been reviewed.
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.

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

@tekton-robot
tekton-robot requested review from enarha and khrm June 21, 2026 17:01
@tekton-robot tekton-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 21, 2026
@enarha

enarha commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

/hold
Putting this one on hold until we merge #1317 . Then the feature branch can be rebased on main and the duplicate commit removed.

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 22, 2026
@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 6, 2026
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants