initial implementation for image management

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown
2017-04-29 07:05:54 -05:00
parent 4c86ac9d21
commit e5199c0cda
9 changed files with 501 additions and 21 deletions

View File

@@ -17,14 +17,17 @@ limitations under the License.
package server
import (
"errors"
"golang.org/x/net/context"
"k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
)
// RemoveImage removes the image.
// TODO(mikebrow): harden api
func (c *criContainerdService) RemoveImage(ctx context.Context, r *runtime.RemoveImageRequest) (*runtime.RemoveImageResponse, error) {
return nil, errors.New("not implemented")
// Only remove image from the internal metadata store for now.
// Note that the image must be digest here in current implementation.
// TODO(mikebrow): remove the image via containerd
err := c.imageMetadataStore.Delete(r.GetImage().GetImage())
return &runtime.RemoveImageResponse{}, err
}