-
Notifications
You must be signed in to change notification settings - Fork 15
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 the number of components (kubelet, kube-proxy and rivers) that can be updated simultaneously #630
Conversation
- Prevent large amounts access to the Internet - Prevent large amounts access to APIServer - Prevent all kubelets from going down Signed-off-by: zoetrope <[email protected]>
Signed-off-by: zoetrope <[email protected]>
…arts. Signed-off-by: zoetrope <[email protected]>
Signed-off-by: zoetrope <[email protected]>
Signed-off-by: zoetrope <[email protected]>
73b4b03
to
c6666a2
Compare
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 code itself seems good to me.
server/strategy.go
Outdated
} | ||
return ops | ||
} | ||
|
||
func k8sOps(c *cke.Cluster, nf *NodeFilter, cs *cke.ClusterStatus) (ops []cke.Operator) { | ||
func separateOperators(nodes []*cke.Node, createOps func(ns []*cke.Node) cke.Operator, maxConcurrentUpdates int) (ops []cke.Operator) { |
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.
Just a trivial point, but splitOperators()
would be more appropriate.
https://www.google.com/search?q=separate+slice+golang
flgCertsGCInterval = pflag.String("certs-gc-interval", "1h", "tidy interval for expired certificates") | ||
flgSessionTTL = pflag.String("session-ttl", "60s", "leader session's TTL") | ||
flgDebugSabakan = pflag.Bool("debug-sabakan", false, "debug sabakan integration") | ||
flgMaxConcurrentUpdates = pflag.Int("max-concurrent-updates", 10, "the maximum number of components that can be updated simultaneously") |
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.
flgMaxConcurrentUpdates = pflag.Int("max-concurrent-updates", 10, "the maximum number of components that can be updated simultaneously") | |
flgMaxConcurrentUpdates = pflag.Int("max-concurrent-updates", 10, "the maximum number of worker-node components that can be updated simultaneously") |
The description above seems too simple.
It would be nice to add an explanation for how CKE uses this parameter.
How about updating the following section?
https://github.com/cybozu-go/cke/blob/v1.25.3/docs/cluster_overview.md#worker-nodes
CKE deploys each worker-node component concurrently on multiple nodes.
You can control the deployment concurrency by specifying the max-concurrent-updates
command-line option.
…w option Signed-off-by: zoetrope <[email protected]>
Signed-off-by: zoetrope <[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.
LGTM
Add a new cli option
max-concurrent-updates
.It can limit the number of components (kubelet, kube-proxy and rivers) that can be updated simultaneously.
This change will solve the following problems:
Signed-off-by: zoetrope [email protected]