Skip to content

Commit f9c24cd

Browse files
committed
PR Review
Signed-off-by: Joshua Silverio <joshua@acorn.io>
1 parent a62c402 commit f9c24cd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/cache/cache.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ func (c *serviceAccountCache) Get(name, namespace string) (role, aud string, use
8686
}
8787
}
8888
{
89-
resp := c.getCM(name, namespace)
90-
if resp != nil {
91-
return resp.RoleARN, resp.Audience, resp.UseRegionalSTS, resp.TokenExpiration, nil
89+
respCM := c.getCM(name, namespace)
90+
if respCM != nil {
91+
return respCM.RoleARN, respCM.Audience, respCM.UseRegionalSTS, respCM.TokenExpiration, nil
9292
}
9393
}
94-
//if no mutation is needed due to annotations return nil err to allow request through
9594
if respSA != nil && respSA.RoleARN == "" {
9695
return "", "", false, pkg.DefaultTokenExpiration, nil
9796
}
9897
return "", "", false, pkg.DefaultTokenExpiration, fmt.Errorf("service account %s/%s not found in cache and one is expected", namespace, name)
98+
9999
}
100100

101101
func (c *serviceAccountCache) getSA(name, namespace string) *CacheResponse {

0 commit comments

Comments
 (0)