diff --git a/automation/bake/Dockerfile b/automation/bake/Dockerfile index 396571e3581..10af594a571 100644 --- a/automation/bake/Dockerfile +++ b/automation/bake/Dockerfile @@ -2,14 +2,6 @@ ARG BAKE_VERSION FROM codaprotocol/coda-daemon:${BAKE_VERSION} -RUN apt-get update && apt-get install -y gnupg2 - -RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list - -RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - - -RUN apt-get update && apt-get install -y google-cloud-sdk - ARG COMMIT_HASH=master ARG TESTNET_NAME=testworld ARG CONFIG_FILE="/root/daemon.json" diff --git a/automation/terraform/modules/kubernetes/testnet/helm.tf b/automation/terraform/modules/kubernetes/testnet/helm.tf index dbe7feaa489..debefab4303 100644 --- a/automation/terraform/modules/kubernetes/testnet/helm.tf +++ b/automation/terraform/modules/kubernetes/testnet/helm.tf @@ -26,7 +26,7 @@ resource "helm_release" "seeds" { name = "${var.testnet_name}-seeds" repository = var.use_local_charts ? "" : local.mina_helm_repo chart = var.use_local_charts ? "../../../../helm/seed-node" : "seed-node" - version = "1.0.3" + version = "1.0.4" namespace = kubernetes_namespace.testnet_namespace.metadata[0].name values = [ yamlencode(local.seed_vars) @@ -47,7 +47,7 @@ resource "helm_release" "block_producers" { name = "${var.testnet_name}-block-producers" repository = var.use_local_charts ? "" : local.mina_helm_repo chart = var.use_local_charts ? "../../../../helm/block-producer" : "block-producer" - version = "1.0.1" + version = "1.0.3" namespace = kubernetes_namespace.testnet_namespace.metadata[0].name values = [ yamlencode(local.block_producer_vars) @@ -66,7 +66,7 @@ resource "helm_release" "snark_workers" { name = "${var.testnet_name}-snark-worker" repository = var.use_local_charts ? "" : local.mina_helm_repo chart = var.use_local_charts ? "../../../../helm/snark-worker" : "snark-worker" - version = "1.0.1" + version = "1.0.2" namespace = kubernetes_namespace.testnet_namespace.metadata[0].name values = [ yamlencode(local.snark_worker_vars) @@ -85,7 +85,7 @@ resource "helm_release" "archive_node" { name = "archive-${count.index + 1}" repository = var.use_local_charts ? "" : local.mina_helm_repo chart = var.use_local_charts ? "../../../../helm/archive-node" : "archive-node" - version = "1.0.1" + version = "1.0.3" namespace = kubernetes_namespace.testnet_namespace.metadata[0].name values = [ yamlencode(local.archive_vars[count.index]) diff --git a/automation/terraform/testnets/test-labels/community_fast_unlock.accounts.json b/automation/terraform/testnets/test-labels/community_fast_unlock.accounts.json new file mode 100644 index 00000000000..c5acfa4cde2 --- /dev/null +++ b/automation/terraform/testnets/test-labels/community_fast_unlock.accounts.json @@ -0,0 +1,13 @@ +{ + "pk": "B62qrMm1fSizfgGuFK7KsZZdxEvFK7etUt272wX5cQfWixZkoEy5Sgq", + "balance": "66000.000000000", + "delegate": "B62qrMm1fSizfgGuFK7KsZZdxEvFK7etUt272wX5cQfWixZkoEy5Sgq", + "sk": null, + "timing": { + "initial_minimum_balance": "60000", + "cliff_time": "150", + "cliff_amount": "12000", + "vesting_period": "6", + "vesting_increment": "150" + } +} diff --git a/automation/terraform/testnets/test-labels/fish.accounts.json b/automation/terraform/testnets/test-labels/fish.accounts.json new file mode 100644 index 00000000000..2de8a95b685 --- /dev/null +++ b/automation/terraform/testnets/test-labels/fish.accounts.json @@ -0,0 +1,60 @@ +{ + "pk": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB", + "balance": "20000.000000000", + "delegate": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB", + "sk": null +} +{ + "pk": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11", + "balance": "20000.000000000", + "delegate": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11", + "sk": null +} +{ + "pk": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL", + "balance": "20000.000000000", + "delegate": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL", + "sk": null +} +{ + "pk": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3", + "balance": "20000.000000000", + "delegate": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3", + "sk": null +} +{ + "pk": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj", + "balance": "20000.000000000", + "delegate": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj", + "sk": null +} +{ + "pk": "B62qrTLLzysdpmKwDffpS4BTRoSE4yC3pot5F4D4ZwAn5oxNb9yCxhz", + "balance": "20000.000000000", + "delegate": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB", + "sk": null +} +{ + "pk": "B62qp1jrz9S5pU8MT6j5xMQawxFbNxHzkT1YnQspyDXxESb4Au8aeWL", + "balance": "20000.000000000", + "delegate": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11", + "sk": null +} +{ + "pk": "B62qpBLWeBjAnnQGehYrHZ9vrh1HXwpm9Pp7qksT6AkMumswyJpGF4X", + "balance": "20000.000000000", + "delegate": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL", + "sk": null +} +{ + "pk": "B62qj2jSJhbUwLYXeoLndzw5cwmWGFeeSRSDxEwYQUmpdBeiMPFQ5jq", + "balance": "20000.000000000", + "delegate": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3", + "sk": null +} +{ + "pk": "B62qp7toDo2vTrNSVjsRSXkKBQCjvByLdwFcoGTqay6kuDSiU3pubeS", + "balance": "20000.000000000", + "delegate": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj", + "sk": null +} diff --git a/automation/terraform/testnets/test-labels/genesis_ledger.json b/automation/terraform/testnets/test-labels/genesis_ledger.json new file mode 100644 index 00000000000..963530328ce --- /dev/null +++ b/automation/terraform/testnets/test-labels/genesis_ledger.json @@ -0,0 +1,114 @@ +{ + "genesis": { + "genesis_state_timestamp": "2021-04-08 19:42:22-7:00" + }, + "ledger": { + "name": "test-labels", + "num_accounts": 16, + "accounts": [ + { + "pk": "B62qrMm1fSizfgGuFK7KsZZdxEvFK7etUt272wX5cQfWixZkoEy5Sgq", + "balance": "66000.000000000", + "delegate": "B62qrMm1fSizfgGuFK7KsZZdxEvFK7etUt272wX5cQfWixZkoEy5Sgq", + "sk": null, + "timing": { + "initial_minimum_balance": "60000", + "cliff_time": "150", + "cliff_amount": "12000", + "vesting_period": "6", + "vesting_increment": "150" + } + }, + { + "pk": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB", + "balance": "20000.000000000", + "delegate": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB", + "sk": null + }, + { + "pk": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11", + "balance": "20000.000000000", + "delegate": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11", + "sk": null + }, + { + "pk": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL", + "balance": "20000.000000000", + "delegate": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL", + "sk": null + }, + { + "pk": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3", + "balance": "20000.000000000", + "delegate": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3", + "sk": null + }, + { + "pk": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj", + "balance": "20000.000000000", + "delegate": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj", + "sk": null + }, + { + "pk": "B62qrTLLzysdpmKwDffpS4BTRoSE4yC3pot5F4D4ZwAn5oxNb9yCxhz", + "balance": "20000.000000000", + "delegate": "B62qmmyFhM51jEuSKsBp1VdPxxpuf1jvKvVQdzfqDqGofRwaB37tdgB", + "sk": null + }, + { + "pk": "B62qp1jrz9S5pU8MT6j5xMQawxFbNxHzkT1YnQspyDXxESb4Au8aeWL", + "balance": "20000.000000000", + "delegate": "B62qrY36cZbJDLmxXS6Gf3keryLLUEwRJJH1DJFU2Q4vhyoc1Adrw11", + "sk": null + }, + { + "pk": "B62qpBLWeBjAnnQGehYrHZ9vrh1HXwpm9Pp7qksT6AkMumswyJpGF4X", + "balance": "20000.000000000", + "delegate": "B62qoSVGbUvuaezbuUnqqai4mkMsgDckY367koR76Wysx6QVS5pQZhL", + "sk": null + }, + { + "pk": "B62qj2jSJhbUwLYXeoLndzw5cwmWGFeeSRSDxEwYQUmpdBeiMPFQ5jq", + "balance": "20000.000000000", + "delegate": "B62qkhVC4jdRHWAJGaZuvvB555qXA8Ys2vVWTewMdNpg2jmT8ZqDJh3", + "sk": null + }, + { + "pk": "B62qp7toDo2vTrNSVjsRSXkKBQCjvByLdwFcoGTqay6kuDSiU3pubeS", + "balance": "20000.000000000", + "delegate": "B62qpgAtQHb3JhzeBSYmNQUXWkrnZ6KVxDdDBFY6yKVVX6RjCWsB9Wj", + "sk": null + }, + { + "pk": "B62qrSYyANC6tD145U2rD6j2Pk22obbXridrLS4k2ATvAhJDhfDjD5N", + "balance": "2250000.000000000", + "delegate": "B62qjRyvPXehwFqoA2fgAKfK38edF8HYRhGMjjX76m6oPPKob9Tchzs", + "sk": null + }, + { + "pk": "B62qjEy1BAqGPJYw3B24uhPnhMJc19LgsmHCVvH5GFzB5SJzBy7hJ8y", + "balance": "2250000.000000000", + "delegate": "B62qnPzdCBJKCVgkoGQPXa7dMpxny8zGr76E8YMMdQo6e3CK1Zpwo9Y", + "sk": null + }, + { + "pk": "B62qqsQPNrNLGBTpsKyvtW6NKZERRPHaACMpkKGxmusV8MwaGjAtwRv", + "balance": "2250000.000000000", + "delegate": "B62qmEKWAURBnMHLojq9eW2wRKyvRtJQUG2tzGRJzTUVef3PyCFQ8th", + "sk": null + }, + { + "pk": "B62qr7ed4upRdRaNmvxVKgxmbutxsGWeQeXBMEZjJN83CUrXnD1sDgz", + "balance": "2250000.000000000", + "delegate": "B62qqQPw875obJSweVGPpj2hu455ncZZTeMz8rvgiNZM5bErspo4sPM", + "sk": null + }, + { + "pk": "B62qmf7k5jdBKRhnTo8tyfr978d7GvzgECUNGETdjWvjEi5VdsfNady", + "balance": "2250000.000000000", + "delegate": "B62qrMJjvLTz6XsE1Cge4yPAA9Y44SWeDtonH5LYN6ZYkwfsqukAf5D", + "sk": null + } + ] + } +} diff --git a/automation/terraform/testnets/test-labels/main.tf b/automation/terraform/testnets/test-labels/main.tf new file mode 100755 index 00000000000..893a7ba5185 --- /dev/null +++ b/automation/terraform/testnets/test-labels/main.tf @@ -0,0 +1,151 @@ +terraform { + required_version = ">= 0.14.0" + backend "s3" { + key = "terraform-test-labels.tfstate" + encrypt = true + region = "us-west-2" + bucket = "o1labs-terraform-state" + acl = "bucket-owner-full-control" + } +} + +provider "aws" { + region = "us-west-2" +} + +provider "google" { + alias = "google-us-east4" + project = "o1labs-192920" + region = "us-east4" + zone = "us-east4-b" +} + +provider "google" { + alias = "google-us-east1" + project = "o1labs-192920" + region = "us-east1" + zone = "us-east1-b" +} + +provider "google" { + alias = "google-us-central1" + project = "o1labs-192920" + region = "us-central1" + zone = "us-central1-c" +} + + +variable "whale_count" { + type = number + + description = "Number of online whales for the network to run" + default = 2 +} + +variable "fish_count" { + type = number + + description = "Number of online fish for the network to run" + default = 2 +} + +variable "seed_count" { + default = 1 +} + +locals { + testnet_name = "test-labels" + coda_image = "gcr.io/o1labs-192920/coda-daemon-baked:1.1.5-compatible-be67bed-test-labels-425db71" + coda_archive_image = "gcr.io/o1labs-192920/coda-archive:1.0.4-8202b60" + seed_region = "us-central1" + seed_zone = "us-central1-b" + + # replace with `make_report_discord_webhook_url = ""` if not in use (will fail if file not present) + make_report_discord_webhook_url = "" + + # replace with `make_report_accounts = ""` if not in use (will fail if file not present) + # make_report_accounts = < /etc/apt/sources.list.d/o1.list \ && apt-get update \ diff --git a/dockerfiles/scripts/healthcheck-utilities.sh b/dockerfiles/scripts/healthcheck-utilities.sh index 0283860fb6f..335a5a48095 100644 --- a/dockerfiles/scripts/healthcheck-utilities.sh +++ b/dockerfiles/scripts/healthcheck-utilities.sh @@ -1,12 +1,21 @@ # # Determine whether a local daemon is SYNCed with its network # -function isDaemonSynced() { + +function updateSyncStatusLabel() { status=$( curl --silent --show-error --header "Content-Type:application/json" -d'{ "query": "query { syncStatus } " }' localhost:3085/graphql | \ jq '.data.syncStatus' ) + str=$(echo ${status} | sed 's/"//g' ) + kubectl label --overwrite=true pod -l app=$1 syncStatus=${str} +} +function isDaemonSynced() { + status=$( + curl --silent --show-error --header "Content-Type:application/json" -d'{ "query": "query { syncStatus } " }' localhost:3085/graphql | \ + jq '.data.syncStatus' + ) case ${status} in \"BOOTSTRAP\") ;& diff --git a/helm/archive-node/Chart.lock b/helm/archive-node/Chart.lock index 84bf01d31df..a02fabfbdf3 100644 --- a/helm/archive-node/Chart.lock +++ b/helm/archive-node/Chart.lock @@ -4,6 +4,6 @@ dependencies: version: 10.2.5 - name: common-utilities repository: https://coda-charts.storage.googleapis.com - version: 0.0.8 + version: 0.0.9 digest: sha256:80b8998adedf79b0fe5252d5601ec0fa9dda31495b015f41c3cce0bdaccf9702 generated: "2021-01-27T18:03:33.233853887-05:00" diff --git a/helm/archive-node/Chart.yaml b/helm/archive-node/Chart.yaml index 7b8f06b70de..afc39bf1ca0 100644 --- a/helm/archive-node/Chart.yaml +++ b/helm/archive-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: archive-node description: A Helm chart for Mina Protocol's archive node type: application -version: 1.0.2 +version: 1.0.3 appVersion: 1.16.0 annotations: artifacthub.io/changes: | @@ -13,7 +13,7 @@ dependencies: repository: "https://charts.bitnami.com/bitnami" condition: archive.enablePostgresDB - name: common-utilities - version: 0.0.8 + version: 0.0.9 repository: "https://coda-charts.storage.googleapis.com" icon: https://storage.googleapis.com/coda-charts/Mina_Icon_Secondary_RGB_Black.png keywords: diff --git a/helm/archive-node/charts/common-utilities-0.0.8.tgz b/helm/archive-node/charts/common-utilities-0.0.8.tgz deleted file mode 100644 index efe156691de..00000000000 Binary files a/helm/archive-node/charts/common-utilities-0.0.8.tgz and /dev/null differ diff --git a/helm/archive-node/charts/common-utilities-0.0.9.tgz b/helm/archive-node/charts/common-utilities-0.0.9.tgz new file mode 100644 index 00000000000..46cefc1be29 Binary files /dev/null and b/helm/archive-node/charts/common-utilities-0.0.9.tgz differ diff --git a/helm/archive-node/templates/archive.yaml b/helm/archive-node/templates/archive.yaml index e8ec3868fed..1cddf399046 100644 --- a/helm/archive-node/templates/archive.yaml +++ b/helm/archive-node/templates/archive.yaml @@ -16,6 +16,9 @@ spec: testnet: {{ .Values.testnetName }} role: archive-node version: {{ trunc 6 (split ":" .Values.coda.image)._1 | trimSuffix "-" }} + {{- if .Values.archive.enableLocalDaemon }} + syncStatus: INIT + {{- end }} annotations: prometheus.io/scrape: 'true' prometheus.io/port: {{ .Values.archive.ports.metrics | quote }} @@ -92,7 +95,9 @@ spec: protocol: TCP containerPort: {{ .Values.coda.ports.p2p }} hostPort: {{ .Values.coda.ports.p2p }} -{{- include "healthcheck.daemon.allChecks" .Values | indent 8 }} +{{$name := include "archive-node.fullname" . }} +{{$data := dict "name" $name "healthcheck" $.Values.healthcheck }} +{{- include "healthcheck.daemon.allChecks" $data | indent 8 }} imagePullPolicy: Always volumeMounts: - name: config-dir diff --git a/helm/block-producer/Chart.yaml b/helm/block-producer/Chart.yaml index 74195b88d3c..198bf7e6848 100644 --- a/helm/block-producer/Chart.yaml +++ b/helm/block-producer/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: block-producer description: A Helm chart for Mina Protocol's block producing network nodes type: application -version: 1.0.2 +version: 1.0.3 appVersion: 1.16.0 annotations: artifacthub.io/changes: | @@ -10,7 +10,7 @@ annotations: - add flag to log precomputed blocks dependencies: - name: common-utilities - version: 0.0.8 + version: 0.0.9 repository: "https://coda-charts.storage.googleapis.com" icon: https://storage.googleapis.com/coda-charts/Mina_Icon_Secondary_RGB_Black.png keywords: diff --git a/helm/block-producer/charts/common-utilities-0.0.8.tgz b/helm/block-producer/charts/common-utilities-0.0.8.tgz deleted file mode 100644 index efe156691de..00000000000 Binary files a/helm/block-producer/charts/common-utilities-0.0.8.tgz and /dev/null differ diff --git a/helm/block-producer/charts/common-utilities-0.0.9.tgz b/helm/block-producer/charts/common-utilities-0.0.9.tgz new file mode 100644 index 00000000000..46cefc1be29 Binary files /dev/null and b/helm/block-producer/charts/common-utilities-0.0.9.tgz differ diff --git a/helm/block-producer/templates/_healthchecks.tpl b/helm/block-producer/templates/_healthchecks.tpl index 532625ffaf9..77a944df27a 100644 --- a/helm/block-producer/templates/_healthchecks.tpl +++ b/helm/block-producer/templates/_healthchecks.tpl @@ -23,7 +23,7 @@ readinessProbe: command: [ "/bin/bash", "-c", - "source /healthcheck/utilities.sh && isDaemonSynced && peerCountGreaterThan 0 && ownsFunds" + "source /healthcheck/utilities.sh && isDaemonSynced && peerCountGreaterThan 0 && ownsFunds && updateSyncStatusLabel {{ .name }}" ] {{- end }} diff --git a/helm/block-producer/templates/block-producer.yaml b/helm/block-producer/templates/block-producer.yaml index c457d1d594d..cae3ebe4889 100644 --- a/helm/block-producer/templates/block-producer.yaml +++ b/helm/block-producer/templates/block-producer.yaml @@ -18,6 +18,7 @@ spec: role: block-producer class: {{ default "undefined" $config.class }} version: {{ trunc 6 (split ":" $.Values.coda.image)._1 | trimSuffix "-" }} + syncStatus: INIT annotations: prometheus.io/scrape: 'true' prometheus.io/port: {{ $.Values.coda.ports.metrics | quote }} @@ -257,7 +258,8 @@ spec: protocol: TCP containerPort: {{ default $.Values.coda.ports.p2p $config.externalPort }} hostPort: {{ default $.Values.coda.ports.external $config.externalPort }} -{{- include "healthcheck.daemon.allChecks" $.Values | indent 8 }} +{{$data := dict "name" $config.name "healthcheck" $.Values.healthcheck }} +{{- include "healthcheck.daemon.allChecks" $data | indent 8 }} imagePullPolicy: Always volumeMounts: - name: wallet-keys diff --git a/helm/common/Chart.yaml b/helm/common/Chart.yaml index c13bebdaa28..eb0cdd11d2a 100644 --- a/helm/common/Chart.yaml +++ b/helm/common/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: common-utilities description: A Helm chart for Mina Protocol's common chart utilities type: library -version: 0.0.8 +version: 0.0.9 appVersion: 0.0.1 annotations: artifacthub.io/changes: | diff --git a/helm/common/templates/_healthchecks.tpl b/helm/common/templates/_healthchecks.tpl index e3057cb3449..71c44948a0e 100644 --- a/helm/common/templates/_healthchecks.tpl +++ b/helm/common/templates/_healthchecks.tpl @@ -39,7 +39,7 @@ readinessProbe: command: [ "/bin/bash", "-c", - "source /healthcheck/utilities.sh && isDaemonSynced" + "source /healthcheck/utilities.sh && isDaemonSynced && updateSyncStatusLabel {{ .name }} " ] {{- include "healthcheck.common.settings" . | indent 2 }} {{- end }} diff --git a/helm/seed-node/Chart.yaml b/helm/seed-node/Chart.yaml index d1cae3ce157..0f249d956cc 100644 --- a/helm/seed-node/Chart.yaml +++ b/helm/seed-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: seed-node description: A Helm chart for Mina Protocol's seed nodes type: application -version: 1.0.3 +version: 1.0.4 appVersion: 1.16.0 annotations: artifacthub.io/changes: | @@ -10,7 +10,7 @@ annotations: - Add maxConnections value of 200 dependencies: - name: common-utilities - version: 0.0.8 + version: 0.0.9 repository: "https://coda-charts.storage.googleapis.com" icon: https://storage.googleapis.com/coda-charts/Mina_Icon_Secondary_RGB_Black.png keywords: diff --git a/helm/seed-node/charts/common-utilities-0.0.8.tgz b/helm/seed-node/charts/common-utilities-0.0.8.tgz deleted file mode 100644 index efe156691de..00000000000 Binary files a/helm/seed-node/charts/common-utilities-0.0.8.tgz and /dev/null differ diff --git a/helm/seed-node/charts/common-utilities-0.0.9.tgz b/helm/seed-node/charts/common-utilities-0.0.9.tgz new file mode 100644 index 00000000000..46cefc1be29 Binary files /dev/null and b/helm/seed-node/charts/common-utilities-0.0.9.tgz differ diff --git a/helm/seed-node/templates/_healthchecks.tpl b/helm/seed-node/templates/_healthchecks.tpl index e6a80bbb277..44c49429a53 100644 --- a/helm/seed-node/templates/_healthchecks.tpl +++ b/helm/seed-node/templates/_healthchecks.tpl @@ -23,7 +23,7 @@ readinessProbe: command: [ "/bin/bash", "-c", - "source /healthcheck/utilities.sh && isDaemonSynced && peerCountGreaterThan 0" + "source /healthcheck/utilities.sh && isDaemonSynced && peerCountGreaterThan 0 && updateSyncStatusLabel {{ .name }}" ] {{- end }} diff --git a/helm/seed-node/templates/seed-node.yaml b/helm/seed-node/templates/seed-node.yaml index 12b6f2d7f9c..139353f13e9 100644 --- a/helm/seed-node/templates/seed-node.yaml +++ b/helm/seed-node/templates/seed-node.yaml @@ -18,6 +18,7 @@ spec: role: seed class: {{ default "undefined" $config.class }} version: {{ trunc 6 (split ":" $.Values.coda.image)._1 | trimSuffix "-" }} + syncStatus: INIT annotations: prometheus.io/scrape: 'true' prometheus.io/port: {{ $.Values.coda.ports.metrics | quote }} @@ -121,7 +122,8 @@ spec: protocol: TCP containerPort: {{ default $.Values.coda.ports.p2p $config.externalPort }} hostPort: {{ default $.Values.coda.ports.external $config.externalPort }} -{{- include "healthcheck.seed.allChecks" $.Values | indent 8 }} +{{$data := dict "name" $config.name "healthcheck" $.Values.healthcheck }} +{{- include "healthcheck.seed.allChecks" $data | indent 8 }} imagePullPolicy: Always volumeMounts: {{- if $config.libp2pSecret }} diff --git a/helm/snark-worker/Chart.yaml b/helm/snark-worker/Chart.yaml index 14e894843ae..92dc5ea56ea 100644 --- a/helm/snark-worker/Chart.yaml +++ b/helm/snark-worker/Chart.yaml @@ -2,14 +2,14 @@ apiVersion: v2 name: snark-worker description: A Helm chart for Mina Protocol's SNARK worker nodes type: application -version: 1.0.1 +version: 1.0.2 appVersion: 1.16.0 annotations: artifacthub.io/changes: | - enable daemon blockchain archival capability dependencies: - name: common-utilities - version: 0.0.8 + version: 0.0.9 repository: "https://coda-charts.storage.googleapis.com" icon: https://storage.googleapis.com/coda-charts/Mina_Icon_Secondary_RGB_Black.png keywords: diff --git a/helm/snark-worker/charts/common-utilities-0.0.8.tgz b/helm/snark-worker/charts/common-utilities-0.0.8.tgz deleted file mode 100644 index efe156691de..00000000000 Binary files a/helm/snark-worker/charts/common-utilities-0.0.8.tgz and /dev/null differ diff --git a/helm/snark-worker/charts/common-utilities-0.0.9.tgz b/helm/snark-worker/charts/common-utilities-0.0.9.tgz new file mode 100644 index 00000000000..46cefc1be29 Binary files /dev/null and b/helm/snark-worker/charts/common-utilities-0.0.9.tgz differ diff --git a/helm/snark-worker/templates/_healthchecks.tpl b/helm/snark-worker/templates/_healthchecks.tpl index 7f67659cc94..23e9c9b7c18 100644 --- a/helm/snark-worker/templates/_healthchecks.tpl +++ b/helm/snark-worker/templates/_healthchecks.tpl @@ -23,7 +23,7 @@ readinessProbe: command: [ "/bin/bash", "-c", - "source /healthcheck/utilities.sh && isDaemonSynced && hasSnarkWorker" + "source /healthcheck/utilities.sh && isDaemonSynced && hasSnarkWorker && updateSyncStatusLabel {{ .name }}" ] {{- end }} diff --git a/helm/snark-worker/templates/snark-coordinator.yaml b/helm/snark-worker/templates/snark-coordinator.yaml index ca859310302..23ec86e37b6 100644 --- a/helm/snark-worker/templates/snark-coordinator.yaml +++ b/helm/snark-worker/templates/snark-coordinator.yaml @@ -17,6 +17,7 @@ spec: testnet: {{ .Values.testnetName }} role: snark-coordinator version: {{ trunc 6 (split ":" .Values.coda.image)._1 | trimSuffix "-" }} + syncStatus: INIT annotations: prometheus.io/scrape: 'true' prometheus.io/port: {{ .Values.coda.ports.metrics | quote }} @@ -92,7 +93,9 @@ spec: protocol: TCP containerPort: {{ .Values.coda.ports.p2p }} hostPort: {{ .Values.coda.ports.p2p }} -{{- include "healthcheck.snarkCoordinator.allChecks" .Values | indent 8 }} +{{$name := tpl .Values.coordinator.fullname . }} +{{$data := dict "name" $name "healthcheck" $.Values.healthcheck }} +{{- include "healthcheck.snarkCoordinator.allChecks" $data | indent 8 }} imagePullPolicy: Always {{- if .Values.coda.runtimeConfig }} volumeMounts: diff --git a/helm/watchdog/Chart.yaml b/helm/watchdog/Chart.yaml index 8bfa806d4e9..7ab94b52dba 100644 --- a/helm/watchdog/Chart.yaml +++ b/helm/watchdog/Chart.yaml @@ -10,7 +10,7 @@ annotations: - add CHANGELOG.md for chart version => changelog tracking dependencies: - name: common-utilities - version: 0.0.7 + version: 0.0.9 repository: "https://coda-charts.storage.googleapis.com" icon: https://storage.googleapis.com/coda-charts/Mina_Icon_Secondary_RGB_Black.png keywords: diff --git a/helm/watchdog/charts/common-utilities-0.0.7.tgz b/helm/watchdog/charts/common-utilities-0.0.7.tgz deleted file mode 100644 index 592b7b88501..00000000000 Binary files a/helm/watchdog/charts/common-utilities-0.0.7.tgz and /dev/null differ diff --git a/helm/watchdog/charts/common-utilities-0.0.9.tgz b/helm/watchdog/charts/common-utilities-0.0.9.tgz new file mode 100644 index 00000000000..46cefc1be29 Binary files /dev/null and b/helm/watchdog/charts/common-utilities-0.0.9.tgz differ