Remove the termination-log files, the finished- marker file during the GC

This commit is contained in:
Julien Balestra
2017-05-09 16:15:22 +02:00
parent 48caf95a6c
commit 00d87a7209
3 changed files with 105 additions and 53 deletions

View File

@@ -192,16 +192,28 @@ func (f fakePodGetter) GetPodByUID(uid types.UID) (*v1.Pod, bool) {
return p, found
}
type fakeNetNs struct {
type fakeUnitGetter struct {
networkNamespace kubecontainer.ContainerID
callServices []string
}
func newFakeNetNs() *fakeNetNs {
return &fakeNetNs{
func newfakeUnitGetter() *fakeUnitGetter {
return &fakeUnitGetter{
networkNamespace: kubecontainer.ContainerID{},
}
}
func (f *fakeNetNs) fromRunningUnitFiles(uid kubetypes.UID, latestPod *rktapi.Pod) (kubecontainer.ContainerID, error) {
func (f *fakeUnitGetter) getNetworkNamespace(uid kubetypes.UID, latestPod *rktapi.Pod) (kubecontainer.ContainerID, error) {
return kubecontainer.ContainerID{ID: "42"}, nil
}
func (f *fakeUnitGetter) getKubernetesDirective(serviceFilePath string) (podServiceDirective, error) {
podService := podServiceDirective{
id: "fake",
name: "fake",
namespace: "fake",
hostNetwork: true,
networkNamespace: kubecontainer.ContainerID{ID: "42"},
}
return podService, nil
}