summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/main.yaml6
-rw-r--r--.github/workflows/release.yml38
-rw-r--r--Makefile9
-rw-r--r--common/constants/default.go2
-rw-r--r--edge/pkg/metamanager/metaserver/kubernetes/serializer/serializer.go1
-rwxr-xr-xhack/lib/golang.sh29
-rwxr-xr-xhack/make-rules/release.sh96
-rw-r--r--keadm/cmd/keadm/app/cmd/util/image.go2
-rw-r--r--staging/src/github.com/kubeedge/mapper-framework/pkg/util/parse/grpc.go80
9 files changed, 161 insertions, 102 deletions
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 02e1439b7..eeac48eed 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -196,7 +196,7 @@ jobs:
run: |
command -v ginkgo || go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
go install sigs.k8s.io/kind@v0.18.0
- curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.26.7/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl
+ curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.26.10/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl
- name: Checkout code
uses: actions/checkout@v3
@@ -259,7 +259,7 @@ jobs:
run: |
command -v ginkgo || go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
go install sigs.k8s.io/kind@v0.18.0
- curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.26.7/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl
+ curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.26.10/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl
- name: Checkout code
uses: actions/checkout@v3
@@ -306,7 +306,7 @@ jobs:
run: |
command -v ginkgo || go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
go install sigs.k8s.io/kind@v0.18.0
- curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.26.7/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl
+ curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.26.10/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl
- name: Checkout code
uses: actions/checkout@v3
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7b7dbf7ec..12d923409 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,16 +17,25 @@ jobs:
target: [kubeedge, edgesite, keadm]
os: [linux]
ARM_VERSION: [GOARM7, GOARM8, ""]
+ include:
+ - target: kubeedge
+ os: windows
+ ARM_VERSION: ""
+ - target: keadm
+ os: windows
+ ARM_VERSION: ""
outputs:
- hash-kubeedge-amd64: ${{ steps.hash.outputs.hash-kubeedge-amd64 }}
- hash-kubeedge-arm64: ${{ steps.hash.outputs.hash-kubeedge-arm64 }}
- hash-kubeedge-arm: ${{ steps.hash.outputs.hash-kubeedge-arm }}
- hash-keadm-amd64: ${{ steps.hash.outputs.hash-keadm-amd64 }}
- hash-keadm-arm64: ${{ steps.hash.outputs.hash-keadm-arm64 }}
- hash-keadm-arm: ${{ steps.hash.outputs.hash-keadm-arm }}
- hash-edgesite-amd64: ${{ steps.hash.outputs.hash-edgesite-amd64 }}
- hash-edgesite-arm64: ${{ steps.hash.outputs.hash-edgesite-arm64 }}
- hash-edgesite-arm: ${{ steps.hash.outputs.hash-edgesite-arm }}
+ hash-kubeedge-linux-amd64: ${{ steps.hash.outputs.hash-kubeedge-linux-amd64 }}
+ hash-kubeedge-windows-amd64: ${{ steps.hash.outputs.hash-kubeedge-windows-amd64 }}
+ hash-kubeedge-linux-arm64: ${{ steps.hash.outputs.hash-kubeedge-linux-arm64 }}
+ hash-kubeedge-linux-arm: ${{ steps.hash.outputs.hash-kubeedge-linux-arm }}
+ hash-keadm-linux-amd64: ${{ steps.hash.outputs.hash-keadm-linux-amd64 }}
+ hash-keadm-linux-arm64: ${{ steps.hash.outputs.hash-keadm-linux-arm64 }}
+ hash-keadm-linux-arm: ${{ steps.hash.outputs.hash-keadm-linux-arm }}
+ hash-keadm-windows-amd64: ${{ steps.hash.outputs.hash-keadm-windows-amd64 }}
+ hash-edgesite-linux-amd64: ${{ steps.hash.outputs.hash-edgesite-linux-amd64 }}
+ hash-edgesite-linux-arm64: ${{ steps.hash.outputs.hash-edgesite-linux-arm64 }}
+ hash-edgesite-linux-arm: ${{ steps.hash.outputs.hash-edgesite-linux-arm }}
steps:
- name: checkout code
uses: actions/checkout@v3
@@ -37,8 +46,13 @@ jobs:
fetch-depth: 0
- name: Making and packaging
run: |
- docker pull kubeedge/build-tools:1.19.12-ke2
- make release WHAT=${{ matrix.target }} ARM_VERSION=${{ matrix.ARM_VERSION }}
+ if [ "${{ matrix.os }}" == "linux" ]; then
+ docker pull kubeedge/build-tools:1.19.12-ke2
+ BUILD_CONTAINER=true
+ else
+ BUILD_CONTAINER=false
+ fi
+ make release WHAT=${{ matrix.target }} ARM_VERSION=${{ matrix.ARM_VERSION }} OS=${{ matrix.os }} BUILD_WITH_CONTAINER=$BUILD_CONTAINER
- name: Generate arch
run: |
if [ "${{ matrix.ARM_VERSION }}" = "GOARM7" ]; then echo "output_arch=arm" >> $GITHUB_ENV; elif [ ${{ matrix.ARM_VERSION }} = "GOARM8" ]; then echo "output_arch=arm64" >> $GITHUB_ENV; else echo "output_arch=amd64" >> $GITHUB_ENV; fi
@@ -47,7 +61,7 @@ jobs:
id: hash
run: |
cp _output/release/${{ github.ref_name }}/${{ matrix.target }}-${{ github.ref_name }}-${{ matrix.os }}-${{ env.output_arch }}.tar.gz .
- echo "hash-${{ matrix.target }}-${{ env.output_arch }}=$( \
+ echo "hash-${{ matrix.target }}-${{ matrix.os }}-${{ env.output_arch }}=$( \
sha256sum ${{ matrix.target }}-${{ github.ref_name }}-${{ matrix.os }}-${{ env.output_arch}}.tar.gz | base64 -w0 \
)" >> "$GITHUB_OUTPUT"
- name: Uploading assets...
diff --git a/Makefile b/Makefile
index 5bd93a80d..395feba50 100644
--- a/Makefile
+++ b/Makefile
@@ -434,13 +434,18 @@ define RELEASE_HELP_INFO
#
endef
.PHONY: release
+
ifeq ($(HELP),y)
release:
@echo "$$RELEASE_HELP_INFO"
else ifeq ($(BUILD_WITH_CONTAINER),true)
release:
- $(RUN) hack/make-rules/release.sh $(WHAT) $(ARM_VERSION)
+ $(RUN) hack/make-rules/release.sh $(WHAT) $(ARM_VERSION) $(OS)
+else ifeq ($(OS),windows)
+release:
+ sudo apt-get install -y mingw-w64
+ hack/make-rules/release.sh $(WHAT) $(ARM_VERSION) $(OS)
else
release:
- hack/make-rules/release.sh $(WHAT) $(ARM_VERSION)
+ hack/make-rules/release.sh $(WHAT) $(ARM_VERSION) $(OS)
endif
diff --git a/common/constants/default.go b/common/constants/default.go
index 92a69f60e..81b06bc7c 100644
--- a/common/constants/default.go
+++ b/common/constants/default.go
@@ -55,7 +55,7 @@ const (
DefaultTunnelPort = 10004
DefaultClusterDomain = "cluster.local"
- CurrentSupportK8sVersion = "v1.26.7"
+ CurrentSupportK8sVersion = "v1.26.10"
// MetaManager
DefaultRemoteQueryTimeout = 60
diff --git a/edge/pkg/metamanager/metaserver/kubernetes/serializer/serializer.go b/edge/pkg/metamanager/metaserver/kubernetes/serializer/serializer.go
index 62c9e83ac..e06570de3 100644
--- a/edge/pkg/metamanager/metaserver/kubernetes/serializer/serializer.go
+++ b/edge/pkg/metamanager/metaserver/kubernetes/serializer/serializer.go
@@ -31,6 +31,7 @@ func (f WithoutConversionCodecFactory) SupportedMediaTypes() []runtime.Serialize
EncodesAsText: true,
Serializer: json.NewSerializerWithOptions(json.DefaultMetaFactory, f.creator, f.typer, json.SerializerOptions{Pretty: false}),
PrettySerializer: json.NewSerializerWithOptions(json.DefaultMetaFactory, f.creator, f.typer, json.SerializerOptions{Pretty: true}),
+ StrictSerializer: json.NewSerializerWithOptions(json.DefaultMetaFactory, f.creator, f.typer, json.SerializerOptions{Strict: true}),
StreamSerializer: &runtime.StreamSerializerInfo{
EncodesAsText: true,
Serializer: json.NewSerializerWithOptions(json.DefaultMetaFactory, f.creator, f.typer, json.SerializerOptions{Pretty: false}),
diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh
index aa93125d1..11edbe08f 100755
--- a/hack/lib/golang.sh
+++ b/hack/lib/golang.sh
@@ -261,11 +261,17 @@ kubeedge::golang::cross_build_place_binaries() {
local -a targets=()
local goarm=${goarm:-${KUBEEDGE_ALL_CROSS_GOARMS[0]}}
+ local goos="linux"
+ local goarch="amd64"
for arg in "$@"; do
if [[ "${arg}" == GOARM* ]]; then
# Assume arguments starting with a dash are flags to pass to go.
goarm="${arg##*GOARM}"
+ elif [[ "${arg}" == GOOS* ]]; then
+ goos="${arg##*GOOS}"
+ elif [[ "${arg}" == GOARCH* ]]; then
+ goarch="${arg##*GOARCH}"
else
targets+=("$(kubeedge::golang::get_target_by_binary $arg)")
fi
@@ -288,16 +294,23 @@ kubeedge::golang::cross_build_place_binaries() {
mkdir -p ${KUBEEDGE_OUTPUT_BINPATH}
for bin in ${binaries[@]}; do
- echo "cross building $bin GOARM${goarm}"
local name="${bin##*/}"
- if [ "${goarm}" == "8" ]; then
- set -x
- GOARM="" # need to clear the value since golang compiler doesn't allow this env when building the binary for ARMv8.
- GOARCH=arm64 GOOS="linux" CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc go build -o ${KUBEEDGE_OUTPUT_BINPATH}/${name} -ldflags "$ldflags" $bin
- set +x
- elif [ "${goarm}" == "7" ]; then
+ if [ "${goos}" == "linux" ] ; then
+ echo "cross building $bin GOARM${goarm} ${goos} ${goarch}"
+ if [ "${goarm}" == "8" ]; then
+ set -x
+ GOARM="" # need to clear the value since golang compiler doesn't allow this env when building the binary for ARMv8.
+ GOARCH=arm64 GOOS=${goos} CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc go build -o ${KUBEEDGE_OUTPUT_BINPATH}/${name} -ldflags "$ldflags" $bin
+ set +x
+ elif [ "${goarm}" == "7" ]; then
+ set -x
+ GOARCH=arm GOOS=${goos} GOARM=${goarm} CGO_ENABLED=1 CC=arm-linux-gnueabihf-gcc go build -o ${KUBEEDGE_OUTPUT_BINPATH}/${name} -ldflags "$ldflags" $bin
+ set +x
+ fi
+ elif [ "${goos}" == "windows" ]; then
+ echo "cross building $bin ${goos} ${goarch}"
set -x
- GOARCH=arm GOOS="linux" GOARM=${goarm} CGO_ENABLED=1 CC=arm-linux-gnueabihf-gcc go build -o ${KUBEEDGE_OUTPUT_BINPATH}/${name} -ldflags "$ldflags" $bin
+ GOARCH=${goarch} GOOS=${goos} CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go build -o ${KUBEEDGE_OUTPUT_BINPATH}/${name} -ldflags "$ldflags" $bin
set +x
fi
done
diff --git a/hack/make-rules/release.sh b/hack/make-rules/release.sh
index 6eeea89b6..166fe9fb3 100755
--- a/hack/make-rules/release.sh
+++ b/hack/make-rules/release.sh
@@ -33,6 +33,7 @@ function release() {
local -a targets=()
local VERSION=""
local ARCH="amd64"
+ local OS="linux"
local arm_version=""
for arg in "$@"; do
@@ -42,6 +43,10 @@ function release() {
elif [[ "${arg}" == GOARM8 ]]; then
arm_version="GOARM8"
ARCH="arm64"
+ elif [[ "${arg}" == "linux" ]]; then
+ OS="linux"
+ elif [[ "${arg}" == windows ]]; then
+ OS="windows"
else
targets+=("${arg}")
fi
@@ -66,22 +71,28 @@ function release() {
build_edgesite_release $VERSION $ARCH
;;
"keadm")
- if [ "${ARCH}" == "amd64" ]; then
+ if [ "${ARCH}" == "amd64" ] && [ "${OS}" == "linux" ]; then
hack/make-rules/build.sh keadm
else
- hack/make-rules/crossbuild.sh keadm ${arm_version}
+ hack/make-rules/crossbuild.sh keadm ${arm_version} GOARCH${ARCH} GOOS${OS}
fi
- build_keadm_release $VERSION $ARCH
+ build_keadm_release $VERSION $ARCH $OS
;;
"kubeedge")
- if [ "${ARCH}" == "amd64" ]; then
- hack/make-rules/build.sh cloudcore admission edgecore csidriver iptablesmanager controllermanager
- else
- hack/make-rules/crossbuild.sh cloudcore admission edgecore csidriver iptablesmanager controllermanager ${arm_version}
+ if [ "${OS}" == "linux" ]; then
+ if [ "${ARCH}" == "amd64" ]; then
+ hack/make-rules/build.sh cloudcore admission edgecore csidriver iptablesmanager controllermanager
+ else
+ hack/make-rules/crossbuild.sh cloudcore admission edgecore csidriver iptablesmanager controllermanager ${arm_version} GOOS${OS} GOARCH${ARCH}
+ fi
fi
- build_kubeedge_release $VERSION $ARCH
+ if [ "${OS}" == "windows" ]; then
+ hack/make-rules/crossbuild.sh edgecore GOOS${OS} GOARCH${ARCH}
+ fi
+
+ build_kubeedge_release $VERSION $ARCH $OS
;;
*)
echo "not supported release:" $bin "only supported:" ${ALL_RELEASE_TARGETS[@]}
@@ -93,77 +104,92 @@ function release() {
function build_kubeedge_release() {
local VERSION=""
local ARCH="amd64"
+ local OS="linux"
for arg in "$@"; do
if [[ "${arg}" == v* ]]; then
VERSION="${arg}"
elif [[ "${arg}" == arm* ]]; then
ARCH="${arg}"
+ elif [[ "${arg}" == "windows" ]]; then
+ OS="windows"
fi
done
- echo "building kubeedge release:" ${VERSION} "ARCH:"${ARCH}
+ echo "building kubeedge release:" ${VERSION} "ARCH:"${ARCH} "OS:"${OS}
- mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud
- mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud/admission
- mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud/cloudcore
- mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud/csidriver
- mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud/iptablesmanager
- mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud/controllermanager
- mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/edge
+ if [ "${OS}" == "linux" ]; then
+ mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud
+ mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud/admission
+ mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud/cloudcore
+ mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud/csidriver
+ mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud/iptablesmanager
+ mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud/controllermanager
+ mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/edge
- echo ${VERSION} > _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/version
- cp _output/local/bin/admission _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud/admission
- cp _output/local/bin/cloudcore _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud/cloudcore
- cp _output/local/bin/csidriver _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud/csidriver
- cp _output/local/bin/iptablesmanager _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud/iptablesmanager
- cp _output/local/bin/controllermanager _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/cloud/controllermanager
+ cp _output/local/bin/admission _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud/admission
+ cp _output/local/bin/cloudcore _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud/cloudcore
+ cp _output/local/bin/csidriver _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud/csidriver
+ cp _output/local/bin/iptablesmanager _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud/iptablesmanager
+ cp _output/local/bin/controllermanager _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/cloud/controllermanager
+ cp _output/local/bin/edgecore _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/edge
- cp _output/local/bin/edgecore _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/edge
+ elif [ "${OS}" == "windows" ]; then
+ mkdir -p _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/edge
+ cp _output/local/bin/edgecore _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/edge/edgecore.exe
+ fi
+ echo ${VERSION} > _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/version
cd _output/release/${VERSION}
- tar -czvf ${KUBEEDGE_ROOT}/_output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}.tar.gz kubeedge-${VERSION}-linux-${ARCH}/
+ tar -czvf ${KUBEEDGE_ROOT}/_output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}.tar.gz kubeedge-${VERSION}-${OS}-${ARCH}/
cd $KUBEEDGE_ROOT
- rm -r _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}/
+ rm -r _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}/
#calculate sha512sum
#the below command got like this:
# d6db3c28b1991de781bf19a82fc5b24a1dbf9634e8edfa10e2ad8636baaf37ab3141ea8814db1f1c91119fccc9b7ff44d8ab9f3def536fd5262418035f527e86 kubeedge-v1.9.0-linux-amd64.tar.gz
- sum=$(sha512sum _output/release/${VERSION}/kubeedge-${VERSION}-linux-${ARCH}.tar.gz)
+ sum=$(sha512sum _output/release/${VERSION}/kubeedge-${VERSION}-${OS}-${ARCH}.tar.gz)
sumArray=($sum)
- echo ${sumArray[0]} > _output/release/${VERSION}/checksum_kubeedge-${VERSION}-linux-${ARCH}.tar.gz.txt
+ echo ${sumArray[0]} > _output/release/${VERSION}/checksum_kubeedge-${VERSION}-${OS}-${ARCH}.tar.gz.txt
}
function build_keadm_release() {
local VERSION=""
local ARCH="amd64"
+ local OS="linux"
for arg in "$@"; do
if [[ "${arg}" == v* ]]; then
VERSION="${arg}"
elif [[ "${arg}" == arm* ]]; then
ARCH="${arg}"
+ elif [[ "${arg}" == "windows" ]]; then
+ OS="windows"
fi
done
- echo "building keadm release:" ${VERSION} "ARCH:"${ARCH}
+ echo "building keadm release:" ${VERSION} "ARCH:"${ARCH} "OS:"${OS}
- mkdir -p _output/release/${VERSION}/keadm-${VERSION}-linux-${ARCH}/keadm
+ mkdir -p _output/release/${VERSION}/keadm-${VERSION}-${OS}-${ARCH}/keadm
- echo ${VERSION} > _output/release/${VERSION}/keadm-${VERSION}-linux-${ARCH}/version
- cp _output/local/bin/keadm _output/release/${VERSION}/keadm-${VERSION}-linux-${ARCH}/keadm
+ echo ${VERSION} > _output/release/${VERSION}/keadm-${VERSION}-${OS}-${ARCH}/version
+ if [ "${OS}" == "linux" ]; then
+ cp _output/local/bin/keadm _output/release/${VERSION}/keadm-${VERSION}-${OS}-${ARCH}/keadm
+ elif [ "${OS}" == "windows" ]; then
+ cp _output/local/bin/keadm _output/release/${VERSION}/keadm-${VERSION}-${OS}-${ARCH}/keadm/keadm.exe
+ fi
cd _output/release/${VERSION}
- tar -czvf ${KUBEEDGE_ROOT}/_output/release/${VERSION}/keadm-${VERSION}-linux-${ARCH}.tar.gz keadm-${VERSION}-linux-${ARCH}/
+ tar -czvf ${KUBEEDGE_ROOT}/_output/release/${VERSION}/keadm-${VERSION}-${OS}-${ARCH}.tar.gz keadm-${VERSION}-${OS}-${ARCH}/
cd $KUBEEDGE_ROOT
- rm -r _output/release/${VERSION}/keadm-${VERSION}-linux-${ARCH}
+ rm -r _output/release/${VERSION}/keadm-${VERSION}-${OS}-${ARCH}
#calculate sha512sum
- sum=$(sha512sum _output/release/${VERSION}/keadm-${VERSION}-linux-${ARCH}.tar.gz)
+ sum=$(sha512sum _output/release/${VERSION}/keadm-${VERSION}-${OS}-${ARCH}.tar.gz)
sumArray=($sum)
- echo ${sumArray[0]} > _output/release/${VERSION}/checksum_keadm-${VERSION}-linux-${ARCH}.tar.gz.txt
+ echo ${sumArray[0]} > _output/release/${VERSION}/checksum_keadm-${VERSION}-${OS}-${ARCH}.tar.gz.txt
}
function build_edgesite_release() {
diff --git a/keadm/cmd/keadm/app/cmd/util/image.go b/keadm/cmd/keadm/app/cmd/util/image.go
index d08f6e249..7ffbd6056 100644
--- a/keadm/cmd/keadm/app/cmd/util/image.go
+++ b/keadm/cmd/keadm/app/cmd/util/image.go
@@ -281,8 +281,6 @@ func (runtime *CRIRuntime) CopyResources(edgeImage string, files map[string]stri
SecurityContext: &runtimeapi.LinuxSandboxSecurityContext{
NamespaceOptions: &runtimeapi.NamespaceOption{
Network: runtimeapi.NamespaceMode_POD,
- Pid: runtimeapi.NamespaceMode_CONTAINER,
- Ipc: runtimeapi.NamespaceMode_POD,
},
},
},
diff --git a/staging/src/github.com/kubeedge/mapper-framework/pkg/util/parse/grpc.go b/staging/src/github.com/kubeedge/mapper-framework/pkg/util/parse/grpc.go
index 8f6e89254..9fb9621e6 100644
--- a/staging/src/github.com/kubeedge/mapper-framework/pkg/util/parse/grpc.go
+++ b/staging/src/github.com/kubeedge/mapper-framework/pkg/util/parse/grpc.go
@@ -134,63 +134,65 @@ func buildPropertiesFromGrpc(device *dmiapi.Device) []common.DeviceProperty {
// get dbMethod filed by grpc device instance
var dbMethodName string
var dbconfig common.DBConfig
- if pptv.PushMethod.DBMethod != nil {
- dbMethodName, err = getDBMethodFromGrpc(pptv)
+ var pushMethod []byte
+ var pushMethodName string
+ if pptv.PushMethod != nil {
+ if pptv.PushMethod.DBMethod != nil {
+ dbMethodName, err = getDBMethodFromGrpc(pptv)
+ if err != nil {
+ klog.Errorf("err: %+v", err)
+ return nil
+ }
+ switch dbMethodName {
+ case "influx":
+ clientconfig, err := json.Marshal(pptv.PushMethod.DBMethod.Influxdb2.Influxdb2ClientConfig)
+ if err != nil {
+ klog.Errorf("err: %+v", err)
+ return nil
+ }
+ dataconfig, err := json.Marshal(pptv.PushMethod.DBMethod.Influxdb2.Influxdb2DataConfig)
+ if err != nil {
+ klog.Errorf("err: %+v", err)
+ return nil
+ }
+ dbconfig = common.DBConfig{
+ Influxdb2ClientConfig: clientconfig,
+ Influxdb2DataConfig: dataconfig,
+ }
+ }
+ }
+ // get pushMethod filed by grpc device instance
+ pushMethodName, err = getPushMethodFromGrpc(pptv)
if err != nil {
klog.Errorf("err: %+v", err)
return nil
}
- switch dbMethodName {
- case "influx":
- clientconfig, err := json.Marshal(pptv.PushMethod.DBMethod.Influxdb2.Influxdb2ClientConfig)
+ switch pushMethodName {
+ case "http":
+ pushMethod, err = json.Marshal(pptv.PushMethod.Http)
if err != nil {
klog.Errorf("err: %+v", err)
return nil
}
- dataconfig, err := json.Marshal(pptv.PushMethod.DBMethod.Influxdb2.Influxdb2DataConfig)
+ case "mqtt":
+ pushMethod, err = json.Marshal(pptv.PushMethod.Mqtt)
if err != nil {
klog.Errorf("err: %+v", err)
return nil
}
- dbconfig = common.DBConfig{
- Influxdb2ClientConfig: clientconfig,
- Influxdb2DataConfig: dataconfig,
- }
- }
- }
-
- // get pushMethod filed by grpc device instance
- pushMethodName, err := getPushMethodFromGrpc(pptv)
- if err != nil {
- klog.Errorf("err: %+v", err)
- return nil
- }
- var pushMethod []byte
- switch pushMethodName {
- case "http":
- pushMethod, err = json.Marshal(pptv.PushMethod.Http)
- if err != nil {
- klog.Errorf("err: %+v", err)
- return nil
- }
- case "mqtt":
- pushMethod, err = json.Marshal(pptv.PushMethod.Mqtt)
- if err != nil {
- klog.Errorf("err: %+v", err)
- return nil
}
}
// get the final Properties
cur := common.DeviceProperty{
- Name: pptv.GetName(),
- PropertyName: pptv.GetName(),
- ModelName: device.Spec.DeviceModelReference,
- CollectCycle: pptv.GetCollectCycle(),
- ReportCycle: pptv.GetReportCycle(),
+ Name: pptv.GetName(),
+ PropertyName: pptv.GetName(),
+ ModelName: device.Spec.DeviceModelReference,
+ CollectCycle: pptv.GetCollectCycle(),
+ ReportCycle: pptv.GetReportCycle(),
ReportToCloud: pptv.GetReportToCloud(),
- Protocol: protocolName,
- Visitors: visitorConfig,
+ Protocol: protocolName,
+ Visitors: visitorConfig,
PushMethod: common.PushMethodConfig{
MethodName: pushMethodName,
MethodConfig: pushMethod,