[id='con-understanding-virtualkafkacluster-status-{context}']
= `VirtualKafkaCluster` status reporting

== `ResolvedRefs` conditions

When you create a `VirtualKafkaCluster`, the operator checks whether the following exist:

* A `KafkaProxy` matching `spec.proxyRef`.
* Each `KafkaProxyIngress` specified in `spec.ingresses`, and whether they refer to the same `KafkaProxy` as the virtual cluster.
* A `Secret` referred to in the `tls` property.

The result is reported in `status.conditions` with a `ResolvedRefs` condition accordingly.

.Example `VirtualKafkaCluster` status when all referenced resources exist
[source,yaml]
----
kind: VirtualKafkaCluster
apiVersion: kroxylicious.io/v1alpha1
metadata:
  # ...
  generation: 12
spec:
  # ...
status:
  observedGeneration: 12 # <1>
  conditions:
    - type: ResolvedRefs # <2>
      status: True # <3>
      observedGeneration: 12
----
<1> The `observedGeneration` in the status matches the `metadata.generation`, indicating that the status is up-to-date for the latest `spec`.
<2> The `ResolvedRefs` condition type reports any issues with referenced resources.
<3> A status value of `True` means that all referenced resources exist. 

A status value of `False` means that one or more of the referenced resources is missing. In this case, the condition includes `reason` and `message` properties with more details.

== `Accepted` conditions

When a `VirtualKafkaCluster` has a valid spec, the operator attempts to configure the proxy instance accordingly.
This might not be possible.
For example, the `spec` may be valid but incompatible with other virtual clusters running in the same proxy instance.

The operator sets a condition type of `Accepted` in `status.conditions` to indicate whether or not a virtual cluster has been successfully configured within a proxy instance.