-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Garbage collecting images in the Kubelet. #5569
Conversation
e2e is all green :) |
e9d0472
to
01ed372
Compare
@@ -133,6 +136,8 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { | |||
fs.Var(&s.ClusterDNS, "cluster_dns", "IP address for a cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution in addition to the host's DNS servers") | |||
fs.BoolVar(&s.ReallyCrashForTesting, "really_crash_for_testing", s.ReallyCrashForTesting, "If true, crash with panics more often.") | |||
fs.DurationVar(&s.StreamingConnectionIdleTimeout, "streaming_connection_idle_timeout", 0, "Maximum time a streaming connection can be idle before the connection is automatically closed. Example: '5m'") | |||
fs.IntVar(&s.ImageGCHighThresholdPercent, "image_gc_high_threshold", s.ImageGCHighThresholdPercent, "The percent of usage after which image garbage collection is always run. Default: 90%%") |
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.
Nit: s/usage/disk usage/ for clarity.
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.
Done.
lgtm, but @dchen1107 or @saad-ali should probably look it over. |
RegistryBurst: 10, | ||
EnableDebuggingHandlers: true, | ||
MinimumGCAge: 1 * time.Minute, | ||
MaxPerPodContainerCount: 5, |
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.
Was MaxPerPodContainerCount
removed on purpose?
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.
Good catch! It was not, that was an incorrect merge. Re-added.
Integrated the imageManager into the Kubelet and applies the garbage collection policy every 5 minutes. The default policy allows up to 90% disk usage, after which images are garbage collected to bring limit back down to 80%. Fixes kubernetes#157.
LGTM |
LGTM |
Garbage collecting images in the Kubelet.
Integrated the imageManager into the Kubelet and applies the garbage
collection policy every 5 minutes. The default policy allows up to 90%
disk usage, after which images are garbage collected to bring limit back
down to 80%.
Fixes #157.