|
|
@@ -91,7 +91,9 @@ func validateStore(ctx context.Context, namespace string, store esapi.GenericSto
|
|
|
recorder.Event(store, v1.EventTypeWarning, esapi.ReasonInvalidProviderConfig, err.Error())
|
|
|
return fmt.Errorf(errStoreClient, err)
|
|
|
}
|
|
|
-
|
|
|
+ defer func() {
|
|
|
+ cl.Close(ctx)
|
|
|
+ }()
|
|
|
err = cl.Validate()
|
|
|
if err != nil {
|
|
|
cond := NewSecretStoreCondition(esapi.SecretStoreReady, v1.ConditionFalse, esapi.ReasonValidationFailed, errUnableValidateStore)
|