# Cloudflare Tunnel Configuration for Proxmox Site 2 (EU-West)
# This tunnel connects Proxmox cluster to Cloudflare

tunnel: proxmox-site-2-tunnel
credentials-file: /etc/cloudflared/proxmox-site-2-tunnel.json

ingress:
  # Proxmox Web UI
  - hostname: r630-01.sankofa.nexus
    service: https://192.168.11.11:8006
    originRequest:
      noHappyEyeballs: true
      connectTimeout: 30s
      tls:
        skipVerify: true
      httpHostHeader: R630-01:8006

  # Proxmox API
  - hostname: r630-01-api.sankofa.nexus
    service: https://192.168.11.11:8006
    originRequest:
      noHappyEyeballs: true
      connectTimeout: 30s
      tls:
        skipVerify: true
      httpHostHeader: R630-01:8006

  # Proxmox Node 2
  - hostname: pve5.sankofa.nexus
    service: https://192.168.11.11:8006
    originRequest:
      noHappyEyeballs: true
      connectTimeout: 30s
      tls:
        skipVerify: true
      httpHostHeader: pve5.sankofa.nexus:8006

  # Proxmox Node 3
  - hostname: pve6.sankofa.nexus
    service: https://192.168.11.11:8006
    originRequest:
      noHappyEyeballs: true
      connectTimeout: 30s
      tls:
        skipVerify: true
      httpHostHeader: pve6.sankofa.nexus:8006

  # Prometheus Exporter
  - hostname: r630-01-metrics.sankofa.nexus
    service: http://localhost:9221
    originRequest:
      noHappyEyeballs: true
      connectTimeout: 30s

  # Catch-all rule (must be last)
  - service: http_status:404

# Logging
loglevel: info
logfile: /var/log/cloudflared/proxmox-site-2-tunnel.log

# Metrics
metrics: 0.0.0.0:9092

# Health check
health-probe:
  enabled: true
  path: /health
  port: 8080

