Skip to content
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

Merged
merged 1 commit into from
Mar 18, 2015

Conversation

vmarmol
Copy link
Contributor

@vmarmol vmarmol commented Mar 17, 2015

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.

@vmarmol
Copy link
Contributor Author

vmarmol commented Mar 17, 2015

e2e is all green :)

@vmarmol vmarmol force-pushed the image-gc branch 3 times, most recently from e9d0472 to 01ed372 Compare March 17, 2015 23:34
@@ -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%%")
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@j3ffml
Copy link
Contributor

j3ffml commented Mar 18, 2015

lgtm, but @dchen1107 or @saad-ali should probably look it over.

RegistryBurst: 10,
EnableDebuggingHandlers: true,
MinimumGCAge: 1 * time.Minute,
MaxPerPodContainerCount: 5,
Copy link
Member

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?

Copy link
Contributor Author

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.
@saad-ali
Copy link
Member

LGTM

@j3ffml j3ffml added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 18, 2015
@dchen1107 dchen1107 self-assigned this Mar 18, 2015
@dchen1107
Copy link
Member

LGTM

dchen1107 added a commit that referenced this pull request Mar 18, 2015
Garbage collecting images in the Kubelet.
@dchen1107 dchen1107 merged commit 9e781bc into kubernetes:master Mar 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GC old dead containers and unused images
5 participants