Skip to content

Commit

Permalink
Chore/pagination settings prefect exporter (#404)
Browse files Browse the repository at this point in the history
* Pagination settings

* Update pagination docs for the helm chart

* Need context if pagination is disabled as it is enabled by default
  • Loading branch information
jimid27 authored Oct 24, 2024
1 parent 0393728 commit 3a4c96a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/prometheus-prefect-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Shoutout to @ialejandro for the original work on this chart!
| livenessProbe | bool | `false` | Enable livenessProbe |
| nameOverride | string | `""` | String to partially override common.names.fullname template (will maintain the release name) |
| nodeSelector | object | `{}` | Node labels for pod assignment |
| pagination | object | `{"enabled":true,"limit":200}` | Pagination settings. If enabled, the exporter will paginate the API requests to Prefect Server which uses more resources. Remember to increase the resources for the exporter if enabled. |
| podAnnotations | object | `{}` | Pod annotations |
| podDisruptionBudget | object | `{}` | Limits the number of Pods of a replicated application that are down simultaneously from voluntary disruptions |
| podSecurityContext | object | `{}` | To specify security settings for a Pod |
Expand Down
10 changes: 10 additions & 0 deletions charts/prometheus-prefect-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ spec:
- name: PREFECT_CSRF_ENABLED
value: "True"
{{- end }}
{{- if .Values.pagination.enabled }}
- name: PAGINATION_LIMIT
value: {{ .Values.pagination.limit | quote }}
- name: PAGINATION_ENABLED
value: "True"
{{- end }}
{{- if not .Values.pagination.enabled }}
- name: PAGINATION_ENABLED
value: "False"
{{- end }}
{{- if .Values.env }}
{{- range $key, $value := .Values.env }}
- name: {{ $key | upper }}
Expand Down
17 changes: 17 additions & 0 deletions charts/prometheus-prefect-exporter/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,23 @@
"title": "CSRF Auth",
"description": "Enable CSRF auth"
},
"pagination": {
"type": "object",
"title": "Pagination",
"description": "Pagination settings",
"properties": {
"enabled": {
"type": "boolean",
"title": "Enabled",
"description": "Enable pagination"
},
"limit": {
"type": "integer",
"title": "Limit",
"description": "Pagination limit"
}
}
},
"env": {
"type": "object",
"title": "Environment Variables",
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus-prefect-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ prefectApiUrl: http://prefect-server.prefect.svc.cluster.local:4200/api

# -- Enable CSRF authentication (Only set to true if Prefect Server has CSRF enabled)
csrfAuth: false
# -- Pagination settings. If enabled, the exporter will paginate the API requests to Prefect Server which uses more resources. Remember to increase the resources for the exporter if enabled.
pagination:
enabled: true
limit: 200
# -- Environment variables to configure application
env: {}
# Plain vars
Expand Down

0 comments on commit 3a4c96a

Please sign in to comment.