Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

nutmos
Copy link
Contributor

@nutmos nutmos commented Aug 16, 2025

Description

Due to the new feature introduced in the Prometheus 3.5.0, the field client_id under Azure AD Managed Identity in Remote Write is allowed to be the blank support system assigned managed identity. This PR changes the ClientID field to be optional and will place the empty string in the config when the field is not being set.

Fixes #7562

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

Unit Testing

Changelog entry

- Change the field azureAd.managedIdentity.clientID under RemoteWriteSpec to be the optional field.

@nutmos nutmos marked this pull request as ready for review August 18, 2025 11:03
@nutmos nutmos requested a review from a team as a code owner August 18, 2025 11:03
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

I think that we need to update validateRemoteWriteSpec() (in pkg/prometheus/operator.go) to fail when the field is empty and we're on Prometheus < v3.5.0.

// The client id to be used with Azure AD Managed Identity
// For Prometheus >= 3.5.0, this field is allowed to be empty to support system assigned managed identity.
// +optional
ClientID string `json:"clientId"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ClientID string `json:"clientId"`
// +kubebuilder:validation:MinLength:=1
ClientID *string `json:"clientId"`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relax validation on Azure clientID field
2 participants