Lint shell scripts

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-06-28 17:40:18 -04:00
parent 2586542608
commit e2d276f204
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
9 changed files with 71 additions and 72 deletions

View file

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if ! [ -z $DEBUG ]; then
if [ -n "$DEBUG" ]; then
set -x
fi
@ -35,7 +35,7 @@ export REGISTRY=${REGISTRY:-ingress-controller}
DEV_IMAGE=${REGISTRY}/nginx-ingress-controller:${TAG}
if [ -z "${SKIP_MINIKUBE_START}" ]; then
test $(minikube status | grep Running | wc -l) -ge 2 && $(minikube status | grep -q 'Correctly Configured') || minikube start \
test "$(minikube status | grep -c Running) -ge 2 && $(minikube status | grep -q 'Correctly Configured')" || minikube start \
--extra-config=kubelet.sync-frequency=1s \
--extra-config=apiserver.authorization-mode=RBAC
@ -52,15 +52,15 @@ for tool in kubectl kustomize; do
$tool version || brew install $tool
done
if ! kubectl get namespace $NAMESPACE; then
kubectl create namespace $NAMESPACE
if ! kubectl get namespace "${NAMESPACE}"; then
kubectl create namespace "${NAMESPACE}"
fi
ROOT=./deploy/minikube
pushd $ROOT
kustomize edit set namespace $NAMESPACE
kustomize edit set image quay.io/kubernetes-ingress-controller/nginx-ingress-controller=${DEV_IMAGE}
kustomize edit set namespace "${NAMESPACE}"
kustomize edit set image "quay.io/kubernetes-ingress-controller/nginx-ingress-controller=${DEV_IMAGE}"
popd
echo "[dev-env] deploying NGINX Ingress controller in namespace $NAMESPACE"