diff --git a/helm/inji-web/README.md b/helm/inji-web/README.md index 04bc265..eb754b3 100644 --- a/helm/inji-web/README.md +++ b/helm/inji-web/README.md @@ -1,4 +1,4 @@ -# oidc-ui +# injiweb ui ## Overview Refer [Commons](https://docs.mosip.io/1.2.0/modules/commons). diff --git a/helm/inji-web/install.sh b/helm/inji-web/install.sh index 38ffd06..8c745cf 100755 --- a/helm/inji-web/install.sh +++ b/helm/inji-web/install.sh @@ -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 diff --git a/helm/inji-web/templates/clusterrole.yaml b/helm/inji-web/templates/clusterrole.yaml index 50f771d..36d3057 100644 --- a/helm/inji-web/templates/clusterrole.yaml +++ b/helm/inji-web/templates/clusterrole.yaml @@ -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 diff --git a/helm/inji-web/templates/clusterrolebinding.yaml b/helm/inji-web/templates/clusterrolebinding.yaml index 0690cda..88124f2 100644 --- a/helm/inji-web/templates/clusterrolebinding.yaml +++ b/helm/inji-web/templates/clusterrolebinding.yaml @@ -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 }} diff --git a/helm/inji-web/templates/configmap.yaml b/helm/inji-web/templates/configmap.yaml index 60e7088..d84ac4a 100644 --- a/helm/inji-web/templates/configmap.yaml +++ b/helm/inji-web/templates/configmap.yaml @@ -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 }} \ No newline at end of file diff --git a/helm/inji-web/values.yaml b/helm/inji-web/values.yaml index 488cbcc..042d230 100755 --- a/helm/inji-web/values.yaml +++ b/helm/inji-web/values.yaml @@ -51,7 +51,7 @@ service: image: registry: docker.io - repository: bn46/inji-web + repository: mosipdev/inji-web tag: develop ## Specify a imagePullPolicy @@ -250,7 +250,6 @@ extraEnvVarsCM: - artifactory-share - softhsm-esignet-share - oidc-ui - - inji-web ## Secret with extra environment variables ## @@ -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: