kind: Service apiVersion: v1 metadata: name: public-rpc-nodes namespace: pow spec: selector: component: public-rpc-node universe: geth ports: - port: 8545 targetPort: 8545 name: http-rpc protocol: TCP - port: 8546 targetPort: 8546 name: http-ws protocol: TCP - port: 8547 targetPort: 8547 name: http-graphql type: ClusterIP --- apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: public-rpc-nodes-gateway namespace: pow spec: selector: istio: ingressgateway servers: - port: number: 80 name: http protocol: HTTP hosts: - goerli.prylabs.net tls: httpsRedirect: false - port: number: 443 name: https protocol: HTTPS hosts: - goerli.prylabs.net tls: mode: SIMPLE privateKey: /etc/istio/ingressgateway-certs/tls.key serverCertificate: /etc/istio/ingressgateway-certs/tls.crt --- apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: public-rpc-nodes namespace: pow spec: hosts: - goerli.prylabs.net gateways: - public-rpc-nodes-gateway http: - match: - uri: prefix: /websocket route: - destination: port: number: 8546 host: public-rpc-nodes.pow.svc.cluster.local websocketUpgrade: true - match: - uri: prefix: /graphql route: - destination: port: number: 8547 host: public-rpc-nodes.pow.svc.cluster.local - match: # Must be last - uri: prefix: / route: - destination: port: number: 8545 host: public-rpc-nodes.pow.svc.cluster.local subset: v1 weight: 50 - destination: port: number: 8545 host: public-rpc-nodes.pow.svc.cluster.local subset: v1-stable weight: 50 --- apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: public-rpc-nodes namespace: pow spec: host: public-rpc-nodes.pow.svc.cluster.local subsets: - name: v1 labels: version: v1 - name: v1-stable labels: version: v1-stable trafficPolicy: loadBalancer: consistentHash: useSourceIp: true