apiVersion: v1
kind: ConfigMap
metadata:
  name: gateway-config
  namespace: api-gateway-system
data:
  traefik.yml: |
    http:
      serversTransports:
        insecure:
          insecureSkipVerify: true
        tmaxcloud:
          serverName: tmax-cloud
          rootCAs:
            - /run/secrets/tmaxcloud/ca.crt
        kubernetes:
          rootCAs:
            - /run/secrets/kubernetes.io/serviceaccount/ca.crt
      middlewares:
        dashboard-auth:
          basicAuth:
            users:
              - "admin:$apr1$WboCaB7Z$PJbsvKlI3XMq12xMeQMmG."
        jwt-decode-auth:
          forwardAuth:
            address: "http://jwt-decode-auth.api-gateway-system.svc:8080"
            authResponseHeaders:
              - jwt-token-validated
              - Authorization
            trustForwardHeader: true
            tls:
              insecureSkipVerify: true
        cors-header:
          headers:
            accessControlAllowMethods:
              - "*"
            accessControlAllowHeaders:
              - "*"
            accessControlMaxAge: 100
            addVaryHeader: true
        hypercloud-stripprefix:
          stripPrefix:
            prefixes:
              - "/api/hypercloud"
              - "/api/multi-hypercloud"
              - "/api/webhook"
        kubernetes-stripprefix:
          stripPrefix:
            prefixes:
              - "/api/kubernetes"
            forceSlash: true
        monitoring-stripprefix:
          stripPrefix:
            prefixes:
              - "/api/prometheus"
              - "/api/alertmanager"
        monitoring-stripprefix-tenancy:
          stripPrefix:
            prefixes:
              - "/api/prometheus-tenancy"