solo-io / workshops

Apache License 2.0
127 stars 72 forks source link

Gloo Edge workshop rate limiting typos #131

Open millerjem opened 2 years ago

millerjem commented 2 years ago

In the GlooEdge Workshop... The read along for the rate limiting section reference 'per second' and the YAML references 'per minute'. Please adjust based on the desired outcome.

// Snippet Users of organizations with the enterprise subscription have a rate limit of 8 requests per second Users of organizations with the free subscription have a rate limit of 2 requests per second We define those rate limits using the following RateLimitConfig definition:

// YAML

kubectl apply -f - << EOF
apiVersion: ratelimit.solo.io/v1alpha1
kind: RateLimitConfig
metadata:
  name: limit-users
  namespace: gloo-system
spec:
  raw:
    setDescriptors:
    - simpleDescriptors:
      - key: email-key
      - key: organization-key
      - key: subscription-key
        value: free
      rateLimit:
        requestsPerUnit: 2
        unit: MINUTE
    - simpleDescriptors:
      - key: email-key
      - key: organization-key
      - key: subscription-key
        value: enterprise
      rateLimit:
        requestsPerUnit: 8
        unit: MINUTE
    rateLimits:
    - setActions:
      - requestHeaders:
          headerName: x-email
          descriptorKey: email-key
      - requestHeaders:
          headerName: x-organization
          descriptorKey: organization-key
      - requestHeaders:
          headerName: x-subscription
          descriptorKey: subscription-key
EOF