Closed skylenet closed 5 years ago
Requested via https://github.com/ethersphere/go-ethereum/issues/1220
When enabled, your ingress resources targeting individual nodes, will have the websocket RPC API accessible via /wsrpc
/wsrpc
Example of a request targeting a swarm node:
echo '{"jsonrpc":"2.0","method":"admin_peers","id":1}' | websocat wss://swarm-private-0-yournamespace.stg.swarm-gateways.net/wsrpc --origin localhost
Example values.yaml file that enables the ws APIs and exposes them at the ingress level.
values.yaml
swarm: metricsEnabled: true tracingEnabled: true profilingEnabled: false image: repository: ethdevops/swarm tag: edge terminationGracePeriodSeconds: 5 imagePullPolicy: IfNotPresent podManagementPolicy: Parallel updateStrategy: type: "OnDelete" config: ens_api: http://mainnet-geth-geth.geth:8545 verbosity: 4 debug: true maxpeers: 25 bzznetworkid: 3 extraFlags: - --ws - --wsaddr=0.0.0.0 - --wsorigins=localhost - --wsapi=admin,net,debug ingress: domain: stg.swarm-gateways.net enabled: true # Warning: Exposing the websocket RPC API can be dangerous. # This should be used only for testing purposes. exposeWebsocketRPC: true tls: enabled: true acmeEnabled: false annotations: nginx.ingress.kubernetes.io/proxy-body-size: 500m nginx.ingress.kubernetes.io/ssl-redirect: "false" persistence: enabled: false resources: requests: memory: 512Mi cpu: 0.1 limits: memory: 1024Mi cpu: 0.3
@skylenet I wouldn't know quite how to review this, but if it does what you say it does it's ok with me :)
Requested via https://github.com/ethersphere/go-ethereum/issues/1220
When enabled, your ingress resources targeting individual nodes, will have the websocket RPC API accessible via
/wsrpc
Example of a request targeting a swarm node:
Example
values.yaml
file that enables the ws APIs and exposes them at the ingress level.