q-shift / backstage-plugins

Apache License 2.0
3 stars 7 forks source link

Some comments about /q/xxx endpoints #43

Open cmoulliard opened 6 months ago

cmoulliard commented 6 months ago

Questions

quarkus-ui

aureamunoz commented 6 months ago

A endpoint for health is also available in : q/health. I think it would be helpful to show clickables URLs if possible, Is that what you mean?

cmoulliard commented 6 months ago

to show clickables URLs if possible, Is that what you mean?

Yes. I hope that we can append URL/q/health to an OpenShift route ....

cmoulliard commented 6 months ago

A endpoint for health is also available in : q/health.

Ok. I will fix that

cmoulliard commented 6 months ago

A endpoint for health is also available in : q/health.

Until now, the plugin checks the pod's status & availableReplicas AND dont try to grab information from Quarkus.

  function getHealthStatus(application: Application): string {
    return application.status && application.status.replicas === application.status.availableReplicas ? "Succeeded" : "Failed";
  }

FYI: An Application is a deployment =>

export function deploymentToApplication(deployment: V1Deployment): Application {
  return {
    kind: 'Deployment',
    metadata: deployment?.metadata,
    spec: deployment?.spec?.template?.spec,
    metrics: {
      cpu: [],
      memory: [],
      gcPause: [],
      gcOverhead: [],
    },
    status: deployment?.status,
  };
};