Skip to content

Commit 41dd1dc

Browse files
Merge pull request dapr#5951 from ItalyPaleAle/cherry-pick-e4c4eb5
Cherry-pick dapr#5584 into master [DO NOT SQUASH]
2 parents db104ec + 1741e65 commit 41dd1dc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pkg/runtime/runtime.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,11 +2781,6 @@ func (a *DaprRuntime) processComponentSecrets(component componentsV1alpha1.Compo
27812781
}
27822782

27832783
secretStoreName := a.authSecretStoreOrDefault(component)
2784-
secretStore := a.getSecretStore(secretStoreName)
2785-
if secretStore == nil {
2786-
log.Warnf("component %s references a secret store that isn't loaded: %s", component.Name, secretStoreName)
2787-
return component, secretStoreName
2788-
}
27892784

27902785
// If running in Kubernetes, do not fetch secrets from the Kubernetes secret store as they will be populated by the operator.
27912786
// Instead, base64 decode the secret values into their real self.
@@ -2813,6 +2808,12 @@ func (a *DaprRuntime) processComponentSecrets(component componentsV1alpha1.Compo
28132808
continue
28142809
}
28152810

2811+
secretStore := a.getSecretStore(secretStoreName)
2812+
if secretStore == nil {
2813+
log.Warnf("component %s references a secret store that isn't loaded: %s", component.Name, secretStoreName)
2814+
return component, secretStoreName
2815+
}
2816+
28162817
resp, ok := cache[m.SecretKeyRef.Name]
28172818
if !ok {
28182819
// TODO: cascade context.

0 commit comments

Comments
 (0)