From 4cff3d58914f51daee54adc831050cffd3f2293e Mon Sep 17 00:00:00 2001 From: alvarof2 Date: Tue, 16 Jul 2024 17:18:53 +0200 Subject: [PATCH 1/3] Do not use default for replicas --- charts/blockscout/templates/blockscout-api.deployment.yaml | 2 +- .../blockscout/templates/blockscout-indexer.deployment.yaml | 2 +- charts/blockscout/templates/blockscout-web.deployment.yaml | 2 +- charts/blockscout/values.yaml | 6 ++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/charts/blockscout/templates/blockscout-api.deployment.yaml b/charts/blockscout/templates/blockscout-api.deployment.yaml index b8808fc5..249cd2eb 100644 --- a/charts/blockscout/templates/blockscout-api.deployment.yaml +++ b/charts/blockscout/templates/blockscout-api.deployment.yaml @@ -9,7 +9,7 @@ metadata: {{- include "celo.blockscout.annotations" . | nindent 4 }} spec: {{- if not .Values.blockscout.api.autoscaling.enabled }} - replicas: {{ .Values.blockscout.api.replicas | default 1 }} + replicas: {{ .Values.blockscout.api.replicas}} {{- end }} strategy: type: RollingUpdate diff --git a/charts/blockscout/templates/blockscout-indexer.deployment.yaml b/charts/blockscout/templates/blockscout-indexer.deployment.yaml index 5e1a8ca1..5eaa80e9 100644 --- a/charts/blockscout/templates/blockscout-indexer.deployment.yaml +++ b/charts/blockscout/templates/blockscout-indexer.deployment.yaml @@ -13,7 +13,7 @@ spec: rollingUpdate: maxSurge: {{ .Values.blockscout.indexer.strategy.rollingUpdate.maxSurge }} maxUnavailable: {{ .Values.blockscout.indexer.strategy.rollingUpdate.maxUnavailable }} - replicas: 1 + replicas: {{ .Values.blockscout.indexer.replicas }} selector: matchLabels: app: blockscout diff --git a/charts/blockscout/templates/blockscout-web.deployment.yaml b/charts/blockscout/templates/blockscout-web.deployment.yaml index 5317c51a..235dee31 100644 --- a/charts/blockscout/templates/blockscout-web.deployment.yaml +++ b/charts/blockscout/templates/blockscout-web.deployment.yaml @@ -9,7 +9,7 @@ metadata: {{- include "celo.blockscout.annotations" . | nindent 4 }} spec: {{- if not .Values.blockscout.web.autoscaling.enabled }} - replicas: {{ .Values.blockscout.web.replicas | default 1 }} + replicas: {{ .Values.blockscout.web.replicas }} {{- end }} strategy: type: RollingUpdate diff --git a/charts/blockscout/values.yaml b/charts/blockscout/values.yaml index a868c66a..bb1df493 100644 --- a/charts/blockscout/values.yaml +++ b/charts/blockscout/values.yaml @@ -51,6 +51,8 @@ blockscout: # -- Configuraton for the indexer component indexer: + # -- Number of replicas for indexer deployment. Should not be bigger than 1 + replicas: 1 # -- termination timeout for indexer pod terminationGracePeriodSeconds: 60 port: 4001 @@ -121,6 +123,8 @@ blockscout: # -- Configuraton for the api component api: + # -- Number of replicas for api deployment. Won't be used if autoscaling.enabled is true + replicas: 1 # -- Hostname for api ingress endpoint hostname: "" # -- If api component is served at rootPath @@ -201,6 +205,8 @@ blockscout: # -- Configuraton for the web component web: + # -- Number of replicas for web deployment. Won't be used if autoscaling.enabled is true + replicas: 1 # -- Hostname for web ingress endpoint (also applies to api at /(graphql|graphiql|api)). # If empty, will be generated based on release name and domainName. hostname: "" From 6b788e34ede7b3704aecdf689466994c14fb609a Mon Sep 17 00:00:00 2001 From: alvarof2 Date: Tue, 16 Jul 2024 17:27:32 +0200 Subject: [PATCH 2/3] version --- charts/blockscout/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/blockscout/Chart.yaml b/charts/blockscout/Chart.yaml index f3c1bf2d..3808ee59 100644 --- a/charts/blockscout/Chart.yaml +++ b/charts/blockscout/Chart.yaml @@ -1,7 +1,7 @@ --- apiVersion: v2 name: blockscout -version: 1.3.26 +version: 1.3.27 appVersion: v2.0.4-beta description: Chart which is used to deploy Blockscout for Celo Networks home: https://explorer.celo.org From cfd58fe7e82d7a96dad6f0073952020fa575ddb0 Mon Sep 17 00:00:00 2001 From: alvarof2 Date: Tue, 16 Jul 2024 15:29:53 +0000 Subject: [PATCH 3/3] [Automatic] - Update chart README.md --- charts/blockscout/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/charts/blockscout/README.md b/charts/blockscout/README.md index 91e2e745..a989f973 100644 --- a/charts/blockscout/README.md +++ b/charts/blockscout/README.md @@ -2,7 +2,7 @@ Chart which is used to deploy Blockscout for Celo Networks -![Version: 1.3.26](https://img.shields.io/badge/Version-1.3.26-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.0.4-beta](https://img.shields.io/badge/AppVersion-v2.0.4--beta-informational?style=flat-square) +![Version: 1.3.27](https://img.shields.io/badge/Version-1.3.27-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.0.4-beta](https://img.shields.io/badge/AppVersion-v2.0.4--beta-informational?style=flat-square) - [blockscout](#blockscout) - [Chart requirements](#chart-requirements) @@ -36,7 +36,7 @@ To install/manage a release named `celo-mainnet-fullnode` connected to `mainnet` ```bash # Select the chart release to use -CHART_RELEASE="oci://us-west1-docker.pkg.dev/celo-testnet/clabs-public-oci/blockscout --version=1.3.26" # Use remote chart and specific version +CHART_RELEASE="oci://us-west1-docker.pkg.dev/celo-testnet/clabs-public-oci/blockscout --version=1.3.27" # Use remote chart and specific version CHART_RELEASE="./" # Use this local folder # (Only for local chart) Sync helm dependencies @@ -60,7 +60,7 @@ helm upgrade my-blockscout -f values-alfajores-blockscout2.yaml --namespace=celo | Key | Type | Default | Description | |-----|------|---------|-------------| -| blockscout.api | object | `{"affinity":{},"autoscaling":{"enabled":true,"maxReplicas":10,"minReplicas":2,"target":{"cpu":70}},"db":{"connectionName":"project:region:db-name","name":"blockscout","port":5432,"proxy":{"resources":{"requests":{"cpu":"10m","memory":"20Mi"}}}},"hostname":"","livenessProbe":{"failureThreshold":5,"httpGet":{"path":"/api/v1/health/liveness","port":"http","scheme":"HTTP"},"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"nodeSelector":{},"poolSize":30,"poolSizeReplica":5,"port":4000,"primaryRpcRegion":"indexer","rateLimit":"1000000","readinessProbe":{"failureThreshold":5,"httpGet":{"path":"/api/v1/health/liveness","port":"http","scheme":"HTTP"},"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"resources":{"requests":{"cpu":0.5,"memory":"500Mi"}},"rpcRegion":"api","strategy":{"rollingUpdate":{"maxSurge":1,"maxUnavailable":"20%"}},"suffix":{"enabled":false,"path":""}}` | Configuraton for the api component | +| blockscout.api | object | `{"affinity":{},"autoscaling":{"enabled":true,"maxReplicas":10,"minReplicas":2,"target":{"cpu":70}},"db":{"connectionName":"project:region:db-name","name":"blockscout","port":5432,"proxy":{"resources":{"requests":{"cpu":"10m","memory":"20Mi"}}}},"hostname":"","livenessProbe":{"failureThreshold":5,"httpGet":{"path":"/api/v1/health/liveness","port":"http","scheme":"HTTP"},"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"nodeSelector":{},"poolSize":30,"poolSizeReplica":5,"port":4000,"primaryRpcRegion":"indexer","rateLimit":"1000000","readinessProbe":{"failureThreshold":5,"httpGet":{"path":"/api/v1/health/liveness","port":"http","scheme":"HTTP"},"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"replicas":1,"resources":{"requests":{"cpu":0.5,"memory":"500Mi"}},"rpcRegion":"api","strategy":{"rollingUpdate":{"maxSurge":1,"maxUnavailable":"20%"}},"suffix":{"enabled":false,"path":""}}` | Configuraton for the api component | | blockscout.api.affinity | object | `{}` | affinity for api pods | | blockscout.api.autoscaling | object | `{"enabled":true,"maxReplicas":10,"minReplicas":2,"target":{"cpu":70}}` | HPA configuration for api deployment | | blockscout.api.db | object | `{"connectionName":"project:region:db-name","name":"blockscout","port":5432,"proxy":{"resources":{"requests":{"cpu":"10m","memory":"20Mi"}}}}` | Database configuration for indexer. Prepared to be used with CloudSQL | @@ -76,6 +76,7 @@ helm upgrade my-blockscout -f values-alfajores-blockscout2.yaml --namespace=celo | blockscout.api.primaryRpcRegion | string | `"indexer"` | PRIMARY_REGION env variable for api pod. Do not change. | | blockscout.api.rateLimit | string | `"1000000"` | request rateLimit for api coponent | | blockscout.api.readinessProbe | object | `{"failureThreshold":5,"httpGet":{"path":"/api/v1/health/liveness","port":"http","scheme":"HTTP"},"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5}` | readinessProbe for api container | +| blockscout.api.replicas | int | `1` | Number of replicas for api deployment. Won't be used if autoscaling.enabled is true | | blockscout.api.resources | object | `{"requests":{"cpu":0.5,"memory":"500Mi"}}` | resources for api container | | blockscout.api.rpcRegion | string | `"api"` | MY_REGION env variable for api pod. Do not change. | | blockscout.api.strategy | object | `{"rollingUpdate":{"maxSurge":1,"maxUnavailable":"20%"}}` | UpdateStrategy for api deployment | @@ -106,6 +107,7 @@ helm upgrade my-blockscout -f values-alfajores-blockscout2.yaml --namespace=celo | blockscout.indexer.poolSizeReplica | int | `5` | Max number of DB connections for read-only API endpoints requests | | blockscout.indexer.primaryRpcRegion | string | `"indexer"` | PRIMARY_REGION env variable for indexer pod. Do not change. | | blockscout.indexer.readinessProbe | object | `{"failureThreshold":5,"httpGet":{"path":"/health/readiness","port":"health","scheme":"HTTP"},"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5}` | readinessProbe for indexer container | +| blockscout.indexer.replicas | int | `1` | Number of replicas for indexer deployment. Should not be bigger than 1 | | blockscout.indexer.resources | object | `{"requests":{"cpu":2,"memory":"2G"}}` | resources for indexer container | | blockscout.indexer.rpcRegion | string | `"indexer"` | MY_REGION env variable for indexer pod. Do not change. | | blockscout.indexer.strategy | object | `{"rollingUpdate":{"maxSurge":1,"maxUnavailable":0}}` | UpdateStrategy for indexer deployment | @@ -121,7 +123,7 @@ helm upgrade my-blockscout -f values-alfajores-blockscout2.yaml --namespace=celo | blockscout.shared.image | object | `{"pullPolicy":"Always","repository":"gcr.io/celo-testnet/blockscout","tag":"c6ca0da21bd238948d13ec2fabf4428a9dbbc7b6"}` | Image to use for blockscout components | | blockscout.shared.migrationJobInitialValue | string | `"{0,0}"` | Starting point for data migration job (`INITIAL_VALUE` env var) | | blockscout.shared.secrets | object | `{"analyticsKey":"","campaignBannerApiUrl":"","dbPassword":"","dbUser":"","discordWebhookUrl":"","erlang_cookie":"","grafanaCloud":"","recaptcha_apiKey":"","recaptcha_projectId":"","recaptcha_secretKey":"","recaptcha_siteKey":"","segmentKey":""}` | Reference to secrets. Format: gcp:secretmanager:projects//secrets/-blockscout-. Using tool https://github.com/doitintl/secrets-init | -| blockscout.web | object | `{"accountPoolSize":1,"affinity":{},"appsMenu":{"enabled":true},"autoscaling":{"enabled":true,"maxReplicas":5,"minReplicas":2,"target":{"cpu":70}},"basicAuth":{"enabled":false},"campaignBanner":{"refreshInterval":"60"},"db":{"connectionName":"project:region:db-name","name":"blockscout","port":5432,"proxy":{"resources":{"requests":{"cpu":"10m","memory":"20Mi"}}}},"envHostname":"","extraEnvironments":{"source":[],"target":[]},"homepage":{"showPrice":true,"showTxs":false},"hostname":"","liveUpdates":{"disabled":true},"livenessProbe":{"failureThreshold":5,"httpGet":{"path":"/api/v1/health/liveness","port":"http","scheme":"HTTP"},"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"nodeSelector":{},"poolSize":30,"poolSizeReplica":5,"port":4000,"primaryRpcRegion":"indexer","readinessProbe":{"failureThreshold":5,"httpGet":{"path":"/api/v1/health/liveness","port":"http","scheme":"HTTP"},"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"resources":{"requests":{"cpu":"500m","memory":"250M"}},"rpcRegion":"web","sourcify":{"enabled":true,"repoUrl":"https://repo.sourcify.dev/contracts","serverUrl":"https://sourcify.dev/server"},"stats":{"enabled":false,"makerdojo":"","reportUrl":""},"strategy":{"rollingUpdate":{"maxSurge":1,"maxUnavailable":"20%"}},"suffix":{"enabled":false,"path":""},"tokenIcons":{"enabled":false}}` | Configuraton for the web component | +| blockscout.web | object | `{"accountPoolSize":1,"affinity":{},"appsMenu":{"enabled":true},"autoscaling":{"enabled":true,"maxReplicas":5,"minReplicas":2,"target":{"cpu":70}},"basicAuth":{"enabled":false},"campaignBanner":{"refreshInterval":"60"},"db":{"connectionName":"project:region:db-name","name":"blockscout","port":5432,"proxy":{"resources":{"requests":{"cpu":"10m","memory":"20Mi"}}}},"envHostname":"","extraEnvironments":{"source":[],"target":[]},"homepage":{"showPrice":true,"showTxs":false},"hostname":"","liveUpdates":{"disabled":true},"livenessProbe":{"failureThreshold":5,"httpGet":{"path":"/api/v1/health/liveness","port":"http","scheme":"HTTP"},"initialDelaySeconds":60,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"nodeSelector":{},"poolSize":30,"poolSizeReplica":5,"port":4000,"primaryRpcRegion":"indexer","readinessProbe":{"failureThreshold":5,"httpGet":{"path":"/api/v1/health/liveness","port":"http","scheme":"HTTP"},"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"replicas":1,"resources":{"requests":{"cpu":"500m","memory":"250M"}},"rpcRegion":"web","sourcify":{"enabled":true,"repoUrl":"https://repo.sourcify.dev/contracts","serverUrl":"https://sourcify.dev/server"},"stats":{"enabled":false,"makerdojo":"","reportUrl":""},"strategy":{"rollingUpdate":{"maxSurge":1,"maxUnavailable":"20%"}},"suffix":{"enabled":false,"path":""},"tokenIcons":{"enabled":false}}` | Configuraton for the web component | | blockscout.web.accountPoolSize | int | `1` | ACCOUNT_POOL_SIZE env variable for web pod | | blockscout.web.affinity | object | `{}` | affinity for web pods | | blockscout.web.appsMenu | object | `{"enabled":true}` | Configuration for the app menu on the web, for customizing the list of apps on `More` menu | @@ -143,6 +145,7 @@ helm upgrade my-blockscout -f values-alfajores-blockscout2.yaml --namespace=celo | blockscout.web.poolSizeReplica | int | `5` | Max number of DB connections for read-only API endpoints requests | | blockscout.web.primaryRpcRegion | string | `"indexer"` | PRIMARY_REGION env variable for web pod. Do not change. | | blockscout.web.readinessProbe | object | `{"failureThreshold":5,"httpGet":{"path":"/api/v1/health/liveness","port":"http","scheme":"HTTP"},"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5}` | readinessProbe for web container | +| blockscout.web.replicas | int | `1` | Number of replicas for web deployment. Won't be used if autoscaling.enabled is true | | blockscout.web.resources | object | `{"requests":{"cpu":"500m","memory":"250M"}}` | resources for web container | | blockscout.web.rpcRegion | string | `"web"` | MY_REGION env variable for web pod. Do not change. | | blockscout.web.strategy | object | `{"rollingUpdate":{"maxSurge":1,"maxUnavailable":"20%"}}` | UpdateStrategy for web deployment |