Expected Behavior
When running osdctl cluster context --cluster-id for a HCP cluster, it should return relevant PagerDuty alerts.
Actual Behavior
When running it, it fails to find any incidents and returns none.
Steps to Reproduce:
Run osdctl cluster-context --cluster-id $SOME_HCP_ID
Note the lack of incidents in the output
Environment:
All
Additional Information
This is primarily due to the design of how Classic vs HCP clusters are routed to PD. For classic clusters, we create a PD service per-cluster, and the service name is inferred via the DNS name of the cluster in osdctl here.
We should decouple this first, so it's more obvious, then figure out how to enumerate the list of service IDs in PD based on the clusters region. Once we have that, we can then list incidents for those service(s), and iterate over them, looking at the CustomDetails to map the Cluster ID.
Expected Behavior
When running osdctl cluster context --cluster-id for a HCP cluster, it should return relevant PagerDuty alerts.
Actual Behavior
When running it, it fails to find any incidents and returns none.
Steps to Reproduce:
Run osdctl cluster-context --cluster-id $SOME_HCP_ID
Note the lack of incidents in the output
Environment:
All
Additional Information
This is primarily due to the design of how Classic vs HCP clusters are routed to PD. For classic clusters, we create a PD service per-cluster, and the service name is inferred via the DNS name of the cluster in osdctl here.
We should decouple this first, so it's more obvious, then figure out how to enumerate the list of service IDs in PD based on the clusters region. Once we have that, we can then list incidents for those service(s), and iterate over them, looking at the CustomDetails to map the Cluster ID.