diff --git a/Makefile b/Makefile index 1a5cf1df92f65ff7a89b862f4c4d80118b88ae28..c0192c3a7deb97ba3d3edeac21e92723f1d6b374 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,11 @@ GIT_COMMIT ?= $(if $(shell git rev-parse --short HEAD),$(shell git rev-parse --short HEAD),$(error "commit id failed")) SOURCE_DATE_EPOCH ?= $(if $(shell date +%s),$(shell date +%s),$(error "date failed")) VERSION := $(shell cat ./VERSION) -ARCH := $(shell arch) +# eggo arch amd64/arm64 +ARCH ?= amd64 +ifeq ($(shell uname -p),aarch64) +ARCH ?= arm64 +endif EXTRALDFLAGS := LDFLAGS := -X isula.org/eggo/cmd.Version=$(VERSION) \ @@ -13,7 +17,7 @@ STATIC_LDFLAGS := -extldflags=-static -linkmode=external SAFEBUILDFLAGS := -buildmode=pie -extldflags=-ftrapv -extldflags=-zrelro -extldflags=-znow -tmpdir=/tmp/xxeggo $(LDFLAGS) GO := go -GO_BUILD := CGO_ENABLED=0 $(GO) +GO_BUILD := CGO_ENABLED=0 GOARCH=$(ARCH) $(GO) .PHONY: eggo eggo: diff --git a/eggops.yaml b/eggops.yaml index 606f4dadf7cdb747f2eea010243c8d190f54e5e6..419854af42195ca6ffd8497f97761ecdcf71677b 100644 --- a/eggops.yaml +++ b/eggops.yaml @@ -1626,7 +1626,7 @@ spec: containers: - command: - /manager - image: hub.oepkgs.net/haozi007/eggops:v1.0.0-alpha + image: hub.oepkgs.net/haozi007/eggops:1.0.0-alpha livenessProbe: httpGet: path: /healthz diff --git a/pkg/clusterdeployment/binary/cleanupcluster/cleanupcommon.go b/pkg/clusterdeployment/binary/cleanupcluster/cleanupcommon.go index 82207468b58359e99aaaca3e7b6cebd9ddc13f6d..e681b6323c2016d65f9d29b684382b9439674201 100644 --- a/pkg/clusterdeployment/binary/cleanupcluster/cleanupcommon.go +++ b/pkg/clusterdeployment/binary/cleanupcluster/cleanupcommon.go @@ -43,7 +43,7 @@ func PostCleanup(r runner.Runner) { func stopServices(r runner.Runner, services []string) error { join := strings.Join(services, " ") - if _, err := r.RunCommand(fmt.Sprintf("sudo -E /bin/sh -c \"systemctl stop %s\"", join)); err != nil { + if _, err := r.RunCommand(fmt.Sprintf("sudo -E /bin/sh -c \"systemctl stop %s && systemctl disable %s\"", join, join)); err != nil { logrus.Errorf("stop services failed: %v", err) return err } diff --git a/pkg/clusterdeployment/binary/commontools/systemdservices.go b/pkg/clusterdeployment/binary/commontools/systemdservices.go index 790d3d4cae5721d4e8991edba3346daddc4f980e..e500aabf9744f35c3fba41ad553a14a1dadc8c8b 100644 --- a/pkg/clusterdeployment/binary/commontools/systemdservices.go +++ b/pkg/clusterdeployment/binary/commontools/systemdservices.go @@ -406,8 +406,10 @@ func GetSystemdServiceShell(name string, base64Data string, needRestart bool) (s shell := ` #!/bin/bash {{- if .content }} +systemctl disable {{ .name }} rm -f /usr/lib/systemd/system/{{ .name }}.service echo {{ .content }} | base64 -d > /usr/lib/systemd/system/{{ .name }}.service +systemctl daemon-reload {{- end }} which chcon if [ $? -eq 0 ]; then diff --git a/pkg/clusterdeployment/runtime/runtime.go b/pkg/clusterdeployment/runtime/runtime.go index 021ce587232ae8ea26a32ad269280659c8f07784..ca5e265bb0e2b9a71854cfefe2d2de9af4cef005 100644 --- a/pkg/clusterdeployment/runtime/runtime.go +++ b/pkg/clusterdeployment/runtime/runtime.go @@ -177,7 +177,7 @@ Type=notify EnvironmentFile=-/etc/sysconfig/docker ExecStart=/usr/bin/dockerd \ {{- range $i, $v := .registry }} - --registry-mirrors {{ $v }} \ + --registry-mirror {{ $v }} \ {{- end }} {{- range $i, $v := .insecure }} --insecure-registry {{ $v }} \