github.com/containers/podman/v4@v4.9.4/libpod/define/container.go (about)

     1  package define
     2  
     3  // Valid restart policy types.
     4  const (
     5  	// RestartPolicyNone indicates that no restart policy has been requested
     6  	// by a container.
     7  	RestartPolicyNone = ""
     8  	// RestartPolicyNo is identical in function to RestartPolicyNone.
     9  	RestartPolicyNo = "no"
    10  	// RestartPolicyAlways unconditionally restarts the container.
    11  	RestartPolicyAlways = "always"
    12  	// RestartPolicyOnFailure restarts the container on non-0 exit code,
    13  	// with an optional maximum number of retries.
    14  	RestartPolicyOnFailure = "on-failure"
    15  	// RestartPolicyUnlessStopped unconditionally restarts unless stopped
    16  	// by the user. It is identical to Always except with respect to
    17  	// handling of system restart, which Podman does not yet support.
    18  	RestartPolicyUnlessStopped = "unless-stopped"
    19  )
    20  
    21  // RestartPolicyMap maps between restart-policy valid values to restart policy types
    22  var RestartPolicyMap = map[string]string{
    23  	"none":                     RestartPolicyNone,
    24  	RestartPolicyNo:            RestartPolicyNo,
    25  	RestartPolicyAlways:        RestartPolicyAlways,
    26  	RestartPolicyOnFailure:     RestartPolicyOnFailure,
    27  	RestartPolicyUnlessStopped: RestartPolicyUnlessStopped,
    28  }
    29  
    30  // InitContainerTypes
    31  const (
    32  	// AlwaysInitContainer is an init container that runs on each
    33  	// pod start (including restart)
    34  	AlwaysInitContainer = "always"
    35  	// OneShotInitContainer is a container that only runs as init once
    36  	// and is then deleted.
    37  	OneShotInitContainer = "once"
    38  	// ContainerInitPath is the default path of the mounted container init.
    39  	ContainerInitPath = "/run/podman-init"
    40  )
    41  
    42  // Kubernetes Kinds
    43  const (
    44  	// A Pod kube yaml spec
    45  	K8sKindPod = "pod"
    46  	// A Deployment kube yaml spec
    47  	K8sKindDeployment = "deployment"
    48  	// A DaemonSet kube yaml spec
    49  	K8sKindDaemonSet = "daemonset"
    50  )