Skip to content

Commit

Permalink
Merge pull request #1214 from pramod444/1.2.0.1-DSD-1950
Browse files Browse the repository at this point in the history
[DSD-1950] updated captcha/install.sh script to create new resident-c…
  • Loading branch information
ckm007 authored Jan 6, 2023
2 parents 339f6a2 + 3a69f10 commit 32d24df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions deployment/v3/mosip/captcha/install.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/bin/sh
# Creates configmap and secrets for Prereg Captcha
# Creates configmap and secrets for resident Captcha
## Usage: ./install.sh [kubeconfig]

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

NS=prereg
NS=captcha
PREREG_HOST=$(kubectl get cm global -o jsonpath={.data.mosip-prereg-host})
RESIDENT_HOST=$(kubectl get cm global -o jsonpath={.data.mosip-resident-host})

echo Create $NS namespace
kubectl create ns $NS
Expand All @@ -16,6 +18,10 @@ echo Please enter the recaptcha admin site key for domain $PREREG_HOST
read SITE_KEY
echo Please enter the recaptcha admin secret key for domain $PREREG_HOST
read SECRET_KEY
echo Please enter the recaptcha admin site key for domain $RESIDENT_HOST
read RSITE_KEY
echo Please enter the recaptcha admin secret key for domain $RESIDENT_HOST
read RSECRET_KEY

echo Setting up captcha secrets
kubectl -n $NS create secret generic prereg-captcha --from-literal=prereg-captcha-site-key=$SITE_KEY --from-literal=prereg-captcha-secret-key=$SECRET_KEY --dry-run=client -o yaml | kubectl apply -f -
kubectl -n $NS create secret generic mosip-captcha --from-literal=prereg-captcha-site-key=$SITE_KEY --from-literal=prereg-captcha-secret-key=$SECRET_KEY --from-literal=resident-captcha-site-key=$RSITE_KEY --from-literal=resident-captcha-secret-key=$RSECRET_KEY --dry-run=client -o yaml | kubectl apply -f -
2 changes: 1 addition & 1 deletion deployment/v3/mosip/config-server/copy_secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ $COPY_UTIL secret softhsm-kernel softhsm $DST_NS
$COPY_UTIL secret softhsm-ida softhsm $DST_NS
$COPY_UTIL secret s3 s3 $DST_NS
$COPY_UTIL secret email-gateway msg-gateways $DST_NS
$COPY_UTIL secret prereg-captcha prereg $DST_NS
$COPY_UTIL secret mosip-captcha captcha $DST_NS
$COPY_UTIL secret conf-secrets-various conf-secrets $DST_NS

0 comments on commit 32d24df

Please sign in to comment.