Skip to content

Commit 0c555f7

Browse files
flavianmissiopenshift-cherrypick-robot
authored andcommitted
azurepathfixjob: make account key secret optional
this should fix the job for clusters with workload identity
1 parent ade4f32 commit 0c555f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/resource/azurepathfixjob.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ func (gapfj *generatorAzurePathFixJob) expected() (runtime.Object, error) {
8686
return nil, fmt.Errorf("storage not yet provisioned")
8787
}
8888

89+
optional := true
8990
envs := []corev1.EnvVar{
9091
{Name: "AZURE_STORAGE_ACCOUNT_NAME", Value: azureStorage.AccountName},
9192
{Name: "AZURE_CONTAINER_NAME", Value: azureStorage.Container},
@@ -95,6 +96,7 @@ func (gapfj *generatorAzurePathFixJob) expected() (runtime.Object, error) {
9596
{Name: "AZURE_FEDERATED_TOKEN_FILE", Value: azureCfg.FederatedTokenFile},
9697
{Name: "AZURE_ACCOUNTKEY", ValueFrom: &corev1.EnvVarSource{
9798
SecretKeyRef: &corev1.SecretKeySelector{
99+
Optional: &optional,
98100
LocalObjectReference: corev1.LocalObjectReference{
99101
Name: defaults.ImageRegistryPrivateConfiguration,
100102
},
@@ -130,7 +132,7 @@ func (gapfj *generatorAzurePathFixJob) expected() (runtime.Object, error) {
130132
// merges the registry CAs with the cluster's trusted CAs into a single CA bundle.
131133
//
132134
// See man update-ca-trust for more information.
133-
optional := true
135+
optional = true
134136
trustedCAVolume := corev1.Volume{
135137
Name: "trusted-ca",
136138
VolumeSource: corev1.VolumeSource{

0 commit comments

Comments
 (0)