Skip to content

Commit ad6b1c4

Browse files
author
Chris Every
authored
Merge pull request #270 from ovotech/enable-filter-in-non-rotate-mode
Enable filter in non-rotate mode
2 parents c3da248 + 17c8669 commit ad6b1c4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/rotate/rotatekeys.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,12 @@ func filterKey(account string, config config.Config, key keys.Key) (eligible boo
424424
//this means an overriding account has been supplied, i.e. from CLI
425425
eligible = key.Account == account
426426
} else if !config.RotationMode {
427-
//rotation mode is false, so include the key so its age can be used
427+
// rotation mode is false, we still want to filter down to specific
428+
// service accounts if the AccountFilter has been set
429+
if len(config.AccountFilter.Mode) > 0 {
430+
eligible, err = isKeyEligible(config, key)
431+
return
432+
}
428433
eligible = true
429434
} else {
430435
if eligible, err = isKeyEligible(config, key); err != nil {

0 commit comments

Comments
 (0)