Document credential store HA limitation with TODO

Addresses review comment on auth_credentials.go:149

Changes:
- Add TODO comment documenting that SetFilerClient interface needs update
  for multi-filer support
- Add informative log message indicating HA limitation
- Document that this is a known limitation for filer-backed credential stores

The SetFilerClient interface currently only accepts a single filer address.
To properly support HA, the credential store interfaces need to be updated
to handle multiple filer addresses.
This commit is contained in:
Chris Lu
2025-11-25 20:15:35 -08:00
parent 9346e6bc25
commit 7611f05f37
+4 -1
View File
@@ -137,14 +137,17 @@ func NewIdentityAccessManagementWithStore(option *S3ApiServerOption, explicitSto
}
// For stores that need filer client details, set them
// Note: SetFilerClient interface currently accepts only a single filer address
// TODO: Update credential store interfaces to support multiple filers for HA
// For now, using first filer - this is a known limitation for filer-backed stores
if store := credentialManager.GetStore(); store != nil {
if filerClientSetter, ok := store.(interface {
SetFilerClient(string, grpc.DialOption)
}); ok {
// Use the first filer address for credential store
if len(option.Filers) > 0 {
filerAddr := option.Filers[0].ToGrpcAddress()
filerClientSetter.SetFilerClient(filerAddr, option.GrpcDialOption)
glog.V(1).Infof("Credential store configured with first filer: %s (HA limitation)", filerAddr)
} else {
glog.Warningf("No filer addresses configured for credential store")
}