-
Notifications
You must be signed in to change notification settings - Fork 519
Don't contact trust_bundle_url needlessly #6065
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
Conversation
The agent contacts the trust_bundle_url on startup even if it already has a trust bundle. If connection fails, the agent fails. This requirement puts more load on the server needlessly, and either makes the agent lower availability or puts higher availability requirements on the server. Change it so that this doesn't happen. Signed-off-by: Kevin Fox <[email protected]>
Fix broken out of #5892 |
Signed-off-by: Kevin Fox <[email protected]>
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.
Looking good! Thank you @kfox1111
pkg/agent/agent.go
Outdated
InsecureBootstrap := false | ||
BootstrapTrustBundle, err := sto.LoadBundle() |
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.
The variables InsecureBootstrap and BootstrapTrustBundle are declared with an uppercase first letter, which is typically reserved for exported variables. Consider renaming them to insecureBootstrap and bootstrapTrustBundle.
pkg/agent/agent.go
Outdated
InsecureBootstrap := false | ||
BootstrapTrustBundle, err := sto.LoadBundle() |
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.
Same here.
Signed-off-by: Kevin Fox <[email protected]>
Pull Request check list
Documentation updated?Description of change
The agent contacts the trust_bundle_url on startup even if it already has a trust bundle. If connection fails, the agent fails. This requirement puts more load on the server needlessly, and either makes the agent lower availability or puts higher availability requirements on the server. Change it so that this doesn't happen.
Which issue this PR fixes
Fixes: #5893