Update harbor
This commit is contained in:
parent
1161296fcb
commit
c25b5ee06d
5 changed files with 210 additions and 30 deletions
|
|
@ -8,13 +8,11 @@ source $DIR/common.sh
|
|||
set +o noglob
|
||||
|
||||
usage=$'Please set hostname and other necessary attributes in harbor.yml first. DO NOT use localhost or 127.0.0.1 for hostname, because Harbor needs to be accessed by external clients.
|
||||
Please set --with-notary if needs enable Notary in Harbor, and set ui_url_protocol/ssl_cert/ssl_cert_key in harbor.yml bacause notary must run under https.
|
||||
Please set --with-trivy if needs enable Trivy in Harbor.
|
||||
Please do NOT set --with-chartmuseum, as chartmusuem has been deprecated and removed.'
|
||||
Please do NOT set --with-chartmuseum, as chartmusuem has been deprecated and removed.
|
||||
Please do NOT set --with-notary, as notary has been deprecated and removed.'
|
||||
item=0
|
||||
|
||||
# notary is not enabled by default
|
||||
with_notary=$false
|
||||
# clair is deprecated
|
||||
with_clair=$false
|
||||
# trivy is not enabled by default
|
||||
|
|
@ -28,10 +26,6 @@ while [ $# -gt 0 ]; do
|
|||
--help)
|
||||
note "$usage"
|
||||
exit 0;;
|
||||
--with-notary)
|
||||
with_notary=true;;
|
||||
--with-clair)
|
||||
with_clair=true;;
|
||||
--with-trivy)
|
||||
with_trivy=true;;
|
||||
*)
|
||||
|
|
@ -41,12 +35,6 @@ while [ $# -gt 0 ]; do
|
|||
shift || true
|
||||
done
|
||||
|
||||
if [ $with_clair ]
|
||||
then
|
||||
error "Clair is deprecated please remove it from installation arguments !!!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
workdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd $workdir
|
||||
|
||||
|
|
@ -71,10 +59,6 @@ fi
|
|||
|
||||
h2 "[Step $item]: preparing harbor configs ..."; let item+=1
|
||||
prepare_para=
|
||||
if [ $with_notary ]
|
||||
then
|
||||
prepare_para="${prepare_para} --with-notary"
|
||||
fi
|
||||
if [ $with_trivy ]
|
||||
then
|
||||
prepare_para="${prepare_para} --with-trivy"
|
||||
|
|
@ -91,14 +75,6 @@ fi
|
|||
echo ""
|
||||
|
||||
h2 "[Step $item]: starting Harbor ..."
|
||||
if [ $with_notary ]
|
||||
then
|
||||
warn "
|
||||
Notary will be deprecated as of Harbor v2.6.0 and start to be removed in v2.8.0 or later.
|
||||
You can use cosign for signature instead since Harbor v2.5.0.
|
||||
Please see discussion here for more details. https://github.com/goharbor/harbor/discussions/16612"
|
||||
fi
|
||||
|
||||
$DOCKER_COMPOSE up -d
|
||||
|
||||
success $"----Harbor has been installed and started successfully.----"
|
||||
|
|
|
|||
Reference in a new issue