plugin(logs): support customizeable variable resolution for Loki and Splunk - #1362
plugin(logs): support customizeable variable resolution for Loki and Splunk#1362michaelalang wants to merge 3 commits into
Conversation
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.
|
@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. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/hold |
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 centralconfig.Configstruct usingLOGGING_PLUGIN_PIPELINERUN_UID_KEYandLOGGING_PLUGIN_TASKRUN_UID_KEY.details
LOGGING_PLUGIN_PIPELINERUN_UID_KEYandLOGGING_PLUGIN_TASKRUN_UID_KEYtopkg/api/server/config/config.go.getLogRequestParams()to read these keys froms.config, falling back to the standard defaults if not provided in the configuration.Release Notes
LOGGING_PLUGIN_PIPELINERUN_UID_KEYandLOGGING_PLUGIN_TASKRUN_UID_KEYto match corporate enterprise Logstorage systems.