-
Notifications
You must be signed in to change notification settings - Fork 295
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
Add support for pinning the infra container image #39
Comments
This comment was marked as outdated.
This comment was marked as outdated.
@evol262 Maybe this should not be closed yet? |
As far as I know, this is what the |
Ah, sort-of. |
Seems rather straight-forward, once the API is updated from 0.22.8 to 0.23.0 in order to add "Pinned" // ImageSpec is an internal representation of an image.
message ImageSpec {
// Container's Image field (e.g. imageID or imageDigest).
@@ -1130,6 +1247,10 @@ message Image {
string username = 6;
// ImageSpec for image which includes annotations
ImageSpec spec = 7;
+ // Recommendation on whether this image should be exempt from garbage collection.
+ // It must only be treated as a recommendation -- the client can still request that the image be deleted,
+ // and the runtime must oblige.
+ bool pinned = 8;
}
message ListImagesResponse {
Then again, this means also having to implement PodSandboxStats and ListPodSandboxStats functions... |
They are also bumping the default version of For the pinned, it seemed enough to just do a simple loop over RepoTags and compare with it ? "status": {
"id": "sha256:6270bb605e12e581514ada5fd5b3216f727db55dc87d5889c790e4c760683fee",
"repoTags": [
"k8s.gcr.io/pause:3.6",
"registry.k8s.io/pause:3.6"
],
"repoDigests": [
"k8s.gcr.io/pause@sha256:3d380ca8864549e74af4b29c10f9cb0956236dfb01c40ca076fb6c37253234db",
"registry.k8s.io/pause@sha256:3d380ca8864549e74af4b29c10f9cb0956236dfb01c40ca076fb6c37253234db"
],
"size": "682696",
"uid": {
"value": "65535"
},
"username": "",
"spec": null,
"pinned": false
}, "status": {
"id": "sha256:e6f1816883972d4be47bd48879a08919b96afcd344132622e4d444987919323c",
"repoTags": [
"registry.k8s.io/pause:3.9"
],
"repoDigests": [
"registry.k8s.io/pause@sha256:7031c1b283388d2c2e09b57badb803c05ebed362dc88d84b480cc47f72a21097"
],
"size": "743952",
"uid": {
"value": "65535"
},
"username": "",
"spec": null,
"pinned": true
}, |
The current kubelet flag has been removed in 1.29, along with other missing dockershim leftovers: So unless the sandbox image is pinned by cri-dockerd, it will now be garbage collected by the kubelet. |
Good thing that the "pause" image is normally in use, now when the cleaning by kubelet has started:
"Disk usage on image filesystem is over the high threshold, trying to free bytes down to the low threshold":
Note: garbage collection is normally turned off in minikube, I enabled it just to check this issue # disable disk resource management by default
imageGCHighThresholdPercent: 100
evictionHard:
nodefs.available: "0%"
nodefs.inodesFree: "0%"
imagefs.available: "0%" |
Is anyone at Mirantis actively working on this, or is this going to wait for someone in the community to push it across the line? I see that some of this is being worked in #194. |
Now included in |
KEP 2040: Kubelet CRI support
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2040-kubelet-cri#pinned-images
Requires CRI API 1.23
The text was updated successfully, but these errors were encountered: