Add usage plans

Decide on the usage plans that you want to make visible to your users in the developer portal.

Add usage plans

You can add information about the usage plan, such as a display name and a description that you want to show to users that access the developer portal.

  1. Get the usage plans that you set up earlier. The usage plans are set in the rate limit server configuration.

    kubectl get ratelimitserverconfigs usage-plans -n gloo-mesh-addons -o yaml
  2. Select the usage plans that you want to include in your portal. To reference a usage plan in your portal resource, you need to get the simpleDescriptors.value value. In the following example, the usage plan value is bronze.

         - port:
             name: grpc
             cluster: cluster-1
             name: rate-limiter
             namespace: gloo-mesh-addons
           - rateLimit:
               requestsPerUnit: 1
               unit: MINUTE
             - key: userId
             - key: usagePlan
               value: bronze

  3. Add the usage plan values to the usagePlans section of your portal resource. Make sure to enter the usage plan value that you retrieved in the previous step in the field. You can optionally add information, such as the display name or a description for each usage plan that is shown to users that access the developer portal. For example, you might include pricing details, rate limiting, or access instructions in the plan description.

    kind: Portal
      name: developer-portal
      namespace: gloo-mesh-addons
        - ""
        - selector:
              app: gloo-mesh-portal-server
        - name: bronze
          displayName: "Bronze Plan"
          description: "A basic usage plan"
        - name: silver
          description: "A better usage plan"
        - name: gold
          description: "The best usage plan!"
        - labels:
            portal: dev-portal

Next steps

Next, create the portal backend.

When you are done with trying out Portal, you can clean up all of the resources that you created.