Skip to content

Commit

Permalink
fix gracePeriodEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
modulitos authored and haoranleo committed Jan 10, 2025
1 parent 9bd1472 commit 046381c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ func (m *Modifier) buildPodPatchConfig(pod *corev1.Pod) *podPatchConfig {

// Use the STS WebIdentity method if set
gracePeriodEnabled := m.saLookupGraceTime > 0
request := cache.Request{Namespace: pod.Namespace, Name: pod.Spec.ServiceAccountName, RequestNotification: true}
request := cache.Request{Namespace: pod.Namespace, Name: pod.Spec.ServiceAccountName, RequestNotification: gracePeriodEnabled}
response := m.Cache.Get(request)
if !response.FoundInCache && !gracePeriodEnabled {
missingSACounter.WithLabelValues().Inc()
Expand Down

0 comments on commit 046381c

Please sign in to comment.