From ec9d0ee51d87ca381b102964d9c479528da9319f Mon Sep 17 00:00:00 2001 From: Anmol Date: Mon, 7 Oct 2024 15:06:32 +0530 Subject: [PATCH] feature: expose readinessProbe to the config file for chain, add to doc, fix readinessProbe (#565) * expose readinessProbe to the config file for chain, add to doc, fix readinessProbe * add patch version release --- docs/pages/config/chains.mdx | 19 +++++++++++++++++++ starship/charts/devnet/Chart.yaml | 2 +- starship/charts/devnet/defaults.yaml | 3 +++ .../templates/chains/cosmos/genesis.yaml | 2 +- .../templates/chains/cosmos/validator.yaml | 2 +- starship/charts/devnet/values.schema.json | 3 +++ 6 files changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/pages/config/chains.mdx b/docs/pages/config/chains.mdx index ff17c549f..526c0e7f7 100644 --- a/docs/pages/config/chains.mdx +++ b/docs/pages/config/chains.mdx @@ -351,3 +351,22 @@ chains: coins: 100000000000000uion ``` +## `readinessProbe` (optional) +The `readinessProbe` directive allows you to set the readiness probe for the chain pods. This is useful when you want to test a chain with specific readiness probe settings. +Note, this is the same as the [kubernetes readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) + +```yaml +chains: +- id: osmosis-1 + name: osmosis + numValidators: 1 + readinessProbe: + exec: + command: + - bash + - -c + - | + $CHAIN_BIN status 2>&1 | jq -e '.SyncInfo.catching_up == false' + initialDelaySeconds: 60 + periodSeconds: 20 +``` diff --git a/starship/charts/devnet/Chart.yaml b/starship/charts/devnet/Chart.yaml index 6e39cd8cc..379f0bc5f 100644 --- a/starship/charts/devnet/Chart.yaml +++ b/starship/charts/devnet/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.14 +version: 0.2.15 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/starship/charts/devnet/defaults.yaml b/starship/charts/devnet/defaults.yaml index 83e7c49ac..4383c353e 100644 --- a/starship/charts/devnet/defaults.yaml +++ b/starship/charts/devnet/defaults.yaml @@ -689,6 +689,9 @@ defaultChains: trap 'kill $killer 2>/dev/null' EXIT # Return the test's exit code, whether it succeeded, failed, or was killed. wait $tester + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 15 kujira: image: ghcr.io/cosmology-tech/starship/kujira:v1.1.0 home: /root/.kujira diff --git a/starship/charts/devnet/templates/chains/cosmos/genesis.yaml b/starship/charts/devnet/templates/chains/cosmos/genesis.yaml index f5da9e069..7748d34d4 100644 --- a/starship/charts/devnet/templates/chains/cosmos/genesis.yaml +++ b/starship/charts/devnet/templates/chains/cosmos/genesis.yaml @@ -287,10 +287,10 @@ spec: httpGet: path: /status port: 26657 - {{- end }} initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 15 + {{- end }} {{- end }} - name: exposer image: {{ $.Values.exposer.image }} diff --git a/starship/charts/devnet/templates/chains/cosmos/validator.yaml b/starship/charts/devnet/templates/chains/cosmos/validator.yaml index fab591eee..3e9438e18 100644 --- a/starship/charts/devnet/templates/chains/cosmos/validator.yaml +++ b/starship/charts/devnet/templates/chains/cosmos/validator.yaml @@ -292,10 +292,10 @@ spec: httpGet: path: /status port: 26657 - {{- end }} initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 15 + {{- end }} {{- end }} - name: exposer image: {{ $.Values.exposer.image }} diff --git a/starship/charts/devnet/values.schema.json b/starship/charts/devnet/values.schema.json index 5549369d8..5d2fe6fe7 100644 --- a/starship/charts/devnet/values.schema.json +++ b/starship/charts/devnet/values.schema.json @@ -556,6 +556,9 @@ "amount" ] } + }, + "readinessProbe": { + "type": "object" } }, "additionalProperties": false,