apiVersion: v1
kind: ConfigMap
metadata:
  name: spire-agent-config
data:
  agent.conf: |
    agent {
      bind_address = "0.0.0.0"
      bind_port = "8080"
      data_dir = "/spire/socket"
      log_level = "DEBUG"
      server_address = "spire-server"
      server_port = "8081"
      socket_path ="/spire/socket/agent.sock"
      trust_bundle_path = "/spire/secrets/upstream-ca.pem"
      trust_domain = "cloudid.qaware.de"
      umask = ""
      join_token = ""
    }
    plugins {
      KeyManager "memory" {
        enabled = true
        plugin_cmd = "/opt/spire/plugin/agent/keymanager-memory"
        plugin_data {}
      }
      WorkloadAttestor "k8s" {
        enabled = true
        plugin_cmd = "/opt/spire/plugin/agent/workloadattestor-k8s"
        plugin_data {
            kubelet_read_only_port = "10255"
        }
      }
      NodeAttestor "join_token" {
        enabled = true
        plugin_cmd = "/opt/spire/plugin/agent/nodeattestor-jointoken"
        plugin_data {
          trust_domain = "cloudid.qaware.de"
        }
      }
      WorkloadAttestor "secret_file" {
        enabled = true
        plugin_cmd = "/opt/spire/plugin/agent/workloadattestor-secretfile"
        plugin_data { }
      }
      WorkloadAttestor "unix" {
        enabled = true
        plugin_cmd = "/opt/spire/plugin/agent/workloadattestor-unix"
        plugin_data { }
      }
    }
