# Default values for besu-network
# This is a YAML-formatted file.

global:
  namespace: besu-network
  chainId: 138
  image:
    repository: hyperledger/besu
    tag: "23.10.0"
    pullPolicy: IfNotPresent

# Validator configuration
validators:
  enabled: true
  replicas: 4
  nodeSelector:
    pool: validators
    role: validator
  tolerations:
    - key: role
      operator: Equal
      value: validator
      effect: NoSchedule
  resources:
    requests:
      cpu: "2"
      memory: "4Gi"
    limits:
      cpu: "4"
      memory: "8Gi"
  storage:
    size: 512Gi
    storageClass: managed-premium
  config:
    p2pPort: 30303
    syncMode: "FULL"
    rpcEnabled: false
    metricsEnabled: true
    metricsPort: 9545
    rpcPort: 8545

# Sentry configuration
sentries:
  enabled: true
  replicas: 3
  nodeSelector:
    pool: sentries
    role: sentry
  resources:
    requests:
      cpu: "2"
      memory: "4Gi"
    limits:
      cpu: "4"
      memory: "8Gi"
  storage:
    size: 256Gi
    storageClass: managed-premium
  config:
    p2pPort: 30303
    syncMode: "FULL"
    rpcEnabled: true
    rpcHost: "127.0.0.1"
    rpcPort: 8545
    wsPort: 8546
    metricsEnabled: true
    metricsPort: 9545

# RPC configuration
rpc:
  enabled: true
  replicas: 3
  nodeSelector:
    pool: rpc
    role: rpc
  resources:
    requests:
      cpu: "4"
      memory: "8Gi"
    limits:
      cpu: "8"
      memory: "16Gi"
  storage:
    size: 256Gi
    storageClass: managed-premium
  config:
    p2pEnabled: false
    syncMode: "SNAP"
    rpcEnabled: true
    rpcHost: "0.0.0.0"
    rpcPort: 8545
    wsPort: 8546
    metricsEnabled: true
    metricsPort: 9545
    corsOrigins: ["*"]
    hostAllowlist: ["*"]

# Genesis configuration
genesis:
  chainId: 138
  blockPeriod: 2
  epochLength: 30000
  requestTimeout: 10
  gasLimit: "0x1c9c380"

# Permissioning
permissioning:
  nodes:
    enabled: true
    allowlist: []
  accounts:
    enabled: true
    allowlist: []

# Service configuration
service:
  validators:
    type: ClusterIP
    clusterIP: None
  sentries:
    type: LoadBalancer
  rpc:
    type: ClusterIP
  gateway:
    type: LoadBalancer

# Pod Disruption Budget
pdb:
  validators:
    minAvailable: 3
  sentries:
    minAvailable: 2
  rpc:
    minAvailable: 2

# Monitoring
monitoring:
  enabled: true
  serviceMonitor:
    enabled: true

# Secrets (should be managed via Azure Key Vault)
secrets:
  validatorKeys:
    secretName: besu-validator-keys
  oracleKeys:
    secretName: besu-oracle-keys

