Skip to content

Commit

Permalink
feat(chart): add support for new rate-limit feature
Browse files Browse the repository at this point in the history
  • Loading branch information
awlayton committed Apr 5, 2023
1 parent afa950d commit 9467c06
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/oada/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ maintainers:
- name: awlayton
email: [email protected]
type: application
version: 3.2.0
appVersion: '3.8.0'
version: 3.3.0
appVersion: '3.9.1'
annotations:
artifacthub.io/recommendations: |
- url: https://artifacthub.io/packages/helm/cert-manager/cert-manager
Expand Down
6 changes: 5 additions & 1 deletion charts/oada/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ data:
PROM_HOST: '::'
DOMAIN: {{ include "oada.domain" . }}
# Have OADA http handle rate-limit until we can get k8s to do it
RATE_LIMIT_ENABLED: true
RATE_LIMIT_ENABLED: {{ .Values.oada.rateLimit.enabled | quote }}
RATE_LIMIT_DRAFT_SPEC: {{ .Values.oada.rateLimit.useDraftSpec | quote }}
MAX_READ_REQUESTS: {{ .Values.oada.rateLimit.max.reads | quote }}
MAX_WRITE_REQUESTS: {{ .Values.oada.rateLimit.max.writes | quote }}
RATE_TIME_WINDOW: {{ .Values.oada.rateLimit.timeWindow | quote }}
{{ if eq (include "oada.arango.deploy" .) "true" -}}
ARANGODB_URL: {{ include "oada.arango.connection" . }}
{{- end }}
Expand Down
7 changes: 7 additions & 0 deletions charts/oada/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ oada:
scope:
- all:all
- oada.admin.user:all
rateLimit:
enabled: true
useDraftSpec: false
max:
reads: 20
writes: 5
timeWindow: 1 second
# oada.resources are the resource requests/limits for the OADA services
resources:
limits:
Expand Down

0 comments on commit 9467c06

Please sign in to comment.