[id="apicurio-registry-custom-resource"]
= {registry} Custom Resource

The {operator} defines an `ApicurioRegistry3` link:https://docs.openshift.com/container-platform/latest/operators/understanding/crds/crd-extending-api-with-crds.html[custom resource (CR)] that represents a single deployment of {registry} on OpenShift.

These resource objects are created and maintained by users to instruct the {operator} how to deploy and configure {registry}.

.Example ApicurioRegistry3 CR
The following command displays the `ApicurioRegistry3` resource:

[source,bash,subs="attributes"]
----
{cli-client} get apicurioregistry3
{cli-client} edit apicurioregistry3 example-apicurioregistry
----

[source,yaml]
----
apiVersion: registry.apicur.io/v1
kind: ApicurioRegistry3
metadata:
  name: example-apicurioregistry
  namespace: demo-kafka
  # ...
spec:
  app:
    storage:
      type: kafkasql
      kafkasql:
        bootstrapServers: "my-cluster-kafka-bootstrap.demo-kafka.svc:9092"
    ingress:
      host: example-apicurioregistry-app.demo-kafka.example.com
  ui:
    ingress:
      host: example-apicurioregistry-ui.demo-kafka.example.com
status:
  conditions:
  - lastTransitionTime: "2021-05-03T10:47:11Z"
    message: ""
    reason: Reconciled
    status: "True"
    type: Ready
  info:
    host: example-apicurioregistry-app.demo-kafka.example.com
  managedResources:
  - kind: Deployment
    name: example-apicurioregistry-app-deployment
    namespace: demo-kafka
  - kind: Service
    name: example-apicurioregistry-app-service
    namespace: demo-kafka
  - kind: Ingress
    name: example-apicurioregistry-app-ingress
    namespace: demo-kafka
----

IMPORTANT: By default, the {operator} watches its own project namespace only.
Therefore, you must create the `ApicurioRegistry3` CR in the same namespace, if you are deploying the Operator manually.
You can modify this behavior by updating `WATCH_NAMESPACE` environment variable in the Operator `Deployment` resource.

.Additional resources
* link:https://docs.openshift.com/container-platform/4.6/operators/understanding/crds/crd-extending-api-with-crds.html[Extending the Kubernetes API with Custom Resource Definitions]
