-
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
Limit Kubernetes connections #12275
Limit Kubernetes connections #12275
Conversation
integration/kube_integration_test.go
Outdated
// Create and maintain the maximum amount of open connections | ||
errors := make(chan error) | ||
for i := 0; i < maxConnections; i++ { | ||
go func() { |
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.
Maybe we should have a waitgroup here to wait for all the intended sessions to be opened?
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.
Added a check so that we wait until all sessions are open.
|
||
// MaxKubernetesConnections defines the maximum number of concurrent | ||
// Kubernetes sessions a user may hold. | ||
int64 MaxKubernetesConnections = 18 |
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.
It's more of an question rather than an issue, but do we have any guidelines for using specific scalar value types inside protobuf types? I'm asking just because an int64 seems like an overkill for number of connections, but at the same time I've seen that in other protobuf types we also tend to use int64, e.g:
teleport/lib/events/slice.proto
Line 27 in 3dc51dd
int64 Version = 4; |
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.
I'm not sure we have specific guidelines for this. Here I was merely trying to be consistent with the field concerning max regular connections.
Co-authored-by: Edoardo Spadolini <[email protected]>
3dc51dd
to
616b637
Compare
This PR implements limiting Kubernetes connections the same way as SSH connections can be limited by adding a
max_kubernetes_connections
configuration variable under role options.Fixes #10672