[X] Run make reviewable to ensure this PR is ready for review.
How has this code been tested
Deploy the provider locally using make local-deploy
Get the metrics from the provider pod (curl -s http://localhost:8080/metrics | grep crossplane)
# HELP crossplane_managed_resource_exists The number of managed resources that exist
# TYPE crossplane_managed_resource_exists gauge
crossplane_managed_resource_exists{gvk="tf.upbound.io/v1beta1, Kind=Workspace"} 1
# HELP crossplane_managed_resource_ready The number of managed resources in Ready=True state
# TYPE crossplane_managed_resource_ready gauge
crossplane_managed_resource_ready{gvk="tf.upbound.io/v1beta1, Kind=Workspace"} 1
# HELP crossplane_managed_resource_synced The number of managed resources in Synced=True state
# TYPE crossplane_managed_resource_synced gauge
crossplane_managed_resource_synced{gvk="tf.upbound.io/v1beta1, Kind=Workspace"} 1
Description of your changes
Consume https://github.com/crossplane/crossplane-runtime/pull/683 and configure metrics for Workspaces.
Heavily inspired by https://github.com/crossplane-contrib/provider-kubernetes/pull/224 and https://github.com/crossplane-contrib/provider-upjet-aws/pull/1281
Fixes #271
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
make local-deploy
curl -s http://localhost:8080/metrics | grep crossplane
)