Skip to content

Commit

Permalink
fixup: add non-thread safe comment to AddK8sSecretBasedIdentity
Browse files Browse the repository at this point in the history
Signed-off-by: KevFan <[email protected]>
  • Loading branch information
KevFan committed Jan 27, 2025
1 parent 00b7b87 commit 692c2b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/evaluators/identity/api_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func (a *APIKey) GetK8sSecretLabelSelectors() k8s_labels.Selector {
return a.LabelSelectors
}

// Caution! This function is not thread-safe. Make sure to acquire a lock before calling it.
func (a *APIKey) AddK8sSecretBasedIdentity(ctx context.Context, new k8s.Secret) {
if !a.withinScope(new.GetNamespace()) {
return
Expand Down

0 comments on commit 692c2b4

Please sign in to comment.