File tree Expand file tree Collapse file tree
installer/chart/volcano/plugins/gen-admission-secret Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,14 +64,20 @@ function install-volcano {
6464
6565 echo " Install volcano plugin into cluster...."
6666 helm plugin install --kubeconfig ${KUBECONFIG} installer/chart/volcano/plugins/gen-admission-secret
67- helm gen-admission-secret --service integration-admission-service --namespace kube-system
67+
68+ # If failed to generate secret for admission service, return immediately
69+ helm gen-admission-secret --service ${CLUSTER_NAME} -admission-service --namespace kube-system
70+ if [[ $? != 0 ]]; then
71+ echo " Failed to install secret for admission service, usually we need a retry."
72+ exit 1
73+ fi
6874
6975 echo " Install volcano chart"
70- helm install installer/chart/volcano --namespace kube-system --name integration --kubeconfig ${KUBECONFIG} --set basic.image_tag_version=${TAG}
76+ helm install installer/chart/volcano --namespace kube-system --name ${CLUSTER_NAME} --kubeconfig ${KUBECONFIG} --set basic.image_tag_version=${TAG} --wait
7177}
7278
7379function uninstall-volcano {
74- helm delete integration --purge --kubeconfig ${KUBECONFIG}
80+ helm delete ${CLUSTER_NAME} --purge --kubeconfig ${KUBECONFIG}
7581}
7682
7783function generate-log {
Original file line number Diff line number Diff line change @@ -108,15 +108,15 @@ done
108108# approve and fetch the signed certificate
109109kubectl certificate approve ${csrName}
110110# verify certificate has been signed
111- for x in $( seq 15 ) ; do
111+ for x in $( seq 20 ) ; do
112112 serverCert=$( kubectl get csr ${csrName} -o jsonpath=' {.status.certificate}' )
113113 if [[ ${serverCert} != ' ' ]]; then
114114 break
115115 fi
116116 sleep 1
117117done
118118if [[ ${serverCert} == ' ' ]]; then
119- echo " ERROR: After approving csr ${csrName} , the signed certificate did not appear on the resource. Giving up after 15 attempts." >&2
119+ echo " ERROR: After approving csr ${csrName} , the signed certificate did not appear on the resource. Giving up after 20 attempts." >&2
120120 exit 1
121121fi
122122echo ${serverCert} | openssl base64 -d -A -out ${tmpdir} /server-cert.pem
You can’t perform that action at this time.
0 commit comments