prysm-pulse/k8s/geth/public_nodes.service.yaml
Preston Van Loon 7078382b82
k8s goerli config (#1517)
* Added goerli node config

* add validator configuration

* working better with istio

* cleanup

* Update bootnodes and genesis

* prepare goerli

* cleaning up geth stuff

* Working on istio

* Update somethings for istio

* Add back bootnode for internal discovery, add some labels for istio

* support ws

* ssl via lets encrypt

* Remove ingress

* Expose grafana

* allow insecure

* Add consistent loadbalancing

* use pod antiaffinity so that the public nodes are highly available

* Change app name to goerli

* Add unstable graphql

* remove redis

* lint

* gazelle and fix weights

* better affinity
2019-02-08 15:30:38 -05:00

115 lines
2.2 KiB
YAML

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