summaryrefslogtreecommitdiff
path: root/hack/generate-crds.sh
diff options
context:
space:
mode:
authorgy95 <guoyao17@huawei.com>2022-04-22 17:00:37 +0800
committergy95 <guoyao17@huawei.com>2022-09-22 14:44:06 +0800
commitd887c7c416f3f38ec4b69241229289fe62ba1bbf (patch)
treee61fa01a5144b524861a99ed5d3dae500541e221 /hack/generate-crds.sh
parentMerge pull request #4125 from wackxu/fixdeletetermin (diff)
downloadkubeedge-d887c7c416f3f38ec4b69241229289fe62ba1bbf.tar.gz
support operations: upgrade edge node from cloud
Signed-off-by: gy95 <guoyao17@huawei.com>
Diffstat (limited to 'hack/generate-crds.sh')
-rwxr-xr-xhack/generate-crds.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/hack/generate-crds.sh b/hack/generate-crds.sh
index 8eba11a75..ce851073c 100755
--- a/hack/generate-crds.sh
+++ b/hack/generate-crds.sh
@@ -21,6 +21,7 @@ set -o pipefail
CRD_VERSIONS=v1
CRD_OUTPUTS=build/crds
DEVICES_VERSION=v1alpha2
+OPERATIONS_VERSION=v1alpha1
RELIABLESYNCS_VERSION=v1alpha1
APPS_VERSION=v1alpha1
HELM_CRDS_DIR=manifests/charts/cloudcore/crds
@@ -41,6 +42,9 @@ while [ $# -gt 0 ]; do
--DEVICES_VERSION=*)
DEVICES_VERSION="${1#*=}"
;;
+ --OPERATIONS_VERSION=*)
+ OPERATIONS_VERSION="${1#*=}"
+ ;;
--RELIABLESYNCS_VERSION=*)
RELIABLESYNCS_VERSION="${1#*=}"
;;
@@ -98,6 +102,10 @@ function :copy:to:destination {
elif [ "$CRD_NAME" == "objectsyncs" ]; then
cp -v ${entry} ${CRD_OUTPUTS}/reliablesyncs/objectsync_${RELIABLESYNCS_VERSION}.yaml
cp -v ${entry} ${HELM_CRDS_DIR}/objectsync_${RELIABLESYNCS_VERSION}.yaml
+ elif [ "$CRD_NAME" == "nodeupgradejobs" ]; then
+ CRD_NAME=$(remove_suffix_s "$CRD_NAME")
+ cp -v ${entry} ${CRD_OUTPUTS}/operations/operations_${OPERATIONS_VERSION}_${CRD_NAME}.yaml
+ cp -v ${entry} ${HELM_CRDS_DIR}/operations_${OPERATIONS_VERSION}_${CRD_NAME}.yaml
else
# other cases would not handle
continue
@@ -121,4 +129,4 @@ function cleanup {
:copy:to:destination
-cleanup \ No newline at end of file
+cleanup