{
  "description": "EventConfig is the Schema for the eventconfigs API.\nIt provides configuration for the event operator, including the configuration backend\nconnection and OAuth2 authentication settings.",
  "properties": {
    "apiVersion": {
      "type": "string",
      "description": "Must be \"event.cp.ei.telekom.de/v1\".",
      "const": "event.cp.ei.telekom.de/v1"
    },
    "kind": {
      "type": "string",
      "description": "Must be \"EventConfig\".",
      "const": "EventConfig"
    },
    "metadata": {
      "type": "object",
      "description": "Standard Kubernetes object metadata. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name must be unique within a namespace. Is required when creating resources."
        },
        "namespace": {
          "type": "string",
          "description": "Namespace defines the space within which each name must be unique."
        },
        "labels": {
          "type": "object",
          "description": "Map of string keys and values that can be used to organize and categorize objects.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "annotations": {
          "type": "object",
          "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "generateName": {
          "type": "string",
          "description": "GenerateName is an optional prefix, used by the server, to generate a unique name only if the Name field has not been provided."
        }
      }
    },
    "spec": {
      "description": "EventConfigSpec defines the desired state of EventConfig.",
      "properties": {
        "admin": {
          "description": "Admin configures the connection to the configuration backend.",
          "properties": {
            "client": {
              "description": "Client configures the identity client used for admin access to the configuration backend.",
              "properties": {
                "clientId": {
                  "description": "ClientId is the OAuth2 client ID for authentication\nIf empty, a default client ID will be used.",
                  "type": "string"
                },
                "clientSecret": {
                  "description": "ClientSecret is the OAuth2 client secret for authentication\nIf empty, a new secret will be generated and a reference to it will be stored in the EventConfig status.",
                  "type": "string"
                },
                "realm": {
                  "description": "Realm references the identity Realm CR used for OAuth2 authentication\nIf empty, it is assumed that the default realm should be used.",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "namespace": {
                      "type": "string"
                    },
                    "uid": {
                      "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "namespace"
                  ],
                  "type": "object"
                }
              },
              "type": "object"
            },
            "url": {
              "description": "Url is the base URL of the configuration backend API.",
              "format": "uri",
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "client",
            "url"
          ],
          "type": "object"
        },
        "mesh": {
          "description": "Mesh configures the mesh topology for event distribution.",
          "properties": {
            "client": {
              "description": "Client configures the identity client used for mesh communication between zones.",
              "properties": {
                "clientId": {
                  "description": "ClientId is the OAuth2 client ID for authentication\nIf empty, a default client ID will be used.",
                  "type": "string"
                },
                "clientSecret": {
                  "description": "ClientSecret is the OAuth2 client secret for authentication\nIf empty, a new secret will be generated and a reference to it will be stored in the EventConfig status.",
                  "type": "string"
                },
                "realm": {
                  "description": "Realm references the identity Realm CR used for OAuth2 authentication\nIf empty, it is assumed that the default realm should be used.",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "namespace": {
                      "type": "string"
                    },
                    "uid": {
                      "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "namespace"
                  ],
                  "type": "object"
                }
              },
              "type": "object"
            },
            "fullMesh": {
              "default": true,
              "description": "FullMesh enables a full mesh topology where events are distributed to all zones.",
              "type": "boolean"
            },
            "zoneNames": {
              "description": "ZoneNames lists specific zones for event distribution in a partial mesh topology.\nMust be set if FullMesh is false.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "client",
            "fullMesh"
          ],
          "type": "object"
        },
        "publishEventUrl": {
          "description": "PublishEventUrl is the internal URL of the publish backend service\nUsed as the upstream for the publish gateway Route.",
          "format": "uri",
          "type": "string"
        },
        "serverSendEventUrl": {
          "description": "ServerSendEventUrl is the internal URL of the SSE backend service\nUsed as the upstream for the SSE gateway Route.",
          "format": "uri",
          "type": "string"
        },
        "voyagerApiUrl": {
          "description": "VoyagerApiUrl is the internal URL of the Voyager backend service.\nUsed as the upstream for the Voyager gateway Route which exposes\nevent listing and redelivery APIs.",
          "format": "uri",
          "type": "string"
        },
        "zone": {
          "description": "Zone references the Zone for which this EventConfig applies.",
          "properties": {
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            },
            "uid": {
              "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
              "type": "string"
            }
          },
          "required": [
            "name",
            "namespace"
          ],
          "type": "object"
        }
      },
      "required": [
        "admin",
        "mesh",
        "publishEventUrl",
        "serverSendEventUrl",
        "zone"
      ],
      "type": "object"
    },
    "status": {
      "description": "EventConfigStatus defines the observed state of EventConfig.",
      "properties": {
        "adminClient": {
          "description": "AdminClient references the identity Client CR created for admin access to the configuration backend.",
          "properties": {
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            },
            "observedGeneration": {
              "description": "ObservedGeneration is the generation of the referenced object that has been observed by the controller.",
              "format": "int64",
              "type": "integer"
            },
            "uid": {
              "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
              "type": "string"
            }
          },
          "required": [
            "name",
            "namespace",
            "observedGeneration"
          ],
          "type": "object"
        },
        "callbackRoute": {
          "description": "CallbackRoute references the Route CR created for the callback gateway.",
          "properties": {
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            },
            "uid": {
              "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
              "type": "string"
            }
          },
          "required": [
            "name",
            "namespace"
          ],
          "type": "object"
        },
        "callbackUrl": {
          "description": "CallbackURL is the external URL of the callback gateway, used to send events to event consumers.",
          "type": "string"
        },
        "conditions": {
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        },
        "eventStore": {
          "description": "EventStore references the EventStore CR in the pubsub domain.",
          "properties": {
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            },
            "uid": {
              "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
              "type": "string"
            }
          },
          "required": [
            "name",
            "namespace"
          ],
          "type": "object"
        },
        "meshClient": {
          "description": "MeshClient references the identity Client CR created for mesh access between zones.",
          "properties": {
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            },
            "observedGeneration": {
              "description": "ObservedGeneration is the generation of the referenced object that has been observed by the controller.",
              "format": "int64",
              "type": "integer"
            },
            "uid": {
              "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
              "type": "string"
            }
          },
          "required": [
            "name",
            "namespace",
            "observedGeneration"
          ],
          "type": "object"
        },
        "proxyCallbackRoutes": {
          "description": "ProxyCallbackRoutes references the Route CRs created for the proxy callback gateway.",
          "items": {
            "description": "ObjectRef is a reference to a Kubernetes object\nIt is similar to types.NamespacedName but has the required json tags for serialization",
            "properties": {
              "name": {
                "type": "string"
              },
              "namespace": {
                "type": "string"
              },
              "uid": {
                "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
                "type": "string"
              }
            },
            "required": [
              "name",
              "namespace"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "proxyCallbackUrls": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "ProxyCallbackURLs maps zone names to the external URLs of the proxy callback gateway Routes for those zones.\nUsed to send events to event consumers in other zones.",
          "type": "object"
        },
        "proxyVoyagerRoutes": {
          "description": "ProxyVoyagerRoutes references the proxy Route CRs created for cross-zone Voyager access.",
          "items": {
            "description": "ObjectRef is a reference to a Kubernetes object\nIt is similar to types.NamespacedName but has the required json tags for serialization",
            "properties": {
              "name": {
                "type": "string"
              },
              "namespace": {
                "type": "string"
              },
              "uid": {
                "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
                "type": "string"
              }
            },
            "required": [
              "name",
              "namespace"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "proxyVoyagerUrls": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "ProxyVoyagerURLs maps zone names to the external URLs of the proxy Voyager gateway Routes for those zones.",
          "type": "object"
        },
        "publishRoute": {
          "description": "PublishRoute references the Route CR created for the publish gateway.",
          "properties": {
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            },
            "uid": {
              "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
              "type": "string"
            }
          },
          "required": [
            "name",
            "namespace"
          ],
          "type": "object"
        },
        "publishUrl": {
          "description": "PublishURL is the external URL of the publish gateway, used by event producers to publish events.",
          "type": "string"
        },
        "voyagerRoute": {
          "description": "VoyagerRoute references the primary Route CR created for the Voyager gateway.",
          "properties": {
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            },
            "uid": {
              "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
              "type": "string"
            }
          },
          "required": [
            "name",
            "namespace"
          ],
          "type": "object"
        },
        "voyagerUrl": {
          "description": "VoyagerURL is the external gateway URL for the Voyager API,\nused for event listing and redelivery.",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://telekom.github.io/controlplane/schemas/event.cp.ei.telekom.de/eventconfig_v1.json",
  "title": "EventConfig",
  "required": [
    "apiVersion",
    "kind",
    "metadata"
  ]
}
