apiVersion: v1
kind: ConfigMap
metadata:
  name: spire-agent
  namespace: spire
data:
  agent.conf: |
    agent {
      data_dir = "/run/spire"
      log_level = "DEBUG"
      server_address = "spire-server"
      server_port = "8081"
      socket_path = "/run/spire/sockets/agent.sock"
      trust_bundle_path = "/run/spire/bundle/bundle.crt"
      trust_domain = "{{ .Values.spire.trust_domain }}"
      enable_sds = true
    }
    plugins {
      NodeAttestor "k8s_sat" {
        plugin_data {
          cluster = "{{ .Values.k8s.cluster_name }}"
        }
      }
      KeyManager "memory" {
        plugin_data {
        }
      }
      WorkloadAttestor "k8s" {
        plugin_data {
          skip_kubelet_verification = false
        }
      }
      WorkloadAttestor "unix" {
          plugin_data {
          }
      }
    }
