diff --git a/VERSION-vendor b/VERSION-vendor index 91dc9a2..482edf9 100644 --- a/VERSION-vendor +++ b/VERSION-vendor @@ -1 +1 @@ -1.0.0-5 +2.0.0-1 diff --git a/build_rubik_image.sh b/build_rubik_image.sh index 33a7708..5feefde 100755 --- a/build_rubik_image.sh +++ b/build_rubik_image.sh @@ -41,4 +41,4 @@ echo -e "\n" docker images | grep -E "REPOSITORY|${BINARY_NAME}" # Modify rubik-daemonset.yaml file, set rubik image name -sed -i "s/rubik_image_name_and_tag/${IMG_NAME_AND_TAG}/g" "${YAML_FILE}" +sed -i "/image:/s/:.*/: ${IMG_NAME_AND_TAG}/" "${YAML_FILE}" diff --git a/git-commit b/git-commit index 4ab4b8d..b9b4168 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -8e373d25ff4a5b76c9dc1735a40098254f49e1c6 +37e6484adbbb01802e969ccf640e5232d974b2fb diff --git a/patch/.gitkeep b/patch/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/patch/0001-rubik-enable-GO111MODULE-and-Optimized-compilation-i.patch b/patch/0001-rubik-enable-GO111MODULE-and-Optimized-compilation-i.patch deleted file mode 100644 index 146c26a..0000000 --- a/patch/0001-rubik-enable-GO111MODULE-and-Optimized-compilation-i.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d8e0e3d724f2fc85886cf087eea3cc89f8aa6630 Mon Sep 17 00:00:00 2001 -From: xiadanni -Date: Mon, 27 Dec 2021 16:52:03 +0800 -Subject: [PATCH] rubik: enable GO111MODULE and Optimized compilation - instruction - -Signed-off-by: xiadanni ---- - Makefile | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/Makefile b/Makefile -index 4285721..8d943cc 100644 ---- a/Makefile -+++ b/Makefile -@@ -21,21 +21,25 @@ RELEASE :=$(if $(shell awk -F"-" '{print $$2}' < $(VERSION_FILE)),$(shell awk -F - BUILD_TIME := $(shell date "+%Y-%m-%d") - GIT_COMMIT := $(if $(shell git rev-parse --short HEAD),$(shell git rev-parse --short HEAD),$(shell cat ./git-commit | head -c 7)) - -+export GO111MODULE=on -+ - DEBUG_FLAGS := -gcflags="all=-N -l" - LD_FLAGS := -ldflags '-buildid=none -tmpdir=$(TMP_DIR) \ - -X isula.org/rubik/pkg/version.GitCommit=$(GIT_COMMIT) \ - -X isula.org/rubik/pkg/version.BuildTime=$(BUILD_TIME) \ - -X isula.org/rubik/pkg/version.Version=$(VERSION) \ - -X isula.org/rubik/pkg/version.Release=$(RELEASE) \ -- -extldflags=-ftrapv \ -- -extldflags=-Wl,-z,relro,-z,now -linkmode=external -extldflags=-static' -+ -buildmode=pie \ -+ -extldflags=-ftrapv -extldflags=-zrelro -extldflags=-znow \ -+ -linkmode=external \ -+ -extldflags "-static-pie -Wl,-z,now"' - - GO_BUILD=CGO_ENABLED=1 \ - CGO_CFLAGS="-fstack-protector-strong -fPIE" \ - CGO_CPPFLAGS="-fstack-protector-strong -fPIE" \ - CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \ - CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \ -- go build -buildmode=pie -+ go build -mod=vendor - - all: release - --- -2.30.2 - diff --git a/patch/0002-rubik-fix-Dockerfile-build-failed.patch b/patch/0002-rubik-fix-Dockerfile-build-failed.patch deleted file mode 100644 index 70d9ee9..0000000 --- a/patch/0002-rubik-fix-Dockerfile-build-failed.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 8f5aac08a11a60c7fe21437c86c01df1367a0ba2 Mon Sep 17 00:00:00 2001 -From: hanchao -Date: Tue, 15 Nov 2022 00:12:14 +0800 -Subject: [PATCH] rubik: fix Dockerfile build failed - ---- - Dockerfile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Dockerfile b/Dockerfile -index 51f0e4c..78c7702 100644 ---- a/Dockerfile -+++ b/Dockerfile -@@ -1,3 +1,3 @@ - FROM scratch --COPY ./rubik /rubik -+COPY ./build/rubik /rubik - ENTRYPOINT ["/rubik"] --- -2.30.2 - diff --git a/patch/0003-set-the-burst-value-for-the-pod-to-enable-the-contai.patch b/patch/0003-set-the-burst-value-for-the-pod-to-enable-the-contai.patch deleted file mode 100644 index c79c251..0000000 --- a/patch/0003-set-the-burst-value-for-the-pod-to-enable-the-contai.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 1817eb44c25980c5ced63965838fe428c8860540 Mon Sep 17 00:00:00 2001 -From: yangjiaqi -Date: Wed, 16 Nov 2022 20:34:20 +0800 -Subject: [PATCH] set the burst value for the pod to enable the container burst - ---- - pkg/quota/quota_burst.go | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -diff --git a/pkg/quota/quota_burst.go b/pkg/quota/quota_burst.go -index 641e514..2d13cec 100644 ---- a/pkg/quota/quota_burst.go -+++ b/pkg/quota/quota_burst.go -@@ -27,7 +27,6 @@ import ( - "isula.org/rubik/pkg/typedef" - ) - -- - // SetPodsQuotaBurst sync pod's burst quota when autoconfig is set - func SetPodsQuotaBurst(podInfos map[string]*typedef.PodInfo) { - for _, pi := range podInfos { -@@ -62,6 +61,7 @@ func setPodQuotaBurst(podInfo *typedef.PodInfo) { - if podInfo.QuotaBurst == constant.InvalidBurst { - return - } -+ // 1. Try to write container burst value - burst := big.NewInt(podInfo.QuotaBurst).String() - for _, c := range podInfo.Containers { - err := setCtrQuotaBurst([]byte(burst), c) -@@ -69,20 +69,27 @@ func setPodQuotaBurst(podInfo *typedef.PodInfo) { - log.Errorf("set container quota burst failed: %v", err) - } - } -+ // 2. Try to write pod burst value -+ const subsys = "cpu" -+ podPath := filepath.Join(podInfo.CgroupRoot, subsys, podInfo.CgroupPath) -+ podBurst := big.NewInt(int64(len(podInfo.Containers)) * podInfo.QuotaBurst).String() -+ setQuotaBurst([]byte(podBurst), podPath) - } - - func setCtrQuotaBurst(burst []byte, c *typedef.ContainerInfo) error { -- const ( -- fname = "cpu.cfs_burst_us" -- subsys = "cpu" -- ) -+ const subsys = "cpu" - cgpath := c.CgroupPath(subsys) -- fpath := filepath.Join(cgpath, fname) -+ return setQuotaBurst(burst, cgpath) -+} - -+func setQuotaBurst(burst []byte, cgpath string) error { -+ const burst_file_name = "cpu.cfs_burst_us" -+ fpath := filepath.Join(cgpath, burst_file_name) -+ // check whether cgroup support cpu burst - if _, err := os.Stat(fpath); err != nil && os.IsNotExist(err) { - return errors.Errorf("quota-burst path=%v missing", fpath) - } -- -+ // try to write cfs_burst_us - if err := ioutil.WriteFile(fpath, burst, constant.DefaultFileMode); err != nil { - return errors.Errorf("quota-burst path=%v setting failed: %v", fpath, err) - } --- -2.30.0 - diff --git a/rubik.spec b/rubik.spec index ec8cac6..1917d8f 100644 --- a/rubik.spec +++ b/rubik.spec @@ -1,6 +1,6 @@ Name: rubik -Version: 1.0.0 -Release: 5 +Version: 2.0.0 +Release: 1 Summary: Hybrid Deployment for Cloud Native License: Mulan PSL V2 URL: https://gitee.com/openeuler/rubik @@ -13,7 +13,7 @@ Source5: series.conf Source6: patch.tar.gz Source7: build_rubik_image.sh BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: golang >= 1.13 +BuildRequires: golang >= 1.17 %description This is hybrid deployment component for cloud native, it should be running in kubernetes environment. @@ -56,6 +56,12 @@ install -Dp ./build_rubik_image.sh %{buildroot}%{_sharedstatedir}/%{name}/build_ rm -rf %{buildroot} %changelog +* Wed May 24 2023 vegbir - 2.0.0-1 +- Type:bugfix +- CVE:NA +- SUG:restart +- DESC:upgrade rubik version to v2.0.0 + * Tue Nov 29 2022 CooperLi - 1.0.0-5 - Type:bugfix - CVE:NA diff --git a/series.conf b/series.conf index 4502741..026f14c 100644 --- a/series.conf +++ b/series.conf @@ -1,4 +1 @@ -patch/0001-rubik-enable-GO111MODULE-and-Optimized-compilation-i.patch -patch/0002-rubik-fix-Dockerfile-build-failed.patch -patch/0003-set-the-burst-value-for-the-pod-to-enable-the-contai.patch #end of file diff --git a/v1.0.0.tar.gz b/v1.0.0.tar.gz deleted file mode 100644 index ace9360..0000000 Binary files a/v1.0.0.tar.gz and /dev/null differ diff --git a/v2.0.0.tar.gz b/v2.0.0.tar.gz new file mode 100644 index 0000000..89f53e4 Binary files /dev/null and b/v2.0.0.tar.gz differ