From ddc360fe1778d8feeeca7c3790949f76eeedc2c3 Mon Sep 17 00:00:00 2001 From: TomSweeneyRedHat Date: Mon, 2 Aug 2021 21:16:01 -0400 Subject: Bump Buildah to v1.22.0 [NO TESTS NEEDED] Bump Buildah to v1.22.0 in preparation for RHEL 8.5 and RHEL 9.0beta. Also bump c/common to v0.42.1 [NO TESTS NEEDED] Signed-off-by: TomSweeneyRedHat Signed-off-by: Daniel J Walsh --- pkg/api/handlers/compat/images_build.go | 12 ++++++++---- pkg/bindings/images/build.go | 19 +++++++++++++------ 2 files changed, 21 insertions(+), 10 deletions(-) (limited to 'pkg') diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go index 2c98a5361..08d1df4b8 100644 --- a/pkg/api/handlers/compat/images_build.go +++ b/pkg/api/handlers/compat/images_build.go @@ -73,10 +73,12 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { CacheFrom string `schema:"cachefrom"` Compression uint64 `schema:"compression"` ConfigureNetwork string `schema:"networkmode"` - CpuPeriod uint64 `schema:"cpuperiod"` // nolint - CpuQuota int64 `schema:"cpuquota"` // nolint - CpuSetCpus string `schema:"cpusetcpus"` // nolint - CpuShares uint64 `schema:"cpushares"` // nolint + CpuPeriod uint64 `schema:"cpuperiod"` // nolint + CpuQuota int64 `schema:"cpuquota"` // nolint + CpuSetCpus string `schema:"cpusetcpus"` // nolint + CpuSetMems string `schema:"cpusetmems"` // nolint + CpuShares uint64 `schema:"cpushares"` // nolint + CgroupParent string `schema:"cgroupparent"` // nolint DNSOptions string `schema:"dnsoptions"` DNSSearch string `schema:"dnssearch"` DNSServers string `schema:"dnsservers"` @@ -422,7 +424,9 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { CPUPeriod: query.CpuPeriod, CPUQuota: query.CpuQuota, CPUSetCPUs: query.CpuSetCpus, + CPUSetMems: query.CpuSetMems, CPUShares: query.CpuShares, + CgroupParent: query.CgroupParent, DNSOptions: dnsoptions, DNSSearch: dnssearch, DNSServers: dnsservers, diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go index a35f461a7..e1aeae244 100644 --- a/pkg/bindings/images/build.go +++ b/pkg/bindings/images/build.go @@ -74,18 +74,25 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO } params.Set("excludes", bArgs) } - if cpuShares := options.CommonBuildOpts.CPUShares; cpuShares > 0 { - params.Set("cpushares", strconv.Itoa(int(cpuShares))) - } - if cpuSetCpus := options.CommonBuildOpts.CPUSetCPUs; len(cpuSetCpus) > 0 { - params.Set("cpusetcpus", cpuSetCpus) - } if cpuPeriod := options.CommonBuildOpts.CPUPeriod; cpuPeriod > 0 { params.Set("cpuperiod", strconv.Itoa(int(cpuPeriod))) } if cpuQuota := options.CommonBuildOpts.CPUQuota; cpuQuota > 0 { params.Set("cpuquota", strconv.Itoa(int(cpuQuota))) } + if cpuSetCpus := options.CommonBuildOpts.CPUSetCPUs; len(cpuSetCpus) > 0 { + params.Set("cpusetcpus", cpuSetCpus) + } + if cpuSetMems := options.CommonBuildOpts.CPUSetMems; len(cpuSetMems) > 0 { + params.Set("cpusetmems", cpuSetMems) + } + if cpuShares := options.CommonBuildOpts.CPUShares; cpuShares > 0 { + params.Set("cpushares", strconv.Itoa(int(cpuShares))) + } + if len(options.CommonBuildOpts.CgroupParent) > 0 { + params.Set("cgroupparent", options.CommonBuildOpts.CgroupParent) + } + params.Set("networkmode", strconv.Itoa(int(options.ConfigureNetwork))) params.Set("outputformat", options.OutputFormat) -- cgit v1.2.3-54-g00ecf