summaryrefslogtreecommitdiff
path: root/pkg/specgen/podspecgen.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/specgen/podspecgen.go')
-rw-r--r--pkg/specgen/podspecgen.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/specgen/podspecgen.go b/pkg/specgen/podspecgen.go
index 7d771f5bb..000a787ea 100644
--- a/pkg/specgen/podspecgen.go
+++ b/pkg/specgen/podspecgen.go
@@ -2,6 +2,8 @@ package specgen
import (
"net"
+
+ spec "github.com/opencontainers/runtime-spec/specs-go"
)
// PodBasicConfig contains basic configuration options for pods.
@@ -155,6 +157,16 @@ type PodSpecGenerator struct {
PodBasicConfig
PodNetworkConfig
PodCgroupConfig
+ PodResourceConfig
+}
+
+type PodResourceConfig struct {
+ // ResourceLimits contains linux specific CPU data for the pod
+ ResourceLimits *spec.LinuxResources `json:"resource_limits,omitempty"`
+ // CPU period of the cpuset, determined by --cpus
+ CPUPeriod uint64 `json:"cpu_period,omitempty"`
+ // CPU quota of the cpuset, determined by --cpus
+ CPUQuota int64 `json:"cpu_quota,omitempty"`
}
// NewPodSpecGenerator creates a new pod spec