Skip to content

Commit

Permalink
Merge pull request #76 from sitewhere/jev/IstioVirtualService
Browse files Browse the repository at this point in the history
Add Istio Gateway and Virtual Services. #75
  • Loading branch information
jorgevillaverde-sitewhere authored Jul 3, 2019
2 parents fc901c3 + 69b6925 commit c3fbbbf
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ This chart will do the following:
| Inbound Processing |||
| Instance Management |||
| Outbound Connectors |||
| Tenant Management |||
| User Management |||
| Web Rest |||
| Batch Operations |||
| Command Delivery |||
Expand Down Expand Up @@ -86,8 +84,6 @@ the port that each microservice will expose, so that you can connect a remote de
| Microservice | JDWP Port | JMX Port |
| :----------------------- | :--------------- | :---------------- |
| Instance Managemwnt | `8001` | `1101` |
| User Management | `8002` | `1102` |
| Tenant Management | `8003` | `1103` |
| Device Management | `8004` | `1104` |
| Event Management | `8005` | `1105` |
| Asset Management | `8006` | `1106` |
Expand Down
34 changes: 34 additions & 0 deletions charts/sitewhere/templates/Web-Rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,38 @@ spec:
app.kubernetes.io/name: {{ include "sitewhere.name" . }}-web-rest
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: {{ include "sitewhere.fullname" . }}-gateway
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
number: 80
name: http-web-rest
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: {{ include "sitewhere.name" . }}-web-rest
spec:
hosts:
- "*"
gateways:
- {{ include "sitewhere.fullname" . }}-gateway
http:
- match:
- uri:
prefix: /
route:
- destination:
port:
number: {{ .Values.services.web_rest.service.http.port }}
host: {{ include "sitewhere.fullname" . }}-web-rest-http
{{- end }}
2 changes: 1 addition & 1 deletion charts/sitewhere/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ services:
management:
port: 9001
http:
type: LoadBalancer
type: ClusterIP
port: 8080
resources:
limits:
Expand Down

0 comments on commit c3fbbbf

Please sign in to comment.