diff --git a/internal/cnpgi/common/common.go b/internal/cnpgi/common/common.go index b9d4280..7fa0674 100644 --- a/internal/cnpgi/common/common.go +++ b/internal/cnpgi/common/common.go @@ -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) } diff --git a/pkg/metadata/labels_annotations.go b/pkg/metadata/labels_annotations.go index cf6ec56..e277a23 100644 --- a/pkg/metadata/labels_annotations.go +++ b/pkg/metadata/labels_annotations.go @@ -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" )