-
-
Save blockspacer/853a6e53c5fe4992af963bafec186e63 to your computer and use it in GitHub Desktop.
Websockets Demo (Istio v0.7.1 / Istio Nightly Build)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: tornado | |
labels: | |
app: tornado | |
spec: | |
ports: | |
- port: 8888 | |
name: http | |
selector: | |
app: tornado | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: tornado | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: tornado | |
version: v1 | |
spec: | |
containers: | |
- name: tornado | |
image: hiroakis/tornado-websocket-example | |
imagePullPolicy: IfNotPresent | |
ports: | |
- containerPort: 8888 | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: tornado-gateway | |
annotations: | |
kubernetes.io/ingress.class: "istio" | |
spec: | |
rules: | |
- http: | |
paths: | |
- path: /.* | |
backend: | |
serviceName: tornado | |
servicePort: 8888 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: config.istio.io/v1alpha2 | |
kind: RouteRule | |
metadata: | |
name: tornado-websocket | |
spec: | |
destination: | |
name: tornado | |
match: | |
request: | |
headers: | |
uri: | |
prefix: / | |
websocketUpgrade: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.istio.io/v1alpha3 | |
kind: Gateway | |
metadata: | |
name: tornado-gateway | |
spec: | |
selector: | |
istio: ingressgateway | |
servers: | |
- port: | |
number: 80 | |
name: http | |
protocol: HTTP | |
hosts: | |
- "*" | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: tornado | |
spec: | |
hosts: | |
- "*" | |
gateways: | |
- tornado-gateway | |
http: | |
- match: | |
- uri: | |
prefix: / | |
route: | |
- destination: | |
host: tornado | |
weight: 100 | |
websocketUpgrade: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment