---
# System prepended metadata

title: Hypershift Status Reporting

---

# Hypershift Status Reporting

![](https://i.imgur.com/Z4kdZ4X.png)

**Current Status propagation**
```mermaid

graph TD
  HostedControlPlane --> |status.ready|Cluster
  HostedControlPlane --> |status.ready|ExternalInfraCluster
  ExternalInfraCluster --> |status.ready|Cluster
  Cluster --> |status.controlPlaneReady and status.infrastructureReady|HostedCluster
  HostedCluster --> |status.ready|Complete
  
  NodePool
```

## ExternalInfraCluster

### Current
```
status:
  ready: true
```

This resource **must have** a `status.ready` field that the Cluster API controller uses to set the `infrastructureReady` status field and `InfrastructureReady` status condition on the `Cluster` resource.

It sets `ready: true` once the `HostedControlPlane` is `ready: true`.

Also updates the `spec` with information from the `HostedControlPlane` `status` which is weird

https://github.com/openshift/hypershift/blob/054191c448e6fc0fea752d9110227356eaa77b13/hypershift-operator/controllers/externalinfracluster/externalinfracluster_controller.go#L112-L129

### Controller created resources

None

### New Design

This resource currently does nothing except copy information out of the HostedControlPlane status into the ExternalInfraCluster spec to act as glue for CAPI.  Nothing to do here as there is no way for this to fail.  Its ready status is currently equivalent to the HostedControlPlane ready status.

## HostedControlPlane

### Current
```
status:
  controlPlaneEndpoint:
    host: api.example.ocp.variantweb.net
    port: 6443
  ready: true
```

This resource **must have** a `status.ready` field that the Cluster API controller uses to set the `infrastructureReady` status field and `InfrastructureReady` status condition on the `Cluster` resource.

This resource currently has the most complex ready check as it ensures the existence of many resources in the guest cluster namespace.

https://github.com/openshift/hypershift/blob/054191c448e6fc0fea752d9110227356eaa77b13/control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go#L187-L226

### Controller created resources

Lots and lots

### New Design

There are at least 

## (CAPI) Cluster

### Current
```
status:
  conditions:
  - lastTransitionTime: "2021-02-08T15:48:43Z"
    status: "True"
    type: Ready
  - lastTransitionTime: "2021-02-08T15:48:40Z"
    status: "True"
    type: ControlPlaneReady
  - lastTransitionTime: "2021-02-08T15:48:43Z"
    status: "True"
    type: InfrastructureReady
  controlPlaneReady: true
  infrastructureReady: true
  observedGeneration: 2
  phase: Provisioned
```
The `controlPlaneReady` and `infrastructureReady` fields and conditions overlap in the status.  Not sure if one is preferred/deprecated?

`controlPlaneReady` is set `true` when the resource ref'ed by `spec.controlPlaneRef` reports `status.ready=true`

`infrastructureReady` is set `true` when the resource ref'ed by `spec.infrastructureRef` reports `status.ready=true`

### New Design

No changes here. This is an CAPI upstream resource.  Just for reference on potentially mirroring to high level resource status.

## HostedCluster

### Current
```
status:
  ready: true
```
The resource watches the `controlPlaneReady` and `infrastructureReady` status fields in the created CAPI `Cluster`.  When they are `true`, `ready` on the `HostedCluster` is set `true`.

https://github.com/openshift/hypershift/blob/054191c448e6fc0fea752d9110227356eaa77b13/hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go#L268-L276

## Controller created resources

- HostedControlPlane
- ExternalInfraCluster
- (CAPI) Cluster
- NodePool (potentially)

### New Design

TDB

## NodePool

### Current

No status at all

### New Design


