Skip to content

Commit

Permalink
add kube config
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Jun 25, 2024
1 parent 02ee645 commit f47b8c2
Show file tree
Hide file tree
Showing 65 changed files with 1,701 additions and 1 deletion.
23 changes: 23 additions & 0 deletions kubernetes/devnet-1/beacon-metrics-gazer/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
6 changes: 6 additions & 0 deletions kubernetes/devnet-1/beacon-metrics-gazer/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: beacon-metrics-gazer
repository: https://ethpandaops.github.io/ethereum-helm-charts
version: 0.1.3
digest: sha256:25670c466402ba0216633aa1bea24a43329fac709a6c633bba91c5663620c2cc
generated: "2024-06-25T14:38:42.585078+02:00"
11 changes: 11 additions & 0 deletions kubernetes/devnet-1/beacon-metrics-gazer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ansible managed. Don't change this file manually. Template info: /vendor/collections/ansible_collections/ethpandaops/general/roles/generate_kubernetes_config/templates/Chart.yaml.j2

apiVersion: v2
name: beacon-metrics-gazer
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
dependencies:
- name: beacon-metrics-gazer
repository: https://ethpandaops.github.io/ethereum-helm-charts
version: 0.1.3
Binary file not shown.
57 changes: 57 additions & 0 deletions kubernetes/devnet-1/beacon-metrics-gazer/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Ansible managed. Don't change this file manually. Template info: /vendor/collections/ansible_collections/ethpandaops/general/roles/generate_kubernetes_config/templates/beacon-metrics-gazer.yaml.j2

beacon-metrics-gazer:
image:
repository: dapplion/beacon-metrics-gazer
tag: latest
pullPolicy: Always
fullnameOverride: beacon-metrics-gazer
resources:
requests:
cpu: 68m
memory: 128Mi
limits:
cpu: 128m
memory: 256Mi

serviceMonitor:
enabled: true
labels:
vmagent: common
network: "peerdas-devnet-1"

customCommand:
- /beacon-metrics-gazer
- http://teku-geth-001:5052
- --ranges-file
- /custom-config/ranges.yaml
- --port
- "8080"
- --address
- "0.0.0.0"

extraVolumes:
- name: custom-config
emptyDir: {}
extraVolumeMounts:
- name: custom-config
mountPath: "/custom-config"

initContainers:
- name: init-config
image: alpine:latest
imagePullPolicy: IfNotPresent
securityContext:
runAsNonRoot: false
runAsUser: 0
command:
- sh
- -ace
- >
apk update && apk add curl yq;
curl -s https://config.peerdas-devnet-1.ethpandaops.io/api/v1/nodes/validator-ranges | yq '.ranges' -P > /custom-config/ranges.yaml;
echo "====== init done ======";
cat /custom-config/ranges.yaml;
volumeMounts:
- name: custom-config
mountPath: "/custom-config"
23 changes: 23 additions & 0 deletions kubernetes/devnet-1/blockscout/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
6 changes: 6 additions & 0 deletions kubernetes/devnet-1/blockscout/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: blockscout
repository: https://ethpandaops.github.io/ethereum-helm-charts
version: 0.2.1
digest: sha256:85a3bfc3aa5db7beb16b64e3600cb99029de7f87137203324f26740b7c18468e
generated: "2024-06-25T14:39:21.121321+02:00"
11 changes: 11 additions & 0 deletions kubernetes/devnet-1/blockscout/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ansible managed. Don't change this file manually. Template info: /vendor/collections/ansible_collections/ethpandaops/general/roles/generate_kubernetes_config/templates/Chart.yaml.j2

apiVersion: v2
name: blockscout
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
dependencies:
- name: blockscout
repository: https://ethpandaops.github.io/ethereum-helm-charts
version: 0.2.1
Binary file not shown.
82 changes: 82 additions & 0 deletions kubernetes/devnet-1/blockscout/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Ansible managed. Don't change this file manually. Template info: /vendor/collections/ansible_collections/ethpandaops/general/roles/generate_kubernetes_config/templates/blockscout.yaml.j2

blockscout:
fullnameOverride: blockscout

image:
repository: blockscout/blockscout
tag: master
pullPolicy: IfNotPresent
podAnnotations:
"promtail.io/ignore_pod": "true"
resources:
requests:
cpu: 2000m
memory: 2Gi
limits:
cpu: 2000m
memory: 6Gi

ingress:
enabled: true
className: ingress-nginx-public
hosts:
- host: explorer.peerdas-devnet-1.ethpandaops.io
paths:
- path: /
pathType: Prefix

config:
COIN: ETH
DATABASE_URL: postgres://postgres:postgres@blockscout-postgresql:5432/blockscout?ssl=false
DISABLE_EXCHANGE_RATES: "true"
DISABLE_KNOWN_TOKENS: "true"
SHOW_PRICE_CHART: "false"
ENABLE_1559_SUPPORT: "true"
DISABLE_READ_API: "false"
DISABLE_WRITE_API: "true"
ENABLE_TXS_STATS: "true"
ECTO_USE_SSL: "false"
SHOW_TXS_CHART: "true"
ETHEREUM_JSONRPC_VARIANT: "geth"
ETHEREUM_JSONRPC_HTTP_URL: http://geth-teku-001:8545
ETHEREUM_JSONRPC_WS_URL: ws://geth-teku-001:8546
ETHEREUM_JSONRPC_TRACE_URL: http://geth-teku-001:8545
INDEXER_COIN_BALANCES_BATCH_SIZE: "5"
NETWORK: Ethereum
SUBNETWORK: peerdas-devnet-1
BLOCK_TRANSFORMER: base
POOL_SIZE: "15"
CHAIN_SPEC_PATH: /config-update/chainspec.json
extraVolumes:
- name: config-update
emptyDir: {}

extraVolumeMounts:
- name: config-update
mountPath: "/config-update"

initContainers:
- name: init-config
image: alpine:latest
imagePullPolicy: IfNotPresent
securityContext:
runAsNonRoot: false
runAsUser: 0
command:
- sh
- -ace
- >
CHAINSPEC=https://config.peerdas-devnet-1.ethpandaops.io/el/chainspec.json;
mkdir -p /config-update;
wget -O /config-update/chainspec.json $CHAINSPEC;
echo "got genesis";
volumeMounts:
- name: config-update
mountPath: /config-update

serviceMonitor:
enabled: true

postgresql:
fullnameOverride: blockscout-postgresql
23 changes: 23 additions & 0 deletions kubernetes/devnet-1/checkpointz/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
6 changes: 6 additions & 0 deletions kubernetes/devnet-1/checkpointz/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: checkpointz
repository: https://ethpandaops.github.io/ethereum-helm-charts
version: 0.1.3
digest: sha256:9eceb3eb5bb940e21ad6256c1258227069c421ccb29cae6c09005783826cece4
generated: "2024-06-25T14:39:36.275589+02:00"
11 changes: 11 additions & 0 deletions kubernetes/devnet-1/checkpointz/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ansible managed. Don't change this file manually. Template info: /vendor/collections/ansible_collections/ethpandaops/general/roles/generate_kubernetes_config/templates/Chart.yaml.j2

apiVersion: v2
name: checkpointz
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
dependencies:
- name: checkpointz
repository: https://ethpandaops.github.io/ethereum-helm-charts
version: 0.1.3
Binary file not shown.
80 changes: 80 additions & 0 deletions kubernetes/devnet-1/checkpointz/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Ansible managed. Don't change this file manually. Template info: /vendor/collections/ansible_collections/ethpandaops/general/roles/generate_kubernetes_config/templates/checkpointz.yaml.j2

checkpointz:
fullnameOverride: checkpointz
replicas: 1

image:
repository: ethpandaops/checkpointz
tag: latest
pullPolicy: Always
resources:
requests:
cpu: 64m
memory: 256Mi
ingress:
enabled: true
className: ingress-nginx-public
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
hosts:
- host: checkpoint-sync.peerdas-devnet-1.ethpandaops.io
paths:
- path: /
pathType: Prefix

tls:
- hosts:
- checkpoint-sync.peerdas-devnet-1.ethpandaops.io
secretName: peerdas-devnet-1-checkpoint-sync-tls

config:
global:
listenAddr: ":5555"
logging: "info" # panic,fatal,warm,info,debug,trace
metricsAddr: ":9090"

checkpointz:
mode: full
caches:
blocks:
max_items: 100
states:
max_items: 5
historical_epoch_count: 20

beacon:
upstreams:
- name: rpc-teku-geth-001
address: http://teku-geth-001:5052
dataProvider: true
- name: bootnode-1
address: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.peerdas-devnets.node_ingress.combined}>@bn.bootnode-1.peerdas-devnet-1.ethpandaops.io
dataProvider: true
- name: lighthouse-geth-1
address: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.peerdas-devnets.node_ingress.combined}>@bn.lighthouse-geth-1.peerdas-devnet-1.ethpandaops.io
dataProvider: true
- name: lighthouse-geth-2
address: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.peerdas-devnets.node_ingress.combined}>@bn.lighthouse-geth-2.peerdas-devnet-1.ethpandaops.io
dataProvider: true
- name: lighthouse-geth-3
address: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.peerdas-devnets.node_ingress.combined}>@bn.lighthouse-geth-3.peerdas-devnet-1.ethpandaops.io
dataProvider: true
- name: prysm-geth-1
address: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.peerdas-devnets.node_ingress.combined}>@bn.prysm-geth-1.peerdas-devnet-1.ethpandaops.io
dataProvider: true
- name: prysm-geth-2
address: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.peerdas-devnets.node_ingress.combined}>@bn.prysm-geth-2.peerdas-devnet-1.ethpandaops.io
dataProvider: true
- name: prysm-geth-3
address: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.peerdas-devnets.node_ingress.combined}>@bn.prysm-geth-3.peerdas-devnet-1.ethpandaops.io
dataProvider: true
- name: teku-geth-1
address: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.peerdas-devnets.node_ingress.combined}>@bn.teku-geth-1.peerdas-devnet-1.ethpandaops.io
dataProvider: true
- name: teku-geth-2
address: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.peerdas-devnets.node_ingress.combined}>@bn.teku-geth-2.peerdas-devnet-1.ethpandaops.io
dataProvider: true
- name: teku-geth-3
address: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.peerdas-devnets.node_ingress.combined}>@bn.teku-geth-3.peerdas-devnet-1.ethpandaops.io
dataProvider: true
43 changes: 43 additions & 0 deletions kubernetes/devnet-1/config/templates/ingress.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{- if .Values.config.enabled }}
{{- $uniqueUpstreams := dict }}
{{- range .Values.config.files }}
{{- $uniqueUpstreams = set $uniqueUpstreams .upstream "" }}
{{- end }}

{{- range keys $uniqueUpstreams }}
---
kind: Service
apiVersion: v1
metadata:
name: external-{{ . | replace "." "-" | lower | trunc 63 }}
spec:
type: ExternalName
externalName: {{ . }}
{{- end }}

{{- range .Values.config.files }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-config-{{ .path | replace "/" "-" | replace "." "-" | replace "_" "-" | lower }}
annotations:
kubernetes.io/ingress.class: ingress-nginx-public
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/upstream-vhost: "{{ .upstream }}"
nginx.ingress.kubernetes.io/rewrite-target: "{{ .target }}"
spec:
rules:
- host: "config.{{ $.Values.domain }}"
http:
paths:
- path: {{ .path }}
pathType: Exact
backend:
service:
name: external-{{ .upstream | replace "." "-" | lower | trunc 63 }}
port:
number: 443
{{- end }}
{{- end }}
Loading

0 comments on commit f47b8c2

Please sign in to comment.