Skip to content

Commit

Permalink
Merge pull request #17 from lalithkota/main
Browse files Browse the repository at this point in the history
Selfservice: Disabled API virtual service. Enabled api routes in ui virtual service
  • Loading branch information
shibu-narayanan authored Mar 26, 2024
2 parents 7ac2d13 + 67788d8 commit c155d0d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
http:
- match:
- uri:
{{- toYaml .Values.istio.virtualservice.uri | nindent 8 }}
prefix: {{ .Values.istio.virtualservice.prefix }}
{{- if .Values.istio.virtualservice.rewriteUri }}
rewrite:
uri: {{ .Values.istio.virtualservice.rewriteUri }}
Expand Down
7 changes: 3 additions & 4 deletions charts/openg2p-selfservice-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,13 @@ envVarsFrom:
key: password

istio:
enabled: true
enabled: false
virtualservice:
enabled: true
host: ""
gateway: "istio-system/all-hosts"
uri:
prefix: "/selfservice/v1/"
rewriteUri: "/"
prefix: /selfservice/v1/
rewriteUri: /
gateway:
enabled: false
host: ""
Expand Down
18 changes: 18 additions & 0 deletions charts/openg2p-selfservice-ui/templates/virtualservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@ spec:
- {{ .Values.istio.virtualservice.gateway }}
{{- end }}
http:
{{- if .Values.istio.virtualservice.apiPrefix }}
- match:
- uri:
prefix: {{ .Values.istio.virtualservice.apiPrefix }}
{{- if .Values.istio.virtualservice.apiRewriteUri }}
rewrite:
uri: {{ .Values.istio.virtualservice.apiRewriteUri }}
{{- end }}
route:
- destination:
{{- if .Values.istio.virtualservice.apiServicePath }}
host: {{ .Values.istio.virtualservice.apiServicePath }}
{{- else }}
host: {{ include "portal.fullname" . | replace "ui" "api" }}
{{- end }}
port:
number: {{ .Values.service.port }}
{{- end }}
- match:
- uri:
{{- toYaml .Values.istio.virtualservice.uri | nindent 8 }}
Expand Down
5 changes: 3 additions & 2 deletions charts/openg2p-selfservice-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ istio:
enabled: true
host: ""
gateway: "istio-system/all-hosts"
uri:
regex: '^\/selfservice(?:\/v1)'
prefix: /selfservice
apiPrefix: /selfservice/v1/
apiRewriteUri: /
redirectToSelfServiceEnabled: true
gateway:
enabled: false
Expand Down

0 comments on commit c155d0d

Please sign in to comment.