Skip to content

Commit

Permalink
add log levels (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
okdas authored Nov 19, 2024
1 parent e489f03 commit f9e024c
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/appgate-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ spec:
- "appgate-server"
- "--keyring-backend={{ .Values.keyringBackend }}"
- "--config=/root/.poktroll/config/config.yaml"
- "--log_level={{ .Values.logs.level }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
Expand Down
3 changes: 3 additions & 0 deletions charts/appgate-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

replicaCount: 1

logs:
level: info

image:
repository: ghcr.io/pokt-network/poktrolld
pullPolicy: IfNotPresent
Expand Down
56 changes: 56 additions & 0 deletions charts/poktroll-validator/templates/scripts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{{ if .Values.scripts.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "poktroll.fullname" . }}-scripts
data:
dev.sh: |-
#!/bin/sh
echo "Running dev.sh"
# Validator state is required to run the node, if it doesn't exist
if [ ! -f /root/.poktroll/data/priv_validator_state.json ]; then
echo '{"height":"0","round":0,"step":0}' > /root/.poktroll/data/priv_validator_state.json
echo 'Generated new priv_validator_state.json'
fi
# ls -la /root/.poktroll/config-src/
mkdir -p /root/.poktroll/config/
cp -r -L /root/.poktroll/config-src/* /root/.poktroll/config/
ls -la /root/.poktroll/config/
echo "\n/root/.poktroll/config/priv_validator_key.json:"
cat /root/.poktroll/config/priv_validator_key.json
echo "\n/root/.poktroll/config/node_key.json:"
cat /root/.poktroll/config/node_key.json
echo "\n/root/.poktroll/config/genesis.json | jq '.validators':"
cat /root/.poktroll/config/genesis.json | jq '.validators'
prod.sh: |-
#!/bin/sh
echo "Running prod.sh"
# Make sure the data directory exists
if [ ! -f /root/.poktroll/data/priv_validator_state.json ]; then
echo '{"height":"0","round":0,"step":0}' > /root/.poktroll/data/priv_validator_state.json
fi
# Put a namespace id in place
echo "{{ .Values.prod.namespace }}" > /root/.poktroll/data/namespace-id
NAMESPACE=$(cat /root/.poktroll/data/namespace-id)
if [ ! -f /root/.poktroll/data/da-block-height ]; then
curl -s https://rpc-mocha.pops.one/block |jq -r '.result.block.header.height' > /root/.poktroll/data/da-block-height
fi
DA_BLOCK_HEIGHT=$(cat /root/.poktroll/data/da-block-height)
mkdir -p /root/.poktroll/config/
cp -r -L /root/.poktroll/config-src/* /root/.poktroll/config/
ls -la /root/.poktroll/config/
echo "\n/root/.poktroll/config/priv_validator_key.json:"
cat /root/.poktroll/config/priv_validator_key.json
echo "\n/root/.poktroll/config/node_key.json:"
cat /root/.poktroll/config/node_key.json
echo "\n/root/.poktroll/config/genesis.json | jq '.validators':"
cat /root/.poktroll/config/genesis.json | jq '.validators'
{{ end }}
1 change: 1 addition & 0 deletions charts/relayminer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ spec:
- "relayminer"
- "--keyring-backend={{ .Values.keyringBackend }}"
- "--config=/root/.poktroll/config/config.yaml"
- "--log_level={{ .Values.logs.level }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
Expand Down
3 changes: 3 additions & 0 deletions charts/relayminer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

replicaCount: 1

logs:
level: info

image:
repository: ghcr.io/pokt-network/poktrolld
pullPolicy: IfNotPresent
Expand Down

0 comments on commit f9e024c

Please sign in to comment.