Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[DSD-4641] updated helm" #15

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
# injiweb ui
# oidc-ui

## Overview
Refer [Commons](https://docs.mosip.io/1.2.0/modules/commons).
Expand Down
11 changes: 5 additions & 6 deletions helm/inji-web/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ 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 mosip/inji-web \
helm -n $NS install inji-web /home/bhuminathan/injiwebfinal/inji-web/helm/inji-web \
-f values.yaml \
--set esignet_redirect_url=$ESIGNET_HOST \
--set istio.hosts\[0\]=$INJI_HOST \
--set istio.hosts\[0\]=$ESIGNET_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: 7 additions & 26 deletions helm/inji-web/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
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 }}
name: {{ template "inji-web.serviceAccountName" . }}-pods-role
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
- "*"
resources:
- endpoints
- pods
- services
- configmaps
- secrets
- virtualservices
- gateways
verbs:
- get
- list
- create
- update
- patch
- apiGroups: [""]
resources: ["pods"]
verbs: ["get","patch","list","watch"]
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 "common.names.fullname" . }}
name: {{ template "inji-web.serviceAccountName" . }}-pods-role
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
Expand Down
24 changes: 21 additions & 3 deletions helm/inji-web/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,30 @@ 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: 10 additions & 3 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: mosipdev/inji-web
repository: bn46/inji-web
tag: develop

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

## Secret with extra environment variables
##
Expand Down Expand Up @@ -419,8 +420,14 @@ metrics:
## Slash is important!
inji_web:
inji_web_port: '3004'
inji_web_service_host: 'mimoto.mimoto'
esignet_redirect_url: 'esignet.sandbox.xyz.net'
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'


## 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
Loading