summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorKubeEdge Bot <48982446+kubeedge-bot@users.noreply.github.com>2022-06-15 17:20:58 +0800
committerGitHub <noreply@github.com>2022-06-15 17:20:58 +0800
commit436021c5b78b2f8c2087b891f2ba5f1aade324b1 (patch)
treed43f6930503c2500e64626b8c1289340385a766a /hack
parentMerge pull request #3922 from wackxu/rmunsede2ecode (diff)
parentfilter resource in dynamiccontroller (diff)
downloadkubeedge-436021c5b78b2f8c2087b891f2ba5f1aade324b1.tar.gz
Merge pull request #3719 from vincentgoat/nodegroup
[feature] implementation of nodegroup and edgeapplication controller
Diffstat (limited to 'hack')
-rwxr-xr-xhack/generate-crds.sh18
-rwxr-xr-xhack/lib/golang.sh1
-rwxr-xr-xhack/make-rules/image.sh1
-rwxr-xr-xhack/update-codegen.sh2
4 files changed, 17 insertions, 5 deletions
diff --git a/hack/generate-crds.sh b/hack/generate-crds.sh
index 167260499..8eba11a75 100755
--- a/hack/generate-crds.sh
+++ b/hack/generate-crds.sh
@@ -22,6 +22,7 @@ CRD_VERSIONS=v1
CRD_OUTPUTS=build/crds
DEVICES_VERSION=v1alpha2
RELIABLESYNCS_VERSION=v1alpha1
+APPS_VERSION=v1alpha1
HELM_CRDS_DIR=manifests/charts/cloudcore/crds
ROUTER_DIR=build/crds/router
@@ -67,21 +68,30 @@ function :gen:crds: {
$(which controller-gen) paths="./..." ${_crdOptions} output:crd:artifacts:config=${_tmpdir}
}
+# remove the last element if it ends with "s", i.e: devicemodels -> devicemodel
+function remove_suffix_s {
+ if [ "${1: -1}" == "s" ]; then
+ echo ${1%?}
+ fi
+}
+
function :copy:to:destination {
# rename files, copy files
mkdir -p ${CRD_OUTPUTS}/devices
mkdir -p ${CRD_OUTPUTS}/reliablesyncs
+ mkdir -p ${CRD_OUTPUTS}/apps
for entry in `ls /tmp/crds/*.yaml`; do
CRD_NAME=$(echo ${entry} | cut -d'.' -f3 | cut -d'_' -f2)
if [ "$CRD_NAME" == "devices" ] || [ "$CRD_NAME" == "devicemodels" ]; then
- # remove the last element if it ends with "s",i.e: devicemodels -> devicemodel
- if [ "${CRD_NAME: -1}" == "s" ]; then
- CRD_NAME=${CRD_NAME%?}
- fi
+ CRD_NAME=$(remove_suffix_s "$CRD_NAME")
cp -v ${entry} ${CRD_OUTPUTS}/devices/devices_${DEVICES_VERSION}_${CRD_NAME}.yaml
cp -v ${entry} ${HELM_CRDS_DIR}/devices_${DEVICES_VERSION}_${CRD_NAME}.yaml
+ elif [ "$CRD_NAME" == "edgeapplications" ] || [ "$CRD_NAME" == "nodegroups" ]; then
+ CRD_NAME=$(remove_suffix_s "$CRD_NAME")
+ cp -v ${entry} ${CRD_OUTPUTS}/apps/apps_${APPS_VERSION}_${CRD_NAME}.yaml
+ cp -v ${entry} ${HELM_CRDS_DIR}/apps_${APPS_VERSION}_${CRD_NAME}.yaml
elif [ "$CRD_NAME" == "clusterobjectsyncs" ]; then
cp -v ${entry} ${CRD_OUTPUTS}/reliablesyncs/cluster_objectsync_${RELIABLESYNCS_VERSION}.yaml
cp -v ${entry} ${HELM_CRDS_DIR}/cluster_objectsync_${RELIABLESYNCS_VERSION}.yaml
diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh
index 7d4717050..deda28e7d 100755
--- a/hack/lib/golang.sh
+++ b/hack/lib/golang.sh
@@ -174,6 +174,7 @@ ALL_BINARIES_AND_TARGETS=(
csidriver:cloud/cmd/csidriver
iptablesmanager:cloud/cmd/iptablesmanager
edgemark:edge/cmd/edgemark
+ controllermanager:cloud/cmd/controllermanager
)
kubeedge::golang::get_target_by_binary() {
diff --git a/hack/make-rules/image.sh b/hack/make-rules/image.sh
index f93d5c6f3..275a55dbc 100755
--- a/hack/make-rules/image.sh
+++ b/hack/make-rules/image.sh
@@ -32,6 +32,7 @@ ALL_IMAGES_AND_TARGETS=(
csidriver:csidriver:build/csidriver/Dockerfile
iptablesmanager:iptables-manager:build/iptablesmanager/Dockerfile
edgemark:edgemark:build/edgemark/Dockerfile
+ controllermanager:controller-manager:build/controllermanager/Dockerfile
installation-package:installation-package:build/docker/installation-package/installation-package.dockerfile
)
diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh
index f1aeba73f..9c6c57423 100755
--- a/hack/update-codegen.sh
+++ b/hack/update-codegen.sh
@@ -36,5 +36,5 @@ export GOPATH="${go_path}"
${KUBEEDGE_ROOT}/hack/generate-groups.sh "deepcopy,client,informer,lister" \
github.com/kubeedge/kubeedge/pkg/client github.com/kubeedge/kubeedge/pkg/apis \
-"devices:v1alpha2 reliablesyncs:v1alpha1 rules:v1" \
+"devices:v1alpha2 reliablesyncs:v1alpha1 rules:v1 apps:v1alpha1" \
--go-header-file ${KUBEEDGE_ROOT}/hack/boilerplate/boilerplate.txt