Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GETH command options as k8s ConfigMap? #350

Closed
khteh opened this issue Jan 20, 2025 · 3 comments
Closed

GETH command options as k8s ConfigMap? #350

khteh opened this issue Jan 20, 2025 · 3 comments

Comments

@khteh
Copy link

khteh commented Jan 20, 2025

ethereum/go-ethereum#31034 (comment)

How to configure all the command options as k8s ConfigMap?

    spec:
      containers:
        - name: geth
          image: ethereum/client-go:v1.14.12
          imagePullPolicy: Always
          args:
            - --holesky
            - --http
            - --http.addr=0.0.0.0
            - --http.vhosts=geth
            - --ws
            - --ws.addr=0.0.0.0
            - --authrpc.jwtsecret=/tmp/jwtsecret
            - --datadir=/data

I would love these to be organized into ConfigMap instead of in the STS manifest file. Actually, if you have a sample .toml file used with --config for all the options defined in https://github.com/ethpandaops/ethereum-helm-charts/blob/master/charts/geth/values.yaml that will be helpful.

@skylenet
Copy link
Member

Geth allows setting most of its configuration also via env vars . Check out geth --help to know each individual ENV var that maps to a flag. For example --http.addr maps to GETH_HTTP_ADDR.

So with that, you could have a configmap with env vars defined. And then just use envFromthe configmap. example:

apiVersion: v1
kind: ConfigMap
metadata:
  name: geth-config
data:
  GETH_HTTP_ADDR: "0.0.0.0"
  ...
  more flags..
apiVersion: v1
kind: Pod
metadata:
  name: geth
spec:
  containers:
    - name: geth
      image: ethereum/client-go:v1.14.12
      envFrom:
      - configMapRef:
          name: geth-config
  restartPolicy: Never

@khteh
Copy link
Author

khteh commented Jan 20, 2025

Where can I find more information on the ports, which ports are used for what purpose?

# -- P2P Port
p2pPort: 30303

# -- HTTP Port
httpPort: 8545

# -- WS Port
wsPort: 8545

# -- Engine Port (Auth Port)
authPort: 8551

@khteh
Copy link
Author

khteh commented Jan 21, 2025

Thanks.

@khteh khteh closed this as completed Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants