Add TODOs for the remaining work

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko 2022-08-04 10:29:15 -07:00
parent aa3303b697
commit 5cf77fc43d
4 changed files with 7 additions and 3 deletions

View File

@ -46,6 +46,8 @@ import (
runtime "k8s.io/cri-api/pkg/apis/runtime/v1" runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
) )
// TODO: Move common helpers for sbserver and podsandbox to a dedicated package once basic services are functinal.
const ( const (
// errorStartReason is the exit reason when fails to start container. // errorStartReason is the exit reason when fails to start container.
errorStartReason = "StartError" errorStartReason = "StartError"

View File

@ -14,7 +14,7 @@
limitations under the License. limitations under the License.
*/ */
// These are copied from container_create_linux.go and should be consolidated later. // TODO: these are copied from container_create_linux.go and should be consolidated later.
package podsandbox package podsandbox

View File

@ -31,10 +31,11 @@ import (
) )
// CRIService interface contains things required by controller, but not yet refactored from criService. // CRIService interface contains things required by controller, but not yet refactored from criService.
// This will be removed in subsequent iterations. // TODO: this will be removed in subsequent iterations.
type CRIService interface { type CRIService interface {
EnsureImageExists(ctx context.Context, ref string, config *runtime.PodSandboxConfig) (*imagestore.Image, error) EnsureImageExists(ctx context.Context, ref string, config *runtime.PodSandboxConfig) (*imagestore.Image, error)
// TODO: we should implement Controller.Wait and use it instead of this to monitor sandbox exit.
StartSandboxExitMonitor(ctx context.Context, id string, pid uint32, exitCh <-chan containerd.ExitStatus) <-chan struct{} StartSandboxExitMonitor(ctx context.Context, id string, pid uint32, exitCh <-chan containerd.ExitStatus) <-chan struct{}
} }

View File

@ -76,7 +76,8 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox
}() }()
sandboxInfo := sb.Sandbox{ sandboxInfo := sb.Sandbox{
ID: id, ID: id,
// TODO: runtime handler can be an empty string, should use default one and enable back validation of this field in metadata store.
Runtime: sb.RuntimeOpts{Name: r.GetRuntimeHandler()}, Runtime: sb.RuntimeOpts{Name: r.GetRuntimeHandler()},
} }