From 5b79f0646fe7ad4af5cf1c2f09fa93ee722cea7e Mon Sep 17 00:00:00 2001 From: abhishek8shankar Date: Thu, 25 Apr 2024 17:07:28 +0530 Subject: [PATCH 1/4] [DSD-5029] Updated scripts for release-0.8.0 Signed-off-by: abhishek8shankar --- helm/inji-web/Chart.yaml | 4 ++-- helm/inji-web/copy_cm.sh | 4 ++-- helm/inji-web/delete.sh | 8 +++---- helm/inji-web/install.sh | 44 ++++++++++++++++++++++++++++++++------- helm/inji-web/restart.sh | 2 +- helm/inji-web/values.yaml | 6 +++--- 6 files changed, 48 insertions(+), 20 deletions(-) diff --git a/helm/inji-web/Chart.yaml b/helm/inji-web/Chart.yaml index 0af13eac..f5c3f32f 100644 --- a/helm/inji-web/Chart.yaml +++ b/helm/inji-web/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -name: inji-web +name: injiweb description: A Helm chart for MOSIP injiweb UI module type: application -version: 1.0.0 +version: 0.0.1 appVersion: "" dependencies: - name: common diff --git a/helm/inji-web/copy_cm.sh b/helm/inji-web/copy_cm.sh index 462711fa..58ac7ea5 100755 --- a/helm/inji-web/copy_cm.sh +++ b/helm/inji-web/copy_cm.sh @@ -4,12 +4,12 @@ function copying_cm() { COPY_UTIL=./copy_cm_func.sh - DST_NS=esignet + DST_NS=inijiweb $COPY_UTIL configmap global default $DST_NS $COPY_UTIL configmap artifactory-share artifactory $DST_NS $COPY_UTIL configmap config-server-share config-server $DST_NS - $COPY_UTIL configmap softhsm-esignet-share softhsm $DST_NS + # $COPY_UTIL configmap softhsm-esignet-share softhsm $DST_NS return 0 } diff --git a/helm/inji-web/delete.sh b/helm/inji-web/delete.sh index 91a9184a..31893849 100755 --- a/helm/inji-web/delete.sh +++ b/helm/inji-web/delete.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Uninstalls injiweb-ui helm charts +# Uninstalls injiweb helm charts ## Usage: ./delete.sh [kubeconfig] if [ $# -ge 1 ] ; then @@ -7,12 +7,12 @@ if [ $# -ge 1 ] ; then fi function Deleting_injiweb-ui() { - NS=esignet + NS=injiweb while true; do - read -p "Are you sure you want to delete all esignet helm charts?(Y/n) " yn + read -p "Are you sure you want to delete all injiweb helm charts?(Y/n) " yn if [ $yn = "Y" ] then - helm -n $NS delete injiweb-ui + helm -n $NS delete injiweb break else break diff --git a/helm/inji-web/install.sh b/helm/inji-web/install.sh index 8c745cf5..e5c6b02f 100755 --- a/helm/inji-web/install.sh +++ b/helm/inji-web/install.sh @@ -6,8 +6,38 @@ if [ $# -ge 1 ] ; then export KUBECONFIG=$1 fi -NS=esignet -CHART_VERSION=1.0.0 +NS=injiweb +CHART_VERSION=0.0.1 + +DEFAULT_MOSIP_INJIWEB_HOST=$( kubectl get cm global -n config-server -o jsonpath={.data.mosip-injiweb-host} ) +# Check if MOSIP_INJIWEB_HOST is present under configmap/global of configserver +if echo "$DEFAULT_MOSIP_INJIWEB_HOST" | grep -q "MOSIP_INJIWEB_HOST"; then + echo "MOSIP_INJIWEB_HOST is already present in configmap/global of configserver" + MOSIP_INJIWEB_HOST=DEFAULT_MOSIP_INJIWEB_HOST +else + read -p "Please provide injiwebhost (eg: injiweb.sandbox.xyz.net ) : " MOSIP_INJIWEB_HOST + + if [ -z "MOSIP_INJIWEB_HOST" ]; then + echo "INJIWEB Host not provided; EXITING;" + exit 0; + fi +fi + +CHK_MOSIP_INJIWEB_HOST=$( nslookup "$MOSIP_INJIWEB_HOST" ) +if [ $? -gt 0 ]; then + echo "Injiweb Host does not exists; EXITING;" + exit 0; +fi + +echo "MOSIP_INJIWEB_HOST is not present in configmap/global of configserver" + # Add injiweb host to global + kubectl patch configmap global -n config-server --type merge -p "{\"data\": {\"mosip-injiweb-host\": \"$MOSIP_INIEB_HOST\"}}" + # Add the host + kubectl set env deployment/config-server SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_MOSIP_ESIGNET_INJIWEB_HOST=$MOSIP_INJIWEB_HOST -n config-server + # Restart the configserver deployment + kubectl -n config-server get deploy -o name | xargs -n1 -t kubectl -n config-server rollout restart + +sleep 400s echo Create $NS namespace kubectl create ns $NS @@ -20,18 +50,16 @@ function installing_inji-web() { helm repo update echo Copy configmaps - # ./copy_cm.sh + ./copy_cm.sh - ESIGNET_HOST=$(kubectl get cm global -o jsonpath={.data.mosip-esignet-host}) INJI_HOST=$(kubectl get cm global -o jsonpath={.data.mosip-injiweb-host}) echo Installing INJIWEB - helm -n $NS install inji-web mosip/inji-web \ + helm -n $NS install injiweb mosip/inji-web \ -f values.yaml \ - --set esignet_redirect_url=$ESIGNET_HOST \ --set istio.hosts\[0\]=$INJI_HOST \ --version $CHART_VERSION -# kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status + kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status echo Installed inji-web return 0 @@ -43,4 +71,4 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true set -o nounset ## set -u : exit the script if you try to use an uninitialised variable set -o errtrace # trace ERR through 'time command' and other functions set -o pipefail # trace ERR through pipes -installing_inji-web # calling function +installing_inji-web # calling function \ No newline at end of file diff --git a/helm/inji-web/restart.sh b/helm/inji-web/restart.sh index 706a2a4c..f4c357ff 100755 --- a/helm/inji-web/restart.sh +++ b/helm/inji-web/restart.sh @@ -7,7 +7,7 @@ if [ $# -ge 1 ] ; then fi function Restarting_oidc-ui() { - NS=esignet + NS=injiweb kubectl -n $NS rollout restart deploy oidc-ui kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status diff --git a/helm/inji-web/values.yaml b/helm/inji-web/values.yaml index 042d2308..b7fd0a61 100755 --- a/helm/inji-web/values.yaml +++ b/helm/inji-web/values.yaml @@ -248,8 +248,8 @@ extraEnvVarsCM: - global - config-server-share - artifactory-share - - softhsm-esignet-share - - oidc-ui + # - softhsm-esignet-share + ## Secret with extra environment variables ## @@ -433,5 +433,5 @@ istio: portName: http port: 80 hosts: - - inji.sandbox.xyz.net + - injiweb.sandbox.xyz.net prefix: / From 80d0fb54942e745da2dae6bbadde77ea630dc1a8 Mon Sep 17 00:00:00 2001 From: shubham_G <88794020+shubham17998@users.noreply.github.com> Date: Thu, 25 Apr 2024 19:11:06 +0530 Subject: [PATCH 2/4] [DSD-5111] release inji-web v0.8.0 changes (#39) * [DSD-5111] Update Chart.yaml Signed-off-by: shubham_G <88794020+shubham17998@users.noreply.github.com> * Update install.sh Signed-off-by: shubham_G <88794020+shubham17998@users.noreply.github.com> * Update values.yaml Signed-off-by: shubham_G <88794020+shubham17998@users.noreply.github.com> --------- Signed-off-by: shubham_G <88794020+shubham17998@users.noreply.github.com> --- helm/inji-web/Chart.yaml | 2 +- helm/inji-web/install.sh | 4 ++-- helm/inji-web/values.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helm/inji-web/Chart.yaml b/helm/inji-web/Chart.yaml index f5c3f32f..5aefbc44 100644 --- a/helm/inji-web/Chart.yaml +++ b/helm/inji-web/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: injiweb description: A Helm chart for MOSIP injiweb UI module type: application -version: 0.0.1 +version: 0.8.0 appVersion: "" dependencies: - name: common diff --git a/helm/inji-web/install.sh b/helm/inji-web/install.sh index e5c6b02f..694e03a2 100755 --- a/helm/inji-web/install.sh +++ b/helm/inji-web/install.sh @@ -7,7 +7,7 @@ if [ $# -ge 1 ] ; then fi NS=injiweb -CHART_VERSION=0.0.1 +CHART_VERSION=0.8.0 DEFAULT_MOSIP_INJIWEB_HOST=$( kubectl get cm global -n config-server -o jsonpath={.data.mosip-injiweb-host} ) # Check if MOSIP_INJIWEB_HOST is present under configmap/global of configserver @@ -71,4 +71,4 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true set -o nounset ## set -u : exit the script if you try to use an uninitialised variable set -o errtrace # trace ERR through 'time command' and other functions set -o pipefail # trace ERR through pipes -installing_inji-web # calling function \ No newline at end of file +installing_inji-web # calling function diff --git a/helm/inji-web/values.yaml b/helm/inji-web/values.yaml index b7fd0a61..dcf949c1 100755 --- a/helm/inji-web/values.yaml +++ b/helm/inji-web/values.yaml @@ -51,8 +51,8 @@ service: image: registry: docker.io - repository: mosipdev/inji-web - tag: develop + repository: mosipid/inji-web + tag: 0.8.0 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' From a056138bd1c5b097b80ae113d48d3eb8bc4cc494 Mon Sep 17 00:00:00 2001 From: ckm007 Date: Thu, 25 Apr 2024 13:54:18 +0000 Subject: [PATCH 3/4] [DSD-5111] v0.8.0 inji-web release changes to master branch --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 29600109..fb00b37d 100644 --- a/README.md +++ b/README.md @@ -52,4 +52,3 @@ $ docker run -it -d -p 3000:3000 : ``` - Open URL http://localhost:3000 - From fd695035646579b7751e31bed6e64d0e494f5853 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 13:55:15 +0000 Subject: [PATCH 4/4] Bump follow-redirects from 1.15.5 to 1.15.6 in /inji-web Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- inji-web/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inji-web/package-lock.json b/inji-web/package-lock.json index c96aca3f..c7490641 100644 --- a/inji-web/package-lock.json +++ b/inji-web/package-lock.json @@ -10252,9 +10252,9 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -30844,9 +30844,9 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" }, "follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==" + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "for-each": { "version": "0.3.3",