apiVersion: v1
kind: ConfigMap
metadata:
  name: spire-server-config
data:
  server.conf: |
    server {
      bind_address = "0.0.0.0"
      bind_port = "8081"
      bind_http_port = "8080"
      trust_domain = "cloudid.qaware.de"
      log_level = "DEBUG"
      base_svid_ttl = 999999
      umask = ""
    }
    plugins {
      ControlPlaneCA "memory" {
        enabled = true
        plugin_cmd = "/opt/spire/plugin/server/ca-memory"
        plugin_data {
          trust_domain = "cloudid.qaware.de",
          key_size = 2048,
          backdate_seconds = 1,
          default_ttl = 3600,
          cert_subject = {
            Country = ["de"],
            Organization = ["qaware"],
            CommonName = "cloudid"
          }
        }
      }
      DataStore "sqlite" {
        enabled = true
        plugin_cmd = "/opt/spire/plugin/server/datastore-sqlite"
        plugin_data {
          fileName = "/spire/datastore/datastore.sqlite"
        }
      }
      NodeAttestor "jointoken" {
        enabled = true
        plugin_cmd = "/opt/spire/plugin/server/nodeattestor-jointoken"
        plugin_data {
          trust_domain = "cloudid.qaware.de"
        }
      }
      NodeResolver "noop" {
        enabled = true
        plugin_cmd = "/opt/spire/plugin/server/noderesolver-noop"
        plugin_data {}
      }
      UpstreamCA "disk" {
        plugin_cmd = "/opt/spire/plugin/server/upstreamca-memory"
        enabled = true
        plugin_data {
          trust_domain = "cloudid.qaware.de"
          ttl = "1h"
          key_file_path = "/spire/secrets/ca-key.pem"
          cert_file_path = "/spire/secrets/ca.pem"
        }
      }
    }
