-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using a custom service account on an ipc-registration. #461
Conversation
One can already configure a custom service account by using the annotation on the configmap. The api will be added in teh next changes.
Mostly FYI (and to save my changes). |
if err != nil { | ||
return nil, errors.Wrapf(err, "failed to retrieve a cloud token for device %q", deviceID) | ||
} | ||
slog.Info("Handing out cloud token", slog.String("DeviceID", deviceID)) | ||
slog.Info("Handing out cloud token", slog.String("DeviceID", deviceID), slog.String("ServiceAccount", sa)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging this here is not so nice, as this part of the code does not know about the fallback-service account and the TokenSource does not log at all and does not know the DeviceId. Also the token-repo does not know about the fallback sa-name, maybe passing it there is the best option.
Ideally we log only one per invocation.
PTAL. Maybe as a followup I pass the defaultSA to the tokenvendor app and not to the token source. Then the token source is just receiving the sa-name and getting a token for it. That also fixes the logging issue. WDYT? |
Maybe two arguments. |
This avoids returning multiple values.
a692385
to
fe01b1f
Compare
Yep, I'll do in a followup. |
One can already configure a custom service account by using the annotation on the configmap. The api will be added in teh next changes.