apiVersion: v1
kind: ConfigMap
metadata:
  name: consul-server-config
data:
  server.json: |
    {
        "datacenter": "dc1",
        "server": true,
        "bootstrap_expect": 3,
        "retry_join": ["consul.default.svc.cluster.local"],
        "client_addr": "0.0.0.0",
        "ui": true,
        "data_dir": "/consul/data",
        "telemetry": {
          "prometheus_retention_time": "24h"
        },
        "log_level": "INFO",
        "leave_on_terminate": true,
        "rejoin_after_leave": true
    }