Skip to content

Commit 962cc53

Browse files
committed
Add check for AZURE_FEDERATED_TOKEN_FILE environment variable in Velero deployment test
Signed-off-by: Tiger Kaovilai <[email protected]>
1 parent db6eadb commit 962cc53

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

api/v1alpha1/cloudstorage_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type CloudStorageSpec struct {
4242
// region for the bucket to be in, will be us-east-1 if not set.
4343
Region string `json:"region,omitempty"`
4444
// provider is the provider of the cloud storage
45-
// +kubebuilder:validation:Enum=aws
45+
// +kubebuilder:validation:Enum=aws;azure;gcp
4646
Provider CloudStorageProvider `json:"provider"`
4747

4848
// https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/[email protected]#section-readme

bundle/manifests/oadp.openshift.io_cloudstorages.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ spec:
7575
description: provider is the provider of the cloud storage
7676
enum:
7777
- aws
78+
- azure
79+
- gcp
7880
type: string
7981
region:
8082
description: region for the bucket to be in, will be us-east-1 if

config/crd/bases/oadp.openshift.io_cloudstorages.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ spec:
7575
description: provider is the provider of the cloud storage
7676
enum:
7777
- aws
78+
- azure
79+
- gcp
7880
type: string
7981
region:
8082
description: region for the bucket to be in, will be us-east-1 if

internal/controller/velero_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,6 +2579,9 @@ func TestDPAReconciler_buildVeleroDeploymentWithAzureWorkloadIdentity(t *testing
25792579
if !foundClientIDEnvVar {
25802580
t.Errorf("Expected AZURE_CLIENT_ID environment variable to be set")
25812581
}
2582+
if !foundTokenFileEnvVar {
2583+
t.Errorf("Expected AZURE_FEDERATED_TOKEN_FILE environment variable to be set")
2584+
}
25822585
} else {
25832586
}
25842587
})

pkg/credentials/stsflow/stsflow.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,4 +385,3 @@ func GetGCPCredentialsFromSecret(clientset kubernetes.Interface, namespace strin
385385

386386
return string(serviceAccountJSON), nil
387387
}
388-

0 commit comments

Comments
 (0)