refactor: mispelled auth method naming

Signed-off-by: Gabriele Fedi <gabriele.fedi@enterprisedb.com>
This commit is contained in:
Gabriele Fedi 2025-11-18 09:28:11 +01:00
parent cdb893a70d
commit 2cb76ef622
2 changed files with 8 additions and 8 deletions

View File

@ -105,8 +105,8 @@ func BuildCertificateFilePath(objectStoreName string) string {
// ContextWithProviderOptions enriches the context with cloud service provider specific options
// based on the ObjectStore resource
func ContextWithProviderOptions(ctx context.Context, objectStore apiv1.ObjectStore) context.Context {
if objectStore.GetAnnotations()[pluginmetadata.UseDefaultAzureCredentialsAnnotationName] ==
pluginmetadata.UseDefaultAzureCredentialsTrueValue {
if objectStore.GetAnnotations()[pluginmetadata.UseDefaultAzureCredentialAnnotationName] ==
pluginmetadata.UseDefaultAzureCredentialTrueValue {
return command.ContextWithDefaultAzureCredentials(ctx, true)
}

View File

@ -4,12 +4,12 @@ package metadata
const MetadataNamespace = "barmancloud.cnpg.io"
const (
// UseDefaultAzureCredentialsAnnotationName is an annotation that can be set
// on an ObjectStore resource to enable the authentication to Azure via DefaultAzureCredentials.
// UseDefaultAzureCredentialAnnotationName is an annotation that can be set
// on an ObjectStore resource to enable the authentication to Azure via DefaultAzureCredential.
// This is meant to be used with inheritFromAzureAD enabled.
UseDefaultAzureCredentialsAnnotationName = MetadataNamespace + "/useDefaultAzureCredentials"
UseDefaultAzureCredentialAnnotationName = MetadataNamespace + "/useDefaultAzureCredential"
// UseDefaultAzureCredentialsTrueValue is the value for the annotation
// barmancloud.cnpg.io/useDefaultAzureCredentials to enable the DefaultAzureCredentials auth mechanism.
UseDefaultAzureCredentialsTrueValue = "true"
// UseDefaultAzureCredentialTrueValue is the value for the annotation
// barmancloud.cnpg.io/useDefaultAzureCredential to enable the DefaultAzureCredentials auth mechanism.
UseDefaultAzureCredentialTrueValue = "true"
)