apiVersion: v1
kind: ConfigMap
metadata:
  name: consul-cluster-config
data:
  server.json: |
    {
        "datacenter": "dc1",
        "server": true,
        "bootstrap_expect": 3,
        "retry_join": ["consul.default.svc.cluster.local"],
        "acl": {
            "enabled": true,
            "default_policy": "deny",
            "down_policy": "extend-cache",
            "tokens": {
              "master": "498073a8-5091-4e9e-871a-bbbeb030d1f6"
            }
        },
        "client_addr": "0.0.0.0",
        "ui": true,
        "data_dir": "/consul/data",
        "telemetry": {
          "prometheus_retention_time": "24h"
        },
        "encrypt": "67a5zAZfzlw8zbqhouYJA/vhT/+2g0Gan+/EkyRTUEc=",
        "verify_incoming": true,
        "verify_outgoing": true,
        "verify_server_hostname": true,
        "ca_file": "/consul/ca/consul-agent-ca.pem",
        "cert_file": "/consul/ca/node-pub.pem",
        "key_file": "/consul/ca/node-key.pem",
        "ports": {
          "http": -1,
          "https": 8501
        },
        "log_level": "INFO",
        "leave_on_terminate": true,
        "rejoin_after_leave": true
    }