mirror of
https://github.com/external-secrets/external-secrets.git
synced 2024-12-15 17:51:01 +00:00
docs: starts with filter comment
This commit is contained in:
parent
5ab6ec4e27
commit
f5293c58be
1 changed files with 6 additions and 0 deletions
|
@ -247,6 +247,12 @@ func (sm *ProviderGCP) findByName(ctx context.Context, ref esv1beta1.ExternalSec
|
|||
}
|
||||
log.V(1).Info("gcp sm findByName found", "secrets", strconv.Itoa(it.PageInfo().Remaining()))
|
||||
key := sm.trimName(resp.Name)
|
||||
// If we don't match we skip.
|
||||
// Also, if we have path, and it is not at the beguining we skip.
|
||||
// We have to check if path is at the beguining of the key because
|
||||
// there is no way to create a `name:%s*` (starts with) filter
|
||||
// At https://cloud.google.com/secret-manager/docs/filtering you can use `*`
|
||||
// but not like that it seems.
|
||||
if !matcher.MatchName(key) || (ref.Path != nil && !strings.HasPrefix(key, *ref.Path)) {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue