Repository navigation
prometheus: support tokenFilePath in AzureAD workload identity - #8647
Closed
andreipantelimonuip wants to merge 1 commit into
Closed
andreipantelimonuip wants to merge 1 commit into
andreipantelimonuip wants to merge 1 commit into
Conversation
The azuread workload_identity remote-write config gained a token_file_path option in Prometheus 3.7.0. Expose it as the optional tokenFilePath field on AzureAD's workloadIdentity so users can point Prometheus at a projected service account token mounted at a non-default path. When unset, Prometheus falls back to its built-in default path. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Andrei Pantelimon <[email protected]>
heliapb
reviewed
Jun 25, 2026
heliapb
left a comment
Member
There was a problem hiding this comment.
Hi @andreipantelimonuip thanks for the pr but as defined here #7998 (comment) we haven't added filepath by design
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Only
clientIdandtenantIdwere exposed onspec.remoteWrite[].azureAd.workloadIdentity. Prometheus 3.7.0 added atoken_file_pathoption to the azureadworkload_identityconfig, so this adds the optionaltokenFilePathfield to let the projected service-account token be read from a non-default mount path. When unset, Prometheus keeps using its built-in default (/var/run/secrets/azure/tokens/azure-identity-token).This is needed because azure-workload-identity v1.6.0 changed the projected token mount path, a breaking change for users on that version. Without exposing
tokenFilePaththere is no way to point Prometheus at the new location through the operator.Generated artifacts (CRDs, jsonnet, bundle.yaml, API docs, applyconfiguration, deepcopy) were regenerated via
make.Type of change
CHANGE(fix or feature that would cause existing functionality to not work as expected)FEATURE(non-breaking change which adds functionality)BUGFIX(non-breaking change which fixes an issue)ENHANCEMENT(non-breaking change which improves existing functionality)NONE(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Verification
go test ./pkg/prometheus/passes, including a new golden test (RemoteWriteConfigAzureADWorkloadIdentityTokenFilePath_v3.7.0) assertingtoken_file_pathis rendered into the remote-write config.go build ./...andgo vet ./pkg/prometheus/pass.Changelog entry
AI assistance (Claude) was used for this change and it has been reviewed.