From b1f5fb6ab601031de48c05e1be42513f441d7289 Mon Sep 17 00:00:00 2001 From: Giacomo Licari Date: Fri, 4 Nov 2022 19:14:59 +0100 Subject: [PATCH] Update k8s sample configs --- Dockerfile | 2 +- examples/kubernetes/configmap.yaml | 2 +- examples/kubernetes/deployment.yaml | 46 +++++++++++++++++++++++++---- examples/kubernetes/secret.yaml | 2 +- 4 files changed, 44 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9b3c0bc2ce..28e33adb55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # The dockerfile is currently still WIP and might be broken -FROM golang:1.18.7 AS build-env +FROM golang:1.18 AS build-env ADD . /src WORKDIR /src RUN go mod download diff --git a/examples/kubernetes/configmap.yaml b/examples/kubernetes/configmap.yaml index b31d17ce10..35918828aa 100644 --- a/examples/kubernetes/configmap.yaml +++ b/examples/kubernetes/configmap.yaml @@ -192,7 +192,7 @@ data: # assert EPOCHS_PER_SYNC_COMMITTEE_PERIOD * SLOTS_PER_EPOCH <= SLOTS_PER_HISTORICAL_ROOT EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 512 tables.sql: | - # Taken from https://github.com/gnosischain/gbc-explorer/blob/update-upstream/tables.sql + # Taken from https://github.com/gobitfly/eth2-beaconchain-explorer/blob/master/tables.sql create extension pg_trgm; /* trigram extension for faster text-search */ /* diff --git a/examples/kubernetes/deployment.yaml b/examples/kubernetes/deployment.yaml index be7a583822..9b778dca6a 100644 --- a/examples/kubernetes/deployment.yaml +++ b/examples/kubernetes/deployment.yaml @@ -1,5 +1,5 @@ # See full list of environment variables: -# https://github.com/gnosischain/gbc-explorer/blob/update-upstream/types/config.go#L8 +# https://github.com/gobitfly/eth2-beaconchain-explorer/blob/master/types/config.go#L8 apiVersion: apps/v1 kind: Deployment metadata: @@ -61,7 +61,7 @@ spec: # mountPath: /gbc/bigtable # readOnly: false - name: explorer - image: ghcr.io/gnosischain/gbc-explorer:update-upstream + image: !!!CHANGEME!!! set registry/project:tag imagePullPolicy: 'Always' # or use IfNotPresent if you stick to a specific version command: ["./explorer"] args: ["--config", "/gbc/config/explorer.config.yml"] @@ -97,9 +97,9 @@ spec: - name: GOOGLE_APPLICATION_CREDENTIALS value: "/tmp/credentials.json" # See full list of environment variables: - # https://github.com/gnosischain/gbc-explorer/blob/update-upstream/types/config.go#L8 + # https://github.com/gobitfly/eth2-beaconchain-explorer/blob/master/types/config.go#L8 - name: statistics - image: ghcr.io/gnosischain/gbc-explorer:update-upstream + image: !!!CHANGEME!!! set registry/project:tag imagePullPolicy: 'Always' command: ["./statistics"] args: ["--config", "/gbc/config/explorer.config.yml"] @@ -132,7 +132,43 @@ spec: - name: GOOGLE_APPLICATION_CREDENTIALS value: "/tmp/credentials.json" # See full list of environment variables: - # https://github.com/gnosischain/gbc-explorer/blob/update-upstream/types/config.go#L8 + # https://github.com/gobitfly/eth2-beaconchain-explorer/blob/master/types/config.go#L8 + ###################################################################################################################### + ## frontend-data-updater is a mandatory service to run, it's responsible for updating info on deposit charts + ## See: https://github.com/gobitfly/eth2-beaconchain-explorer/blob/master/cmd/frontend-data-updater/main.go#L70 + ## + ###################################################################################################################### + - name: data-updater + image: !!!CHANGEME!!! set registry/project:tag + imagePullPolicy: 'Always' + command: ["./frontend-data-updater"] + args: ["--config", "/gbc/config/explorer.config.yml"] + resources: + requests: + cpu: 100m + memory: 250Mi + limits: + cpu: 500m + memory: 500Mi + volumeMounts: + - name: explorer-data + mountPath: /gbc + readOnly: false + - name: explorer-config + mountPath: /gbc/config/config.yml + subPath: config.yml + - name: explorer-config + mountPath: /gbc/config/imprint.html + subPath: imprint.html + - name: explorer + mountPath: /gbc/config/explorer.config.yml + subPath: explorer.config.yml + - name: explorer + mountPath: /tmp/credentials.json + subPath: credentials.json + env: + - name: GOOGLE_APPLICATION_CREDENTIALS + value: "/tmp/credentials.json" volumes: - name: explorer-config configMap: diff --git a/examples/kubernetes/secret.yaml b/examples/kubernetes/secret.yaml index 5b731435e5..fdb4966e18 100644 --- a/examples/kubernetes/secret.yaml +++ b/examples/kubernetes/secret.yaml @@ -25,7 +25,7 @@ stringData: {} explorer.config.yml: | # Alternatively, you can use environment variables: - # https://github.com/gnosischain/gbc-explorer/blob/update-upstream/types/config.go#L8 + # https://github.com/gobitfly/eth2-beaconchain-explorer/blob/master/types/config.go#L8 # Database credentials writerDatabase: user: "DB_USER"