Skip to content

Commit

Permalink
Merge pull request mosip#14 from bhumi46/develop
Browse files Browse the repository at this point in the history
[DSD-4641] updated helm
  • Loading branch information
challabeehyv authored Mar 1, 2024
2 parents dc42817 + 290ec30 commit 668f38a
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 45 deletions.
2 changes: 1 addition & 1 deletion helm/inji-web/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# oidc-ui
# injiweb ui

## Overview
Refer [Commons](https://docs.mosip.io/1.2.0/modules/commons).
Expand Down
11 changes: 6 additions & 5 deletions helm/inji-web/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@ 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 /home/bhuminathan/injiwebfinal/inji-web/helm/inji-web \
helm -n $NS install inji-web mosip/inji-web \
-f values.yaml \
--set istio.hosts\[0\]=$ESIGNET_HOST \
--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
Expand Down
33 changes: 26 additions & 7 deletions helm/inji-web/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
---
apiVersion: rbac.authorization.k8s.io/v1
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
kind: ClusterRole
metadata:
name: {{ template "inji-web.serviceAccountName" . }}-pods-role
namespace: {{ .Release.Namespace }}
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get","patch","list","watch"]
- apiGroups:
- "*"
resources:
- endpoints
- pods
- services
- configmaps
- secrets
- virtualservices
- gateways
verbs:
- get
- list
- create
- update
- patch
2 changes: 1 addition & 1 deletion helm/inji-web/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ template "inji-web.serviceAccountName" . }}-pods-role
name: {{ template "common.names.fullname" . }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
Expand Down
24 changes: 3 additions & 21 deletions helm/inji-web/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,12 @@ data:
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
location /authorize {
return 301 https://{{ .Values.esignet_redirect_url }}$request_uri;
}
location / {
try_files $uri $uri/ /index.html;
}
}
}
{{- if .Values.inji_web.configmaps }}
{{- range $cm_name, $cm_value := .Values.inji_web.configmaps }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $cm_name }}
namespace: {{ $.Release.Namespace }}
labels: {{- include "common.labels.standard" $ | nindent 8 }}
{{- if $.Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 8 }}
{{- end }}
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 8 }}
{{- end }}
data:
{{- range $key, $value := $cm_value }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
13 changes: 3 additions & 10 deletions helm/inji-web/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ service:

image:
registry: docker.io
repository: bn46/inji-web
repository: mosipdev/inji-web
tag: develop

## Specify a imagePullPolicy
Expand Down Expand Up @@ -250,7 +250,6 @@ extraEnvVarsCM:
- artifactory-share
- softhsm-esignet-share
- oidc-ui
- inji-web

## Secret with extra environment variables
##
Expand Down Expand Up @@ -420,14 +419,8 @@ metrics:
## Slash is important!
inji_web:
inji_web_port: '3004'
inji_web_service_host: 'https://api-internal.sandbox.xxx.net'
configmaps:
inji-web:
REACT_APP_ESIGNET_UI_URL: 'https://api-internal.sandbox.xxx.net/v1/esignet'
REACT_APP_ESIGNET_REDIRECT_URL: ''
REACT_APP_MIMOTO_URL: 'https://api.sandbox.xxx.net/v1/mimoto'


inji_web_service_host: 'mimoto.mimoto'
esignet_redirect_url: 'esignet.sandbox.xyz.net'
## injiweb UI swagger should have only internal access. Hence linked to internal gateway
## We create a gateway for esignet specific URL(s) listed under `hosts`
istio:
Expand Down

0 comments on commit 668f38a

Please sign in to comment.