Skip to content

Commit

Permalink
Update k8s sample configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Licari committed Nov 4, 2022
1 parent 480f7ba commit b1f5fb6
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
/*
Expand Down
46 changes: 41 additions & 5 deletions examples/kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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"]
Expand Down Expand Up @@ -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"]
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b1f5fb6

Please sign in to comment.