From f54e36b9e30be5dc97dea99b883e24f4f07b1cc4 Mon Sep 17 00:00:00 2001 From: techno-467 Date: Tue, 18 Jun 2024 16:21:44 +0530 Subject: [PATCH 1/3] [DSD-5495] added softhsm deployment script in inji-certify Signed-off-by: techno-467 --- helm/inji-certify/copy_cm.sh | 1 + helm/inji-certify/install.sh | 21 ++++++++++++++++++++- helm/inji-certify/softhsm-values.yaml | 7 +++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 helm/inji-certify/softhsm-values.yaml diff --git a/helm/inji-certify/copy_cm.sh b/helm/inji-certify/copy_cm.sh index 0fe9a310..3b77f80f 100755 --- a/helm/inji-certify/copy_cm.sh +++ b/helm/inji-certify/copy_cm.sh @@ -9,6 +9,7 @@ function copying_cm() { $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-certify-share softhsm $DST_NS return 0 } diff --git a/helm/inji-certify/install.sh b/helm/inji-certify/install.sh index a1fe7d26..2723275f 100755 --- a/helm/inji-certify/install.sh +++ b/helm/inji-certify/install.sh @@ -6,6 +6,12 @@ if [ $# -ge 1 ] ; then export KUBECONFIG=$1 fi +SOFTHSM_NS=softhsm +SOFTHSM_CHART_VERSION=12.0.1 + +echo Create $SOFTHSM_NS namespace +kubectl create ns $SOFTHSM_NS + NS=inji-certify CHART_VERSION=0.0.1-develop @@ -13,11 +19,24 @@ echo Create $NS namespace kubectl create ns $NS function installing_inji-certify() { + echo Istio label - kubectl label ns $NS istio-injection=enabled --overwrite + kubectl label ns $SOFTHSM_NS istio-injection=enabled --overwrite + helm repo add mosip https://mosip.github.io/mosip-helm helm repo update + echo Installing Softhsm for certify + helm -n $SOFTHSM_NS install softhsm-certify mosip/softhsm -f softhsm-values.yaml --version $SOFTHSM_CHART_VERSION --wait + echo Installed Softhsm for certify + + echo Copy configmaps + ./copy_cm_func.sh configmap global default config-server + + echo Copy secrets + ./copy_cm_func.sh secret softhsm-certify softhsm config-server + kubectl -n config-server set env --keys=mosip-injicertify-host --from configmap/global deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_ + kubectl -n config-server set env --keys=security-pin --from secret/softhsm-certify deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SOFTHSM_ESIGNET_ kubectl -n config-server get deploy -o name | xargs -n1 -t kubectl -n config-server rollout status echo Copy configmaps diff --git a/helm/inji-certify/softhsm-values.yaml b/helm/inji-certify/softhsm-values.yaml new file mode 100644 index 00000000..581bbd13 --- /dev/null +++ b/helm/inji-certify/softhsm-values.yaml @@ -0,0 +1,7 @@ +resources: + limits: {} + # cpu: 250m + # memory: 1Gi + requests: + cpu: 100m + memory: 20Mi From 6a6a1d5a1bdd24672a678194bdc7d0bdb160059c Mon Sep 17 00:00:00 2001 From: Praful Rakhade <99539100+Prafulrakhade@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:29:16 +0530 Subject: [PATCH 2/3] Update install.sh Signed-off-by: Praful Rakhade <99539100+Prafulrakhade@users.noreply.github.com> --- helm/inji-certify/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/inji-certify/install.sh b/helm/inji-certify/install.sh index 2723275f..562a09c8 100755 --- a/helm/inji-certify/install.sh +++ b/helm/inji-certify/install.sh @@ -36,7 +36,7 @@ function installing_inji-certify() { ./copy_cm_func.sh secret softhsm-certify softhsm config-server kubectl -n config-server set env --keys=mosip-injicertify-host --from configmap/global deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_ - kubectl -n config-server set env --keys=security-pin --from secret/softhsm-certify deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SOFTHSM_ESIGNET_ + kubectl -n config-server set env --keys=security-pin --from secret/softhsm-certify deployment/config-server --prefix=SPRING_CLOUD_CONFIG_SERVER_OVERRIDES_SOFTHSM_CERTIFY_ kubectl -n config-server get deploy -o name | xargs -n1 -t kubectl -n config-server rollout status echo Copy configmaps From 32475df57f3c21448bb57d53d096718541653220 Mon Sep 17 00:00:00 2001 From: Praful Rakhade <99539100+Prafulrakhade@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:39:19 +0530 Subject: [PATCH 3/3] Update install.sh Signed-off-by: Praful Rakhade <99539100+Prafulrakhade@users.noreply.github.com> --- helm/inji-certify/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/inji-certify/install.sh b/helm/inji-certify/install.sh index 562a09c8..b170a720 100755 --- a/helm/inji-certify/install.sh +++ b/helm/inji-certify/install.sh @@ -7,7 +7,7 @@ if [ $# -ge 1 ] ; then fi SOFTHSM_NS=softhsm -SOFTHSM_CHART_VERSION=12.0.1 +SOFTHSM_CHART_VERSION=0.0.1-develop echo Create $SOFTHSM_NS namespace kubectl create ns $SOFTHSM_NS