File tree Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 5858wget -d " ${headers[@]} " https://kubecube:7443/api/v1/cube/user/kubeconfigs -O $DIR /tmp/$TMP_CONFIG_NAME -base64 --no-check-certificate & > /dev/null
5959# check whether kubeconfig download success
6060if [ $? -ne 0 ]; then
61+ wget -d " ${headers[@]} " http://kubecube:7443/api/v1/cube/user/kubeconfigs -O $DIR /tmp/$TMP_CONFIG_NAME -base64 --no-check-certificate & > /dev/null
62+ if [ $? -ne 0 ]; then
6163 exit 1
64+ fi
6265fi
6366
6467CONFIG_BASE64=$( cat $DIR /tmp/$TMP_CONFIG_NAME -base64)
Original file line number Diff line number Diff line change 5858wget -d " ${headers[@]} " https://kubecube:7443/api/v1/cube/user/kubeconfigs -O $DIR /tmp/$TMP_CONFIG_NAME -base64 --no-check-certificate & > /dev/null
5959# check whether kubeconfig download success
6060if [ $? -ne 0 ]; then
61+ wget -d " ${headers[@]} " http://kubecube:7443/api/v1/cube/user/kubeconfigs -O $DIR /tmp/$TMP_CONFIG_NAME -base64 --no-check-certificate & > /dev/null
62+ if [ $? -ne 0 ]; then
6163 exit 1
64+ fi
6265fi
6366
6467CONFIG_BASE64=$( cat $DIR /tmp/$TMP_CONFIG_NAME -base64)
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ func isAuthValid(request *restful.Request) bool {
9696 Transport : & http.Transport {TLSClientConfig : & tls.Config {InsecureSkipVerify : true }},
9797 Timeout : 5 * time .Second ,
9898 }
99- resp , err := c .Post ("https://" + utils .GetKubeCubeSvc ()+ "/api/v1/cube/authorization/access" ,
99+ resp , err := c .Post (utils .GetKubeCubeSvc ()+ "/api/v1/cube/authorization/access" ,
100100 "application/json" , strings .NewReader (string (bytesData )))
101101 if err != nil {
102102 clog .Error (err .Error ())
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ func GetKubeCubeSvc() string {
2323 if svc != "" {
2424 return svc
2525 }
26- return "kubecube-nodeport:7443"
26+ return "https:// kubecube-nodeport:7443"
2727}
2828
2929func getJwtSecret () string {
You can’t perform that action at this time.
0 commit comments