diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-21 08:40:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-21 08:40:40 -0400 |
commit | 9b5522d9adff9e8b2413e626bfc62d1df28ce534 (patch) | |
tree | 6d3b482de0ef857f8956c35c35788238f706c303 /pkg/domain | |
parent | b925d707fa768245b3bd50d570b91992c1814dba (diff) | |
parent | 8fac34b8ff05314fe6996567af9336cf034b2d03 (diff) | |
download | podman-9b5522d9adff9e8b2413e626bfc62d1df28ce534.tar.gz podman-9b5522d9adff9e8b2413e626bfc62d1df28ce534.tar.bz2 podman-9b5522d9adff9e8b2413e626bfc62d1df28ce534.zip |
Merge pull request #11518 from cdoern/podDevice
Pod Devices support
Diffstat (limited to 'pkg/domain')
-rw-r--r-- | pkg/domain/entities/pods.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go index 88bd3c6ce..f0c88d77e 100644 --- a/pkg/domain/entities/pods.go +++ b/pkg/domain/entities/pods.go @@ -118,6 +118,7 @@ type PodSpec struct { type PodCreateOptions struct { CGroupParent string `json:"cgroup_parent,omitempty"` CreateCommand []string `json:"create_command,omitempty"` + Devices []string `json:"devices,omitempty"` Hostname string `json:"hostname,omitempty"` Infra bool `json:"infra,omitempty"` InfraImage string `json:"infra_image,omitempty"` @@ -164,7 +165,7 @@ type ContainerCreateOptions struct { CPUS float64 `json:"cpus,omitempty"` CPUSetCPUs string `json:"cpuset_cpus,omitempty"` CPUSetMems string - Devices []string + Devices []string `json:"devices,omitempty"` DeviceCGroupRule []string DeviceReadBPs []string DeviceReadIOPs []string @@ -295,6 +296,7 @@ func ToPodSpecGen(s specgen.PodSpecGenerator, p *PodCreateOptions) (*specgen.Pod s.Pid = out s.Hostname = p.Hostname s.Labels = p.Labels + s.Devices = p.Devices s.NoInfra = !p.Infra if p.InfraCommand != nil && len(*p.InfraCommand) > 0 { s.InfraCommand = strings.Split(*p.InfraCommand, " ") |