Files
open-cluster-management/hack/copy-crds.sh
T
2024-07-10 15:24:10 +00:00

26 lines
711 B
Bash
Executable File

#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/init.sh"
BASE_DIR=$(dirname $(readlink -f $0))
for f in $HUB_CRD_FILES
do
if [ -f "$BASE_DIR/$(basename $f).yaml-patch" ];
then
$1 -o $BASE_DIR/$(basename $f).yaml-patch < $f > ./manifests/cluster-manager/hub/$(basename $f)
else
cp $f ./manifests/cluster-manager/hub/
fi
done
for f in $SPOKE_CRD_FILES
do
cp $f ./manifests/klusterlet/managed/
done
cp $CLUSTER_MANAGER_CRD_FILE ./deploy/cluster-manager/config/crds/
cp $CLUSTER_MANAGER_CRD_FILE ./deploy/cluster-manager/chart/cluster-manager/crds/
cp $KLUSTERLET_CRD_FILE ./deploy/klusterlet/config/crds/
cp $KLUSTERLET_CRD_FILE ./deploy/klusterlet/chart/klusterlet/crds/