diff --git a/charts/pocket/README.md b/charts/pocket/README.md index bbac55a3d..ec95dfc35 100644 --- a/charts/pocket/README.md +++ b/charts/pocket/README.md @@ -92,6 +92,7 @@ privateKeySecretKeyRef: | genesis.preProvisionedGenesis.enabled | bool | `true` | Use genesis file supplied by the Helm chart, of false refer to `genesis.externalConfigMap` | | genesis.preProvisionedGenesis.type | string | `"devnet"` | Type of the genesis file to use, can be `devnet`, `testnet`, `mainnet` | | global.postgresql.service.ports.postgresql | string | `"5432"` | | +| healthchecks.enabled | bool | `true` | enable liveness and readiness probes | | image.pullPolicy | string | `"IfNotPresent"` | image pull policy | | image.repository | string | `"ghcr.io/pokt-network/pocket-v1"` | image repository | | image.tag | string | `"latest"` | image tag | diff --git a/charts/pocket/templates/statefulset.yaml b/charts/pocket/templates/statefulset.yaml index 7f68f29c5..f7051b114 100644 --- a/charts/pocket/templates/statefulset.yaml +++ b/charts/pocket/templates/statefulset.yaml @@ -106,6 +106,7 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP +{{ if .Values.healthchecks.enabled }} livenessProbe: httpGet: path: /v1/health @@ -114,6 +115,7 @@ spec: httpGet: path: /v1/health port: rpc +{{ end }} volumeMounts: - name: config-volume mountPath: /pocket/configs/config.json diff --git a/charts/pocket/values.yaml b/charts/pocket/values.yaml index 9587814c7..cde1c02c7 100644 --- a/charts/pocket/values.yaml +++ b/charts/pocket/values.yaml @@ -146,6 +146,10 @@ image: # -- image tag tag: "latest" +healthchecks: + # -- enable liveness and readiness probes + enabled: true + # -- image pull secrets imagePullSecrets: [] nameOverride: "" diff --git a/shared/node.go b/shared/node.go index 39b905e38..d52bbd7d3 100644 --- a/shared/node.go +++ b/shared/node.go @@ -83,19 +83,19 @@ func (node *Node) Start() error { return err } - if err := node.GetBus().GetP2PModule().Start(); err != nil { + if err := node.GetBus().GetRPCModule().Start(); err != nil { return err } - if err := node.GetBus().GetUtilityModule().Start(); err != nil { + if err := node.GetBus().GetP2PModule().Start(); err != nil { return err } - if err := node.GetBus().GetConsensusModule().Start(); err != nil { + if err := node.GetBus().GetUtilityModule().Start(); err != nil { return err } - if err := node.GetBus().GetRPCModule().Start(); err != nil { + if err := node.GetBus().GetConsensusModule().Start(); err != nil { return err }