diff --git a/helm/values.yaml b/helm/values.yaml index a14ea95..dbcfb4e 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -22,7 +22,7 @@ images: services: owfms: - type: LoadBalancer + type: ClusterIP ports: restapi: servicePort: 16004 diff --git a/readiness_check b/readiness_check index 368087d..cb0a8c4 100755 --- a/readiness_check +++ b/readiness_check @@ -13,29 +13,29 @@ then exit 1 fi -if [[ "${OWSEC}" == "" ]] -then - echo "You must set the variable OWSEC in order to use this script. Something like" - echo "OWSEC=security.isp.com:16001" - exit 1 -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" ]] then + if [[ "${OWSEC}" == "" ]] + then + echo "You must set the variable OWSEC in order to use this script. Something like" + echo "OWSEC=security.isp.com:16001" + exit 1 + 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 + # Get OAuth token from OWSEC and cache it or use cached one payload="{ \"userId\" : \"$OWSEC_USERNAME\" , \"password\" : \"$OWSEC_PASSWORD\" }" if [[ -f "/tmp/token" ]]