mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-10-29 18:02:29 +00:00
[WIFI-6837] Chg: modify readiness to make some envs optional, switch default helm service type to ClusterIP
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
This commit is contained in:
@@ -22,7 +22,7 @@ images:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
owsec:
|
owsec:
|
||||||
type: LoadBalancer
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
restapi:
|
restapi:
|
||||||
servicePort: 16001
|
servicePort: 16001
|
||||||
|
|||||||
@@ -13,22 +13,23 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${OWSEC_USERNAME}" == "" ]]
|
|
||||||
then
|
|
||||||
echo "You must set the variable OWSEC_USERNAME in order to use this script. Something like"
|
|
||||||
echo "OWSEC_USERNAME=tip@ucentral.com"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${OWSEC_PASSWORD}" == "" ]]
|
|
||||||
then
|
|
||||||
echo "You must set the variable OWSEC_PASSWORD in order to use this script. Something like"
|
|
||||||
echo "OWSEC_PASSWORD=openwifi"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${READINESS_METHOD}" == "systeminfo" ]]
|
if [[ "${READINESS_METHOD}" == "systeminfo" ]]
|
||||||
then
|
then
|
||||||
|
if [[ "${OWSEC_USERNAME}" == "" ]]
|
||||||
|
then
|
||||||
|
echo "You must set the variable OWSEC_USERNAME in order to use this script. Something like"
|
||||||
|
echo "OWSEC_USERNAME=tip@ucentral.com"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${OWSEC_PASSWORD}" == "" ]]
|
||||||
|
then
|
||||||
|
echo "You must set the variable OWSEC_PASSWORD in order to use this script. Something like"
|
||||||
|
echo "OWSEC_PASSWORD=openwifi"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
export RESTAPI_PORT=$(grep 'openwifi.restapi.host.0.port' $OWSEC_CONFIG/owsec.properties | awk -F '=' '{print $2}' | xargs | envsubst)
|
export RESTAPI_PORT=$(grep 'openwifi.restapi.host.0.port' $OWSEC_CONFIG/owsec.properties | awk -F '=' '{print $2}' | xargs | envsubst)
|
||||||
# Get OAuth token from OWSEC and cache it or use cached one
|
# Get OAuth token from OWSEC and cache it or use cached one
|
||||||
payload="{ \"userId\" : \"$OWSEC_USERNAME\" , \"password\" : \"$OWSEC_PASSWORD\" }"
|
payload="{ \"userId\" : \"$OWSEC_USERNAME\" , \"password\" : \"$OWSEC_PASSWORD\" }"
|
||||||
|
|||||||
Reference in New Issue
Block a user