apiVersion: v1
kind: ConfigMap
metadata:
  name: kafka-devops-ccloud-environment
  labels:
    destination: ccloud
data:
  environments: |
    [
      {
        "name": "kafka-devops-prd",
        "schema-registry": {
          "cloud": "gcp",
          "geo": "us",
          "api-key": [
            { "service-account": "kafka-devops-sr-client" }
          ]
        },
        "kafka": [
          {
            "name": "microservices-orders",
            "cloud": "gcp",
            "region": "us-central1",
            "topic": [
              { "name": "bronze", "partitions": 3 },
              { "name": "gold", "partitions": 3 },
              { "name": "silver", "partitions": 3  },
              { "name": "platinum", "partitions": 3 },
              { "name": "customers", "partitions": 3 },
              { "name": "orders", "partitions": 3 },
              { "name": "orders-enriched", "partitions": 3 },
              { "name": "order-validations", "partitions": 3 },
              { "name": "payments", "partitions": 3 },
              { "name": "warehouse-inventory", "partitions": 3 },
              { "name": "connect-configs", "partitions": 1, "config": "cleanup.policy=compact" },
              { "name": "connect-offsets", "partitions": 6, "config": "cleanup.policy=compact" },
              { "name": "connect-statuses", "partitions": 1, "config": "cleanup.policy=compact" },
              { "name": "_confluent-monitoring" },
              { "name": "_confluent-command" }
            ],
            "acl": [
              {
                "service-account": "microservices-orders-client",
                "controls": [
                  { "operation" : "read,write,create,describe,describe-configs,delete", "permission": "allow",
                    "resource": "topic", "name": "*" },
                  { "operation" : "read,write,create", "permission": "allow",
                    "resource": "consumer-group", "name": "OrdersService" },
                  { "operation" : "read,write,create", "permission": "allow",
                    "resource": "consumer-group", "name": "InventoryService" },
                  { "operation" : "read,write,create", "permission": "allow",
                    "resource": "consumer-group", "name": "FraudService" },
                  { "operation" : "read,write,create", "permission": "allow",
                    "resource": "consumer-group", "name": "OrderDetailsService" },
                  { "operation" : "read,write,create", "permission": "allow",
                    "resource": "consumer-group", "name": "ValidationsAggregatorService" },
                  { "operation" : "read,write,create", "permission": "allow",
                    "resource": "consumer-group", "name": "EmailService" },
                  { "operation" : "write,describe", "permission": "allow",
                    "resource": "transactional-id", "name": "*" },
                  { "operation" : "idempotent-write", "permission": "allow",
                    "resource": "cluster-scope" }
                ]
              },
              {
                "service-account": "connect-worker-client",
                "controls": [
                  { "operation" : "read,write", "permission": "allow",
                    "resource": "topic", "name": "*", "prefix": "true" },
                  { "operation" : "read", "permission": "allow",
                    "resource": "consumer-group", "name": "kafka-devops-connect" },
                  { "operation" : "describe", "permission": "allow",
                    "resource": "cluster-scope" }
                ]
              }
            ],
            "api-key": [
              { "service-account": "microservices-orders-client" },
              { "service-account": "connect-worker-client" }
            ]
          }
        ]
      }
    ]

