From e19c6590b04da1499f3d85509cc019f5087c32e6 Mon Sep 17 00:00:00 2001 From: Ali Behjati Date: Tue, 23 Apr 2024 14:02:11 +0200 Subject: [PATCH] update charts Hermes: - Option to disable probes - Support Pythnet mapping addr Beacon: - Option to disable probes --- .pre-commit-config.yaml | 1 - charts/beacon/Chart.yaml | 2 +- charts/beacon/README.md | 6 +++--- charts/beacon/templates/deployment.yaml | 4 ++++ charts/beacon/values.yaml | 8 +++++++- charts/hermes/Chart.yaml | 4 ++-- charts/hermes/README.md | 7 ++++--- charts/hermes/templates/deployment.yaml | 6 ++++++ charts/hermes/values.yaml | 14 +++++++++++++- 9 files changed, 40 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d6b6d3b..d7c18ad 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,6 @@ repos: rev: v3.2.0 hooks: - id: trailing-whitespace - - id: end-of-file-fixer - id: check-added-large-files args: ["--maxkb=3000"] exclude: package-lock.json diff --git a/charts/beacon/Chart.yaml b/charts/beacon/Chart.yaml index 811ef19..ceca7e9 100644 --- a/charts/beacon/Chart.yaml +++ b/charts/beacon/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: beacon description: Highly available Wormhole RPC type: application -version: 1.0.4 +version: 1.1.0 appVersion: v1.1.3 diff --git a/charts/beacon/README.md b/charts/beacon/README.md index 503457b..8c7aaed 100644 --- a/charts/beacon/README.md +++ b/charts/beacon/README.md @@ -1,6 +1,6 @@ # beacon -![Version: 1.0.4](https://img.shields.io/badge/Version-1.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.1.3](https://img.shields.io/badge/AppVersion-v1.1.3-informational?style=flat-square) +![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.1.3](https://img.shields.io/badge/AppVersion-v1.1.3-informational?style=flat-square) Highly available Wormhole RPC @@ -35,6 +35,8 @@ Highly available Wormhole RPC | podSecurityContext.runAsGroup | int | `10001` | | | podSecurityContext.runAsNonRoot | bool | `true` | | | podSecurityContext.runAsUser | int | `10001` | | +| probes.liveness.enabled | bool | `true` | | +| probes.startup.enabled | bool | `true` | | | replicaCount | int | `3` | Number of Beacon replicas | | resources.limits | object | `{}` | | | resources.requests.cpu | int | `1` | | @@ -48,5 +50,3 @@ Highly available Wormhole RPC | service.wormholeListenPort | int | `8999` | | | tolerations | list | `[]` | | ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3) diff --git a/charts/beacon/templates/deployment.yaml b/charts/beacon/templates/deployment.yaml index 3936b88..8b660fc 100644 --- a/charts/beacon/templates/deployment.yaml +++ b/charts/beacon/templates/deployment.yaml @@ -64,12 +64,15 @@ spec: - containerPort: 8999 protocol: UDP name: wormhole-listen + {{- with .Values.probes.liveness.enabled }} livenessProbe: httpGet: path: / port: 9000 initialDelaySeconds: 5 periodSeconds: 3 + {{- end }} + {{- with .Values.probes.startup.enabled }} startupProbe: httpGet: path: / @@ -77,6 +80,7 @@ spec: initialDelaySeconds: 5 periodSeconds: 5 failureThreshold: 3 + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} securityContext: diff --git a/charts/beacon/values.yaml b/charts/beacon/values.yaml index e62d97e..2b63c7d 100644 --- a/charts/beacon/values.yaml +++ b/charts/beacon/values.yaml @@ -23,7 +23,7 @@ beacon: wormholeBootstrapAddrs: /dns4/wormhole-v2-mainnet-bootstrap.xlabs.xyz/udp/8999/quic/p2p/12D3KooWNQ9tVrcb64tw6bNs2CaNrUGPM7yRrKvBBheQ5yCyPHKC,/dns4/wormhole.mcf.rocks/udp/8999/quic/p2p/12D3KooWDZVv7BhZ8yFLkarNdaSWaB43D6UbQwExJ8nnGAEmfHcU,/dns4/wormhole-v2-mainnet-bootstrap.staking.fund/udp/8999/quic/p2p/12D3KooWG8obDX9DNi1KUwZNu9xkGwfKqTp2GFwuuHpWZ3nQruS1 # The values below are the values for spying Wormhole testnet network - # wormholeBootstrapAddrs: /dns4/t-guardian-01.nodes.stable.io/udp/8999/quic/p2p/12D3KooWCW3LGUtkCVkHZmVSZHzL3C4WRKWfqAiJPz1NR7dT9Bxh,/dns4/t-guardian-02.nodes.stable.io/udp/8999/quic/p2p/12D3KooWJXA6goBCiWM8ucjzc4jVUBSqL9Rri6UpjHbkMPErz5zK + # wormholeBootstrapAddrs: /dns4/t-guardian-01.nodes.stable.io/udp/8999/quic/p2p/12D3KooWCW3LGUtkCVkHZmVSZHzL3C4WRKWfqAiJPz1NR7dT9Bxh,/dns4/t-guardian-02.nodes.stable.io/udp/8999/quic/p2p/12D3KooWJXA6goBCiWM8ucjzc4jVUBSqL9Rri6UpjHbkMPErz5zK,/dns4/p2p-guardian-testnet-1.solana.p2p.org/udp/8999/quic/p2p/12D3KooWE4dmZwxhfjCKHLUqSaww96Cf7kmq1ZuKmzPz3MrJgZxp # wormholeNetworkId: /wormhole/testnet/2/1 # Default values for beacon production config @@ -56,6 +56,12 @@ securityContext: readOnlyRootFilesystem: true allowPrivilegeEscalation: false +probes: + liveness: + enabled: true + startup: + enabled: true + service: type: ClusterIP grpcPort: 8080 diff --git a/charts/hermes/Chart.yaml b/charts/hermes/Chart.yaml index a9fd92b..df058bd 100644 --- a/charts/hermes/Chart.yaml +++ b/charts/hermes/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: hermes description: Pyth cross-chain server type: application -version: 0.3.3 -appVersion: v0.4.1 +version: 1.0.0 +appVersion: v0.5.7 diff --git a/charts/hermes/README.md b/charts/hermes/README.md index 45baffc..befe6b3 100644 --- a/charts/hermes/README.md +++ b/charts/hermes/README.md @@ -1,6 +1,6 @@ # hermes -![Version: 0.3.3](https://img.shields.io/badge/Version-0.3.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.4.1](https://img.shields.io/badge/AppVersion-v0.4.1-informational?style=flat-square) +![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.5.7](https://img.shields.io/badge/AppVersion-v0.5.7-informational?style=flat-square) Pyth cross-chain server @@ -14,6 +14,7 @@ Pyth cross-chain server | hermes.benchmarks.endpoint | string | `"https://benchmarks.pyth.network"` | Benchmarks endpoint. | | hermes.logLevel | string | `"warn"` | Hermes log level. Valid values are: trace, debug, info, warn, error | | hermes.pythnetHttpAddr | string | `nil` | Pythnet Http RPC address. Must be set. Example: http://1.2.3.4:8899 | +| hermes.pythnetMappingAddr | string | `"AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J"` | Pythnet Pyth Oracle Mapping address. | | hermes.pythnetWsAddr | string | `nil` | Pythnet Websocket RPC address. Must be set. Example: ws://1.2.3.4:8900 | | hermes.rpcRequesterIpHeaderName | string | `"X-Forwarded-For"` | Header name to fetch the requester ip address from. | | hermes.rpcWsWhitelist | string | `nil` | Whitelisted ip network addresses (in CIDR notation) against websocket ratelimit (separated by comma). Example: 1.2.0.0/24,3.0.0.0/8 | @@ -37,6 +38,8 @@ Pyth cross-chain server | podSecurityContext.runAsGroup | int | `10001` | | | podSecurityContext.runAsNonRoot | bool | `true` | | | podSecurityContext.runAsUser | int | `10001` | | +| probes.liveness.enabled | bool | `true` | | +| probes.readiness.enabled | bool | `true` | | | replicaCount | int | `2` | | | resources.limits | object | `{}` | | | resources.requests.cpu | int | `2` | | @@ -48,5 +51,3 @@ Pyth cross-chain server | service.type | string | `"ClusterIP"` | | | tolerations | list | `[]` | | ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3) diff --git a/charts/hermes/templates/deployment.yaml b/charts/hermes/templates/deployment.yaml index 090dfb0..9472843 100644 --- a/charts/hermes/templates/deployment.yaml +++ b/charts/hermes/templates/deployment.yaml @@ -35,6 +35,8 @@ spec: - {{ required "hermes.pythnetHttpAddr is required" .Values.hermes.pythnetHttpAddr }} - --pythnet-ws-addr - {{ required "hermes.pythnetWsAddr is required" .Values.hermes.pythnetWsAddr }} + - --pythnet-mapping-addr + - {{ .Values.hermes.pythnetMappingAddr }} - --rpc-listen-addr - 0.0.0.0:8080 {{- if .Values.hermes.rpcWsWhitelist }} @@ -63,6 +65,7 @@ spec: - name: metrics containerPort: 8081 protocol: TCP + {{- if .Values.probes.liveness.enabled }} livenessProbe: httpGet: path: /live @@ -70,6 +73,8 @@ spec: initialDelaySeconds: 30 periodSeconds: 5 failureThreshold: 1 + {{- end }} + {{- if .Values.probes.readiness.enabled }} readinessProbe: httpGet: path: /ready @@ -77,6 +82,7 @@ spec: initialDelaySeconds: 30 periodSeconds: 5 failureThreshold: 1 + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} securityContext: diff --git a/charts/hermes/values.yaml b/charts/hermes/values.yaml index 6887456..b7b7cde 100644 --- a/charts/hermes/values.yaml +++ b/charts/hermes/values.yaml @@ -8,6 +8,12 @@ hermes: # -- Pythnet Websocket RPC address. Must be set. Example: ws://1.2.3.4:8900 pythnetWsAddr: + # -- Pythnet Pyth Oracle Mapping address. + pythnetMappingAddr: AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J + + # The value below is the value for Hermes Beta channel using Pythtest crosschain network + # pythnetMappingAddr: BmA9Z6FjioHJPpjT39QazZyhDRUdZy2ezwx4GiDdE2u2 + benchmarks: # -- Enable benchmarks. Benchmarks endpoint does not support Hermes Beta yet and you need to disable it for that. enabled: true @@ -26,7 +32,7 @@ hermes: # -- Wormhole contract address wormholeContractAddr: H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU - # The values below are the values for Hermes Beta channel using Wormhole testnet network + # The value below is the value for Hermes Beta channel using Wormhole testnet network # wormholeContractAddr: EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z # Default values for hermes production config @@ -58,6 +64,12 @@ securityContext: readOnlyRootFilesystem: true allowPrivilegeEscalation: false +probes: + liveness: + enabled: true + readiness: + enabled: true + service: type: ClusterIP port: 8080