From 00555aa626b4fc559104226c1c2bba3941d7a052 Mon Sep 17 00:00:00 2001 From: Cyril Galibern Date: Fri, 15 Nov 2024 17:52:52 +0100 Subject: [PATCH] [restaskdocker] Refactor with restaskocibase --- drivers/restaskdocker/caps.go | 2 +- drivers/restaskdocker/keywords.go | 243 ------------------ drivers/restaskdocker/main.go | 136 +++------- drivers/restaskdocker/manifest.go | 22 +- drivers/restaskdocker/text/kw/command | 1 - .../restaskdocker/text/kw/configs_environment | 21 -- drivers/restaskdocker/text/kw/cwd | 1 - drivers/restaskdocker/text/kw/detach | 3 - drivers/restaskdocker/text/kw/devices | 2 - drivers/restaskdocker/text/kw/dns_search | 4 - drivers/restaskdocker/text/kw/entrypoint | 3 - drivers/restaskdocker/text/kw/environment | 4 - drivers/restaskdocker/text/kw/hostname | 1 - drivers/restaskdocker/text/kw/image | 1 - .../restaskdocker/text/kw/image_pull_policy | 9 - drivers/restaskdocker/text/kw/init | 1 - drivers/restaskdocker/text/kw/interactive | 3 - drivers/restaskdocker/text/kw/ipcns | 20 -- drivers/restaskdocker/text/kw/name | 4 - drivers/restaskdocker/text/kw/name.default | 2 - drivers/restaskdocker/text/kw/netns | 15 -- drivers/restaskdocker/text/kw/pidns | 12 - drivers/restaskdocker/text/kw/privileged | 1 - drivers/restaskdocker/text/kw/pull_timeout | 1 - drivers/restaskdocker/text/kw/registry_creds | 4 - drivers/restaskdocker/text/kw/rm | 2 - drivers/restaskdocker/text/kw/run_args | 2 - drivers/restaskdocker/text/kw/schedule | 3 - .../restaskdocker/text/kw/secrets_environment | 21 -- drivers/restaskdocker/text/kw/start_timeout | 1 - drivers/restaskdocker/text/kw/stop_timeout | 1 - drivers/restaskdocker/text/kw/tty | 1 - drivers/restaskdocker/text/kw/user | 3 - drivers/restaskdocker/text/kw/utsns | 7 - drivers/restaskdocker/text/kw/volume_mounts | 5 - 35 files changed, 53 insertions(+), 509 deletions(-) delete mode 100644 drivers/restaskdocker/keywords.go delete mode 100644 drivers/restaskdocker/text/kw/command delete mode 100644 drivers/restaskdocker/text/kw/configs_environment delete mode 100644 drivers/restaskdocker/text/kw/cwd delete mode 100644 drivers/restaskdocker/text/kw/detach delete mode 100644 drivers/restaskdocker/text/kw/devices delete mode 100644 drivers/restaskdocker/text/kw/dns_search delete mode 100644 drivers/restaskdocker/text/kw/entrypoint delete mode 100644 drivers/restaskdocker/text/kw/environment delete mode 100644 drivers/restaskdocker/text/kw/hostname delete mode 100644 drivers/restaskdocker/text/kw/image delete mode 100644 drivers/restaskdocker/text/kw/image_pull_policy delete mode 100644 drivers/restaskdocker/text/kw/init delete mode 100644 drivers/restaskdocker/text/kw/interactive delete mode 100644 drivers/restaskdocker/text/kw/ipcns delete mode 100644 drivers/restaskdocker/text/kw/name delete mode 100644 drivers/restaskdocker/text/kw/name.default delete mode 100644 drivers/restaskdocker/text/kw/netns delete mode 100644 drivers/restaskdocker/text/kw/pidns delete mode 100644 drivers/restaskdocker/text/kw/privileged delete mode 100644 drivers/restaskdocker/text/kw/pull_timeout delete mode 100644 drivers/restaskdocker/text/kw/registry_creds delete mode 100644 drivers/restaskdocker/text/kw/rm delete mode 100644 drivers/restaskdocker/text/kw/run_args delete mode 100644 drivers/restaskdocker/text/kw/schedule delete mode 100644 drivers/restaskdocker/text/kw/secrets_environment delete mode 100644 drivers/restaskdocker/text/kw/start_timeout delete mode 100644 drivers/restaskdocker/text/kw/stop_timeout delete mode 100644 drivers/restaskdocker/text/kw/tty delete mode 100644 drivers/restaskdocker/text/kw/user delete mode 100644 drivers/restaskdocker/text/kw/utsns delete mode 100644 drivers/restaskdocker/text/kw/volume_mounts diff --git a/drivers/restaskdocker/caps.go b/drivers/restaskdocker/caps.go index 9ef5d8e86..52916a858 100644 --- a/drivers/restaskdocker/caps.go +++ b/drivers/restaskdocker/caps.go @@ -1,4 +1,4 @@ -package restaskdocker +package restaskpodman import ( "os/exec" diff --git a/drivers/restaskdocker/keywords.go b/drivers/restaskdocker/keywords.go deleted file mode 100644 index dfb78abd3..000000000 --- a/drivers/restaskdocker/keywords.go +++ /dev/null @@ -1,243 +0,0 @@ -package restaskdocker - -import ( - "embed" - - "github.com/opensvc/om3/core/keywords" - "github.com/opensvc/om3/util/converters" -) - -var ( - //go:embed text - fs embed.FS - - Keywords = []keywords.Keyword{ - { - Attr: "Name", - DefaultText: keywords.NewText(fs, "text/kw/name.default"), - Example: "osvcprd..rundeck.container.db", - Option: "name", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/name"), - }, - { - Attr: "Hostname", - Example: "nginx1", - Option: "hostname", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/hostname"), - }, - { - Aliases: []string{}, - Attr: "DNSSearch", - Converter: converters.List, - Example: "opensvc.com", - Option: "dns_search", - Required: false, - Scopable: true, - Text: keywords.NewText(fs, "text/kw/dns_search"), - }, - { - Aliases: []string{"run_image"}, - Attr: "Image", - Example: "google/pause", - Option: "image", - Required: true, - Scopable: true, - Text: keywords.NewText(fs, "text/kw/image"), - }, - { - Attr: "ImagePullPolicy", - Candidates: []string{"once", "always"}, - Example: "once", - Option: "image_pull_policy", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/image_pull_policy"), - }, - { - Attr: "CWD", - Option: "cwd", - Example: "/opt/foo", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/cwd"), - }, - { - Aliases: []string{"run_command"}, - Attr: "Command", - Converter: converters.Shlex, - Example: "/opt/tomcat/bin/catalina.sh", - Option: "command", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/command"), - }, - { - Attr: "RunArgs", - Converter: converters.Shlex, - Example: "-v /opt/docker.opensvc.com/vol1:/vol1:rw -p 37.59.71.25:8080:8080", - Option: "run_args", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/run_args"), - }, - { - Attr: "Entrypoint", - Converter: converters.Shlex, - Example: "/bin/sh", - Option: "entrypoint", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/entrypoint"), - }, - { - Attr: "Detach", - Converter: converters.Bool, - Default: "true", - Option: "detach", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/detach"), - }, - { - Attr: "Remove", - Converter: converters.Bool, - Example: "false", - Option: "rm", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/rm"), - }, - { - Attr: "Privileged", - Converter: converters.Bool, - Option: "privileged", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/privileged"), - }, - { - Attr: "Init", - Converter: converters.Bool, - Default: "true", - Option: "init", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/init"), - }, - { - Attr: "Interactive", - Converter: converters.Bool, - Option: "interactive", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/interactive"), - }, - { - Attr: "TTY", - Converter: converters.Bool, - Option: "tty", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/tty"), - }, - { - Attr: "VolumeMounts", - Converter: converters.Shlex, - Example: "myvol1:/vol1 myvol2:/vol2:rw /localdir:/data:ro", - Option: "volume_mounts", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/volume_mounts"), - }, - { - Attr: "Env", - Converter: converters.Shlex, - Example: "KEY=cert1/server.key PASSWORD=db/password", - Option: "environment", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/environment"), - }, - { - Attr: "ConfigsEnv", - Converter: converters.Shlex, - Example: "CRT=cert1/server.crt PEM=cert1/server.pem", - Option: "configs_environment", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/configs_environment"), - }, - { - Attr: "Devices", - Converter: converters.Shlex, - Example: "myvol1:/dev/xvda myvol2:/dev/xvdb", - Option: "devices", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/devices"), - }, - { - Aliases: []string{"net"}, - Attr: "NetNS", - Example: "container#0", - Option: "netns", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/netns"), - }, - { - Attr: "User", - Example: "guest", - Option: "user", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/user"), - }, - { - Attr: "UserNS", - Example: "container#0", - Option: "userns", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/userns"), - }, - { - Attr: "PIDNS", - Example: "container#0", - Option: "pidns", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/pidns"), - }, - { - Attr: "IPCNS", - Example: "container#0", - Option: "ipcns", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/ipcns"), - }, - { - Attr: "UTSNS", - Candidates: []string{"", "host"}, - Example: "container#0", - Option: "utsns", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/utsns"), - }, - { - Attr: "RegistryCreds", - Example: "creds-registry-opensvc-com", - Option: "registry_creds", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/registry_creds"), - }, - { - Attr: "PullTimeout", - Converter: converters.Duration, - Default: "2m", - Example: "2m", - Option: "pull_timeout", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/pull_timeout"), - }, - { - Attr: "SecretsEnv", - Converter: converters.Shlex, - Example: "CRT=cert1/server.pem sec1/*", - Option: "secrets_environment", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/secrets_environment"), - }, - { - Attr: "ConfigsEnv", - Converter: converters.Shlex, - Example: "PORT=http/port webapp/app1* {name}/* {name}-debug/settings", - Option: "configs_environment", - Scopable: true, - Text: keywords.NewText(fs, "text/kw/configs_environment"), - }, - } -) diff --git a/drivers/restaskdocker/main.go b/drivers/restaskdocker/main.go index 32259649f..d2b3a75dd 100644 --- a/drivers/restaskdocker/main.go +++ b/drivers/restaskdocker/main.go @@ -1,78 +1,48 @@ -package restaskdocker +package restaskpodman // TODO // * snooze // * status.json rewrite after lock acquire import ( - "context" - "fmt" - "syscall" - "time" - - "github.com/google/uuid" - - "github.com/opensvc/om3/core/naming" "github.com/opensvc/om3/core/resource" - "github.com/opensvc/om3/core/status" - "github.com/opensvc/om3/drivers/rescontainerdocker" + "github.com/opensvc/om3/drivers/rescontainerdockercli" "github.com/opensvc/om3/drivers/rescontainerocibase" "github.com/opensvc/om3/drivers/restask" - "github.com/opensvc/om3/util/pg" + "github.com/opensvc/om3/drivers/restaskocibase" ) -// T is the driver structure. -type T struct { - restask.BaseTask - resource.SCSIPersistentReservation - Detach bool `json:"detach"` - PG pg.Config `json:"pg"` - Path naming.Path `json:"path"` - ObjectID uuid.UUID `json:"object_id"` - SCSIReserv bool `json:"scsireserv"` - PromoteRW bool `json:"promote_rw"` - NoPreemptAbort bool `json:"no_preempt_abort"` - OsvcRootPath string `json:"osvc_root_path"` - GuestOS string `json:"guest_os"` - Name string `json:"name"` - Nodes []string `json:"nodes"` - Hostname string `json:"hostname"` - Image string `json:"image"` - ImagePullPolicy string `json:"image_pull_policy"` - CWD string `json:"cwd"` - User string `json:"user"` - Command []string `json:"command"` - DNS []string `json:"dns"` - DNSSearch []string `json:"dns_search"` - RunArgs []string `json:"run_args"` - Entrypoint []string `json:"entrypoint"` - Remove bool `json:"remove"` - Privileged bool `json:"privileged"` - Init bool `json:"init"` - Interactive bool `json:"interactive"` - TTY bool `json:"tty"` - VolumeMounts []string `json:"volume_mounts"` - Env []string `json:"environment"` - SecretsEnv []string `json:"secrets_environment"` - ConfigsEnv []string `json:"configs_environment"` - Devices []string `json:"devices"` - NetNS string `json:"netns"` - UserNS string `json:"userns"` - PIDNS string `json:"pidns"` - IPCNS string `json:"ipcns"` - UTSNS string `json:"utsns"` - RegistryCreds string `json:"registry_creds"` - PullTimeout *time.Duration `json:"pull_timeout"` - Timeout *time.Duration `json:"timeout"` -} +type ( + // T is the driver structure. + T struct { + restaskocibase.T + } +) func New() resource.Driver { - return &T{} + t := &T{ + T: restaskocibase.T{ + BaseTask: restask.BaseTask{ + T: resource.T{}, + Check: "", + Confirmation: false, + LogOutputs: false, + MaxParallel: 0, + OnErrorCmd: "", + RetCodes: "", + RunTimeout: nil, + Schedule: "", + Snooze: nil, + }, + }, + } + t.SetContainerGetter(t) + return t } -func (t T) Container() *rescontainerdocker.T { - return &rescontainerdocker.T{ - BT: rescontainerocibase.BT{ +func (t *T) GetContainer() restaskocibase.ContainerTasker { + ct := &rescontainerdockercli.T{ + BT: &rescontainerocibase.BT{ T: t.BaseTask.T, Detach: false, SCSIPersistentReservation: t.SCSIPersistentReservation, @@ -115,48 +85,6 @@ func (t T) Container() *rescontainerdocker.T { StartTimeout: t.Timeout, }, } -} - -func (t T) Run(ctx context.Context) error { - return t.RunIf(ctx, t.lockedRun) -} - -func (t T) lockedRun(ctx context.Context) (err error) { - // TODO: if t.LogOutputs {} - container := t.Container() - if err := container.Start(ctx); err != nil { - t.Log().Errorf("%s", err) - return err - } - inspect, err := container.Inspect(ctx) - if err != nil { - return err - } - if err := t.WriteLastRun(inspect.State.ExitCode); err != nil { - t.Log().Errorf("write last run: %s", err) - return err - } - if s, err := t.BaseTask.ExitCodeToStatus(inspect.State.ExitCode); err != nil { - return err - } else if s != status.Up { - return fmt.Errorf("command exited with code %d", inspect.State.ExitCode) - } - return nil -} - -func (t *T) Kill(ctx context.Context) error { - return t.Container().Signal(syscall.SIGKILL) -} - -func (t *T) running(ctx context.Context) bool { - inspect, err := t.Container().Inspect(ctx) - if err != nil { - return false - } - return inspect.State.Running -} - -// Label returns a formatted short description of the Resource -func (t T) Label() string { - return "" + ct.SetupExecutor() + return ct } diff --git a/drivers/restaskdocker/manifest.go b/drivers/restaskdocker/manifest.go index 8bce50281..38b7d50e2 100644 --- a/drivers/restaskdocker/manifest.go +++ b/drivers/restaskdocker/manifest.go @@ -1,11 +1,20 @@ -package restaskdocker +package restaskpodman import ( + "embed" + "github.com/opensvc/om3/core/driver" + "github.com/opensvc/om3/core/keywords" "github.com/opensvc/om3/core/manifest" "github.com/opensvc/om3/core/naming" "github.com/opensvc/om3/drivers/rescontainer" "github.com/opensvc/om3/drivers/restask" + "github.com/opensvc/om3/drivers/restaskocibase" +) + +var ( + //go:embed text + fs embed.FS ) var ( @@ -32,6 +41,15 @@ func (t T) Manifest() *manifest.T { rescontainer.KWGuestOS, ) m.AddKeywords(restask.Keywords...) - m.AddKeywords(Keywords...) + m.AddKeywords(restaskocibase.Keywords...) + m.Add( + keywords.Keyword{ + Option: "userns", + Attr: "UserNS", + Scopable: true, + Example: "container#0", + Text: keywords.NewText(fs, "text/kw/userns"), + }, + ) return m } diff --git a/drivers/restaskdocker/text/kw/command b/drivers/restaskdocker/text/kw/command deleted file mode 100644 index 642a0fff9..000000000 --- a/drivers/restaskdocker/text/kw/command +++ /dev/null @@ -1 +0,0 @@ -The command to execute in the docker container on run. diff --git a/drivers/restaskdocker/text/kw/configs_environment b/drivers/restaskdocker/text/kw/configs_environment deleted file mode 100644 index c5efc8bd1..000000000 --- a/drivers/restaskdocker/text/kw/configs_environment +++ /dev/null @@ -1,21 +0,0 @@ -A whitespace-separated list of `=/` or -`/`. - -If the `cfg` or config key doesn't exist then `start` and `stop` actions on -the resource will fail with a non 0 exit code. - -A shell expression splitter is applied, so double quotes can be around -`/` only or whole `=/`. - -Example with, - -* `/cfg/nginx` a config having a `user` key with value `user1`. - -* `/cfg/cfg1` a config having a `key1` key with value `val1`. - -`configs_environment = NGINX_USER=nginx/user cfg1/*` creates the following -variables in the container command execution environment: - - NGINX_USER=user1 - key1=val1 - diff --git a/drivers/restaskdocker/text/kw/cwd b/drivers/restaskdocker/text/kw/cwd deleted file mode 100644 index 069f3d734..000000000 --- a/drivers/restaskdocker/text/kw/cwd +++ /dev/null @@ -1 +0,0 @@ -The current working directory set for the executed command. diff --git a/drivers/restaskdocker/text/kw/detach b/drivers/restaskdocker/text/kw/detach deleted file mode 100644 index 8275bca00..000000000 --- a/drivers/restaskdocker/text/kw/detach +++ /dev/null @@ -1,3 +0,0 @@ -Run container in background. - -Set to `false` only for init containers, alongside `start_timeout` and the `nostatus` tag. diff --git a/drivers/restaskdocker/text/kw/devices b/drivers/restaskdocker/text/kw/devices deleted file mode 100644 index 2cd13704c..000000000 --- a/drivers/restaskdocker/text/kw/devices +++ /dev/null @@ -1,2 +0,0 @@ -The whitespace-separated list of `:` -exposing host devices as container devices. diff --git a/drivers/restaskdocker/text/kw/dns_search b/drivers/restaskdocker/text/kw/dns_search deleted file mode 100644 index 465df0573..000000000 --- a/drivers/restaskdocker/text/kw/dns_search +++ /dev/null @@ -1,4 +0,0 @@ -The whitespace-separated list of DNS domains to search for shortname lookups. - -If empty or not set, the list will be `..svc. - .svc. svc.`. diff --git a/drivers/restaskdocker/text/kw/entrypoint b/drivers/restaskdocker/text/kw/entrypoint deleted file mode 100644 index 606e1a6d0..000000000 --- a/drivers/restaskdocker/text/kw/entrypoint +++ /dev/null @@ -1,3 +0,0 @@ -The script or binary executed in the container. - -The entrypoint args must be set in `command`. diff --git a/drivers/restaskdocker/text/kw/environment b/drivers/restaskdocker/text/kw/environment deleted file mode 100644 index 7413048df..000000000 --- a/drivers/restaskdocker/text/kw/environment +++ /dev/null @@ -1,4 +0,0 @@ -A whitespace-separated list of `=`. - -A shell expression spliter is applied, so double quotes can be around -`` only or whole `=`. diff --git a/drivers/restaskdocker/text/kw/hostname b/drivers/restaskdocker/text/kw/hostname deleted file mode 100644 index 735ff3447..000000000 --- a/drivers/restaskdocker/text/kw/hostname +++ /dev/null @@ -1 +0,0 @@ -Set the container hostname. If not set, a unique id is used. diff --git a/drivers/restaskdocker/text/kw/image b/drivers/restaskdocker/text/kw/image deleted file mode 100644 index 90d6831a4..000000000 --- a/drivers/restaskdocker/text/kw/image +++ /dev/null @@ -1 +0,0 @@ -The docker image pull, and run the container with. diff --git a/drivers/restaskdocker/text/kw/image_pull_policy b/drivers/restaskdocker/text/kw/image_pull_policy deleted file mode 100644 index 82f03918f..000000000 --- a/drivers/restaskdocker/text/kw/image_pull_policy +++ /dev/null @@ -1,9 +0,0 @@ -The docker image pull policy. - -* `always` - - Pull upon each container start. - -* `once` - - Pull if not already pulled (default). diff --git a/drivers/restaskdocker/text/kw/init b/drivers/restaskdocker/text/kw/init deleted file mode 100644 index 2bd649780..000000000 --- a/drivers/restaskdocker/text/kw/init +++ /dev/null @@ -1 +0,0 @@ -Run an init inside the container that forwards signals and reaps processes. diff --git a/drivers/restaskdocker/text/kw/interactive b/drivers/restaskdocker/text/kw/interactive deleted file mode 100644 index 92098a3b7..000000000 --- a/drivers/restaskdocker/text/kw/interactive +++ /dev/null @@ -1,3 +0,0 @@ -Keep stdin open even if not attached. - -To use if the container entrypoint is a shell. diff --git a/drivers/restaskdocker/text/kw/ipcns b/drivers/restaskdocker/text/kw/ipcns deleted file mode 100644 index 251c3ff4a..000000000 --- a/drivers/restaskdocker/text/kw/ipcns +++ /dev/null @@ -1,20 +0,0 @@ -* empty - - The docker daemon's default value is used. - -* `none` - - Do not mount /dev/shm. - -* `private` - - Create a ipcns other containers can not share. - - -* `shareable` - - Create a ipcns other containers can share. - -* `container#` - - Share the `container#` ipcns. diff --git a/drivers/restaskdocker/text/kw/name b/drivers/restaskdocker/text/kw/name deleted file mode 100644 index 8306f2f73..000000000 --- a/drivers/restaskdocker/text/kw/name +++ /dev/null @@ -1,4 +0,0 @@ -The name to assign to the container on `docker run`. - -If not set, a `...container.` name is automatically -assigned. diff --git a/drivers/restaskdocker/text/kw/name.default b/drivers/restaskdocker/text/kw/name.default deleted file mode 100644 index be501d491..000000000 --- a/drivers/restaskdocker/text/kw/name.default +++ /dev/null @@ -1,2 +0,0 @@ -Autogenerated using a `...container.` -template. diff --git a/drivers/restaskdocker/text/kw/netns b/drivers/restaskdocker/text/kw/netns deleted file mode 100644 index f3969d7e1..000000000 --- a/drivers/restaskdocker/text/kw/netns +++ /dev/null @@ -1,15 +0,0 @@ -* empty or `none` - - The container has a private netns other `container`, `ip.netns` or - `ip.cni` resources can share. - -* `` - - The id of the resource that has the network namespace this container joins. - - For example, a container with `netns=container#0` will share the - `container#0` netns. - -* `host` - - Share the host network namespace. diff --git a/drivers/restaskdocker/text/kw/pidns b/drivers/restaskdocker/text/kw/pidns deleted file mode 100644 index b6b9b8885..000000000 --- a/drivers/restaskdocker/text/kw/pidns +++ /dev/null @@ -1,12 +0,0 @@ -* empty - - The container has a private pidns other containers can share. - Usually a pidns sharer will run a `google/pause` image to reap zombies. - -* `container#` - - Share `container#` pidns. - -* `host` - - Share the host's pidns. diff --git a/drivers/restaskdocker/text/kw/privileged b/drivers/restaskdocker/text/kw/privileged deleted file mode 100644 index c5219a24a..000000000 --- a/drivers/restaskdocker/text/kw/privileged +++ /dev/null @@ -1 +0,0 @@ -Give extended privileges to the container. diff --git a/drivers/restaskdocker/text/kw/pull_timeout b/drivers/restaskdocker/text/kw/pull_timeout deleted file mode 100644 index 8e9db61c1..000000000 --- a/drivers/restaskdocker/text/kw/pull_timeout +++ /dev/null @@ -1 +0,0 @@ -Wait for `` before declaring the container action a failure. diff --git a/drivers/restaskdocker/text/kw/registry_creds b/drivers/restaskdocker/text/kw/registry_creds deleted file mode 100644 index 0dfc3fa16..000000000 --- a/drivers/restaskdocker/text/kw/registry_creds +++ /dev/null @@ -1,4 +0,0 @@ -The name of a secret in the same namespace having a `config.json` key which -value is used to login to the container image registry. - -If not specified, the node-level registry credential store is used. diff --git a/drivers/restaskdocker/text/kw/rm b/drivers/restaskdocker/text/kw/rm deleted file mode 100644 index 86722fa82..000000000 --- a/drivers/restaskdocker/text/kw/rm +++ /dev/null @@ -1,2 +0,0 @@ -If set to `true`, add `--rm` to the docker run args and make sure the -instance is removed on resource `stop`. diff --git a/drivers/restaskdocker/text/kw/run_args b/drivers/restaskdocker/text/kw/run_args deleted file mode 100644 index 856f672dc..000000000 --- a/drivers/restaskdocker/text/kw/run_args +++ /dev/null @@ -1,2 +0,0 @@ -Extra arguments to pass to the docker run command, like volume and port -mappings. diff --git a/drivers/restaskdocker/text/kw/schedule b/drivers/restaskdocker/text/kw/schedule deleted file mode 100644 index 84903abbe..000000000 --- a/drivers/restaskdocker/text/kw/schedule +++ /dev/null @@ -1,3 +0,0 @@ -Set the task `run` schedule. - -See `usr/share/doc/opensvc/schedule` for the schedule syntax reference. diff --git a/drivers/restaskdocker/text/kw/secrets_environment b/drivers/restaskdocker/text/kw/secrets_environment deleted file mode 100644 index 7d9d2a181..000000000 --- a/drivers/restaskdocker/text/kw/secrets_environment +++ /dev/null @@ -1,21 +0,0 @@ -A whitespace-separated list of `=/` or -`/`. - -If the `sec` or secret key doesn't exist then `start` and `stop` actions on -the resource will fail with a non 0 exit code. - -A shell expression splitter is applied, so double quotes can be around -`/` only or whole `=/`. - -Example with, - -* `/sec/cert1` a secret having a `server.pem` key with value `mycrt`. - -* `/sec/sec1` a secret having a `key1` key with value `val1`. - -`secrets_environment = CRT=cert1/server.pem sec1/*` creates the following -variables in the container command execution environment: - - CRT=mycrt - key1=val1 - diff --git a/drivers/restaskdocker/text/kw/start_timeout b/drivers/restaskdocker/text/kw/start_timeout deleted file mode 100644 index 8e9db61c1..000000000 --- a/drivers/restaskdocker/text/kw/start_timeout +++ /dev/null @@ -1 +0,0 @@ -Wait for `` before declaring the container action a failure. diff --git a/drivers/restaskdocker/text/kw/stop_timeout b/drivers/restaskdocker/text/kw/stop_timeout deleted file mode 100644 index 8e9db61c1..000000000 --- a/drivers/restaskdocker/text/kw/stop_timeout +++ /dev/null @@ -1 +0,0 @@ -Wait for `` before declaring the container action a failure. diff --git a/drivers/restaskdocker/text/kw/tty b/drivers/restaskdocker/text/kw/tty deleted file mode 100644 index 6ab233395..000000000 --- a/drivers/restaskdocker/text/kw/tty +++ /dev/null @@ -1 +0,0 @@ -Allocate a pseudo-tty. diff --git a/drivers/restaskdocker/text/kw/user b/drivers/restaskdocker/text/kw/user deleted file mode 100644 index 91ec8faaf..000000000 --- a/drivers/restaskdocker/text/kw/user +++ /dev/null @@ -1,3 +0,0 @@ -The user that will run the command inside the container. - -Also support the `:` syntax. diff --git a/drivers/restaskdocker/text/kw/utsns b/drivers/restaskdocker/text/kw/utsns deleted file mode 100644 index d4e8cb2e2..000000000 --- a/drivers/restaskdocker/text/kw/utsns +++ /dev/null @@ -1,7 +0,0 @@ -* empty - - The container has a private utsns. - -* `host` - - The container shares the host's hostname. diff --git a/drivers/restaskdocker/text/kw/volume_mounts b/drivers/restaskdocker/text/kw/volume_mounts deleted file mode 100644 index d42c55139..000000000 --- a/drivers/restaskdocker/text/kw/volume_mounts +++ /dev/null @@ -1,5 +0,0 @@ -The whitespace-separated list of `::`. - -When the source is a local dir, the default `` is `rw`. - -When the source is a volume name, the default `` is taken from volume access.