Skip to content

Commit

Permalink
[DSD-6382] resolved conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Chandra Keshav Mishra <[email protected]>
  • Loading branch information
ckm007 committed Oct 15, 2024
2 parents fa7f71d + aa0a8cc commit b99d878
Show file tree
Hide file tree
Showing 6 changed files with 455 additions and 52 deletions.
37 changes: 17 additions & 20 deletions deploy/delete-mock.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
#!/bin/bash
# Uninstalls all esignet mock service helm charts
## Usage: ./delete-mock.sh [kubeconfig]
# Uninstalls esignet mock services.
## Usage: ./delete.sh [kubeconfig]

if [ $# -ge 1 ] ; then
export KUBECONFIG=$1
fi

ROOT_DIR=`pwd`

function deleting_mock() {

declare -a module=("mock-identity-system"
"mock-relying-party-service"
"mock-relying-party-ui"
)

echo Installing esignet mock services

for i in "${module[@]}"
do
cd $ROOT_DIR/"$i"
./delete.sh
Deleting_All() {
MOCK_NS=mockid
NS=esignet
while true; do
read -p "Are you sure you want to delete esignet mock service helm charts?(Y/n) " yn
if [[ $yn = "Y" ]] || [[ $yn = "y" ]];
then
helm -n $NS delete mock-relying-party-service || true
helm -n $NS delete mock-relying-party-ui || true
helm -n $MOCK_NS delete mock-identity-system || true
break
else
break
fi
done

echo All esignet mock services deleted sucessfully.
return 0
}

Expand All @@ -33,4 +30,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
deleting_mock # calling function
Deleting_All # calling function
10 changes: 5 additions & 5 deletions deploy/mock-identity-system/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ if [ $# -ge 1 ] ; then
export KUBECONFIG=$1
fi

NS=mockid
CHART_VERSION=0.10.0-develop
function installing_mock-identity-system() {
NS=mockid
CHART_VERSION=0.10.0-develop

echo Create $NS namespace
kubectl create ns $NS
echo Create $NS namespace
kubectl create ns $NS || true

function installing_mock-identity-system() {
echo Istio label
helm repo add mosip https://mosip.github.io/mosip-helm
helm repo update
Expand Down
36 changes: 11 additions & 25 deletions deploy/mock-relying-party-service/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,13 @@ if [ $# -ge 1 ] ; then
export KUBECONFIG=$1
fi

function installing_mock-relying-party-service() {

while true; do
read -p "Do you want to install mock relying party service? (y/n): " response
if [[ "$response" == "y" || "$response" == "Y" ]]; then
break
elif [[ "$response" == "n" || "$response" == "N" ]]; then
exit
else
echo "Not a correct response. Please respond with y (yes) or n (no)."
fi
done

helm repo add mosip https://mosip.github.io/mosip-helm
helm repo update
NS=esignet
CHART_VERSION=0.0.1-develop

NS=esignet
CHART_VERSION=0.10.0-develop

echo Create $NS namespace
kubectl create ns $NS || true
echo Create $NS namespace
kubectl create ns $NS

function installing_mock-relying-party-service() {
echo Istio label
kubectl label ns $NS istio-injection=enabled --overwrite

Expand All @@ -51,11 +36,12 @@ function installing_mock-relying-party-service() {
ESIGNET_SERVICE_URL=${USER_PROVIDED_ESIGNET_SERVICE_URL:-$DEFAULT_ESIGNET_SERVICE_URL}

echo Installing Mock Relying Party Service
helm -n $NS install mock-relying-party-service mosip/mock-relying-party-service \
--set mock_relying_party_service.ESIGNET_SERVICE_URL="$ESIGNET_SERVICE_URL" \
--set mock_relying_party_service.ESIGNET_AUD_URL="https://$ESIGNET_HOST/v1/esignet/oauth/v2/token" \
--version $CHART_VERSION $ENABLE_INSECURE \
-f values.yaml --wait
# helm -n $NS install mock-relying-party-service mosip/mock-relying-party-service \
helm -n $NS install mock-relying-party-service ../../helm/mock-relying-party-service/ \
--set mock_relying_party_service.ESIGNET_SERVICE_URL="$ESIGNET_SERVICE_URL" \
--set mock_relying_party_service.ESIGNET_AUD_URL="https://$ESIGNET_HOST/v1/esignet/oauth/v2/token" \
--version $CHART_VERSION $ENABLE_INSECURE \
-f values.yaml --wait

kubectl -n $NS get deploy mock-relying-party-service -o name | xargs -n1 -t kubectl -n $NS rollout status

Expand Down
2 changes: 1 addition & 1 deletion helm/mock-identity-system/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ service:
image:
registry: docker.io
repository: mosipdev/mock-identity-system
tag: release-0.10.x
tag: develop
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down
Loading

0 comments on commit b99d878

Please sign in to comment.