mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: show update oc cmd
This commit is contained in:
@@ -243,6 +243,50 @@ fi
|
||||
cd $SRC_DIR
|
||||
mkdir -p $SRC_DIR/_output
|
||||
|
||||
show_update_cmd() {
|
||||
local component=$1
|
||||
local arch=$2
|
||||
local spec=$1
|
||||
local name=$1
|
||||
local tag=${TAG}
|
||||
if [[ "$arch" == arm64 || "$component" == host-image ]]; then
|
||||
tag="${tag}-$arch"
|
||||
fi
|
||||
|
||||
case "$component" in
|
||||
'apigateway')
|
||||
spec='apiGateway'
|
||||
;;
|
||||
'apimap')
|
||||
spec='apiMap'
|
||||
;;
|
||||
'baremetal')
|
||||
spec='baremetalagent'
|
||||
name='baremetal-agent'
|
||||
;;
|
||||
'host')
|
||||
spec='hostagent'
|
||||
;;
|
||||
'host-deployer')
|
||||
spec='hostdeployer'
|
||||
;;
|
||||
'region')
|
||||
spec='regionServer'
|
||||
;;
|
||||
'region-dns')
|
||||
spec='regionDNS'
|
||||
;;
|
||||
'vpcagent')
|
||||
spec='vpcAgent'
|
||||
;;
|
||||
'esxi-agent')
|
||||
spec='esxiagent'
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "kubectl patch oc -n onecloud default --type='json' -p='[{op: replace, path: /spec/${spec}/imageName, value: ${name}},{"op": "replace", "path": "/spec/${spec}/repository", "value": "${REGISTRY}"},{"op": "add", "path": "/spec/${spec}/tag", "value": "${tag}"}]'"
|
||||
}
|
||||
|
||||
for component in $COMPONENTS; do
|
||||
if [[ $component == *cli ]]; then
|
||||
echo "Please build image for climc"
|
||||
@@ -261,10 +305,12 @@ for component in $COMPONENTS; do
|
||||
general_build $component $arch "true"
|
||||
done
|
||||
make_manifest_image $component
|
||||
show_update_cmd $component $ARCH
|
||||
;;
|
||||
*)
|
||||
if [ -e "$DOCKER_DIR/Dockerfile.$component" ]; then
|
||||
general_build $component $ARCH "false"
|
||||
show_update_cmd $component $ARCH
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user