Remove "containerd.io/restart.logpath" label (deprecated since v1.5)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2023-03-14 15:19:28 +09:00
parent a570c8184a
commit 35a103d321
4 changed files with 4 additions and 30 deletions

View File

@@ -54,11 +54,6 @@ const (
CountLabel = "containerd.io/restart.count"
// ExplicitlyStoppedLabel sets the restart explicitly stopped label for a container
ExplicitlyStoppedLabel = "containerd.io/restart.explicitly-stopped"
// LogPathLabel sets the restart log path label for a container
//
// Deprecated(in release 1.5): use LogURILabel
LogPathLabel = "containerd.io/restart.logpath"
)
// Policy represents the restart policies of a container.
@@ -188,17 +183,6 @@ func WithFileLogURI(path string) func(context.Context, *containerd.Client, *cont
return WithLogURI(uri)
}
// WithLogPath sets the log path for a container
//
// Deprecated(in release 1.5): use WithLogURI with "file://<path>" URI.
func WithLogPath(path string) func(context.Context, *containerd.Client, *containers.Container) error {
return func(_ context.Context, _ *containerd.Client, c *containers.Container) error {
ensureLabels(c)
c.Labels[LogPathLabel] = path
return nil
}
}
// WithStatus sets the status for a container
func WithStatus(status containerd.ProcessStatus) func(context.Context, *containerd.Client, *containers.Container) error {
return func(_ context.Context, _ *containerd.Client, c *containers.Container) error {
@@ -224,7 +208,6 @@ func WithNoRestarts(_ context.Context, _ *containerd.Client, c *containers.Conta
}
delete(c.Labels, StatusLabel)
delete(c.Labels, PolicyLabel)
delete(c.Labels, LogPathLabel)
delete(c.Labels, LogURILabel)
return nil
}