From ecb3e0a1256dbe0bf58312d1083a61cb60b6ddef Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 19 May 2021 02:14:13 +0530 Subject: [PATCH] fix(deploy): nginx custom changes are overriden in install Signed-off-by: Rajesh Rajendran --- scripts/helm/kube-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/helm/kube-install.sh b/scripts/helm/kube-install.sh index f67b885b4..480adb658 100755 --- a/scripts/helm/kube-install.sh +++ b/scripts/helm/kube-install.sh @@ -122,11 +122,10 @@ type() { function app(){ case $1 in nginx) - git checkout -- nginx-ingress/nginx-ingress/templates/configmap.yaml + # Resetting the redirection rule + sed -i "s/.* return 301 .*/# return 301 https:\/\/$host$request_uri/g" nginx-ingress/nginx-ingress/templates/configmap.yaml [[ NGINX_REDIRECT_HTTPS -eq 1 ]] && { sed -i "s/# return 301/return 301/g" nginx-ingress/nginx-ingress/templates/configmap.yaml - # Toggles first occurrence of location list include. - sed -i "0,/include \/etc\/nginx\/conf.d\/location.list/s//# include \/etc\/nginx\/conf.d\/location.list/" nginx-ingress\/nginx-ingress\/templates\/configmap.yaml } ansible-playbook -c local setup.yaml -e @vars.yaml -e scale=$installation_type --tags nginx -v exit 0