-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
kube-agent-update: Use the RFD-184 webapi proxy update protocol by default when possible #50464
Conversation
🤖 Vercel preview here: https://docs-9hn260mmh-goteleport.vercel.app/docs |
b1fac70
to
f31a176
Compare
🤖 Vercel preview here: https://docs-9wrdwc7ne-goteleport.vercel.app/docs |
integrations/kube-agent-updater/cmd/teleport-kube-agent-updater/main.go
Outdated
Show resolved
Hide resolved
@@ -106,7 +112,16 @@ func main() { | |||
ctrl.Log.Error(trace.BadParameter("--agent-namespace empty"), "agent-namespace must be provided") | |||
os.Exit(1) | |||
} | |||
if versionServer == "" && proxyAddress == "" { |
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.
should we also validate that both aren't empty?
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.
Having both set is a valid configuration (and the default one for most clusters). We will try first via the proxy addr, then fallback to the version server if the proxy responds but does not support the new agent AUs.
|
||
// If the version server is specified, we enable RFD-109 updates | ||
// See https://github.com/gravitational/teleport/blob/master/rfd/0109-cloud-agent-upgrades.md#kubernetes-model | ||
if versionServer != "" { |
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.
should this be a if else instead? Having both versionServer and proxyAddress can create problems?
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.
We explicitly want to support both at the same time and do a failover based on which one is implemented. That's because we don't know in Helm if the proxy server supports the new updater API. This way we are doing some opportunistic thing by default:
- if no custom version server is specified in the chart, we set both proxy && version server
- if the proxy implements the update protocol, it takes precedence
- else we fall back to the good ol' version server
- we don't change anything if we're a custom version server is set in the chart because that would be a breaking change
…fault when possible
…r/main.go Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
45d342b
to
d4dcb01
Compare
Amplify deployment status
|
…fault when possible (#50464) * kube-agent-update: Use the RFD-184 webapi proxy update protocol by default when possible * Update integrations/kube-agent-updater/cmd/teleport-kube-agent-updater/main.go Co-authored-by: Tiago Silva <tiago.silva@goteleport.com> * log update group --------- Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
Part of: RFD-184
Goal (internal): https://github.com/gravitational/cloud/issues/10289
This PR does two changes: