senthilrch / kube-fledged

A kubernetes operator for creating and managing a cache of container images directly on the cluster worker nodes, so application pods start almost instantly
Apache License 2.0
1.24k stars 118 forks source link

Error deleting image when defining containerd.sock path #188

Closed EndangeredF1sh closed 1 year ago

EndangeredF1sh commented 1 year ago
E1023 12:38:30.121874       1 image_manager.go:492] error deleting image '<image>' from node '<node-name>': Job.batch "test-imagecache-q955z" is invalid: [spec.template.spec.volumes[0].hostPath.path: Required value, spec.template.spec.containers[0].volumeMounts[0].name: Not found: "runtime-sock", spec.template.spec.containers[0].volumeMounts[0].mountPath: Required value] 

I think it is because the socketPath is empty when criSocketPath is not empty. (The same goes for the following two if blocks) https://github.com/senthilrch/kube-fledged/blob/6765db52b557e84db7c1f4bf03b40704e2167a1f/pkg/images/image_helpers.go#L229-L231

EndangeredF1sh commented 1 year ago

A simple patch has been applied in PR #189