You can configure an SLO by making a call to the Tanzu Service Mesh API.

You can use an interactive API Explorer in the Tanzu Service Mesh Console UI to access the Tanzu Service Mesh API endpoints. For more information about the API Explorer, see the Tanzu Service Mesh API Programming Guide.

Prerequisites

Procedure

  1. To access the Tanzu Service Mesh API endpoints for a GNS-scoped SLO, perform these steps.
    1. On the bottom bar of the Tanzu Service Mesh Console UI, toward the right, click API Explorer.
    2. On the REST HTTP tab, scroll down to the GNS Service Level Objective section to see the API endpoints for SLO.
    3. Expand PUT v1alpha1/global-namespaces/{gnsId}/service-level-objectives/{sloId} to create an SLO with this endpoint.
      • policyID. Specify the SLO policy name.

      • gnsID. Specify the global namespace name.

      • Service Level Objective Config. Specify the type of SLO, the SLI metrics, and the SLO threshold condition.



  2. To create an org-scoped SLO, scroll down to the Tanzu Service Mesh API endpoints for Service Level Objective and use the PUT /v1alpha/service-level-objective/{id} endpoint.

What to do next

For information about the endpoints to use to view the list of SLO policies, edit an SLO policy, or delete an SLO policy that you no longer need, see SLO API Reference.