Skip to content

Commit

Permalink
chore/Enable csrf in helm chart for prometheus exporter (#372)
Browse files Browse the repository at this point in the history
Enable csrf in helm chart for prometheus exporter
  • Loading branch information
jimid27 authored Aug 15, 2024
1 parent bfe341a commit 5929ef2
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/prefect-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ Prefect Agent application bundle
| serviceAccount.name | string | `""` | the name of the ServiceAccount to use. if not set and create is true, a name is generated using the common.names.fullname template |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/prefect-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,4 @@ prefect-server:
| serviceAccount.name | string | `""` | the name of the ServiceAccount to use. if not set and create is true, a name is generated using the common.names.fullname template |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/prefect-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,4 +326,4 @@ Please note that configuring the template via `baseJobTemplate.existingConfigMap
| worker.tolerations | list | `[]` | tolerations for worker pods assignment |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
3 changes: 2 additions & 1 deletion charts/prometheus-prefect-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Shoutout to @ialejandro for the original work on this chart!
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity for pod assignment |
| autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Autoscaling with CPU or memory utilization percentage |
| csrfAuth | bool | `false` | Enable CSRF authentication (Only set to true if Prefect Server has CSRF enabled) |
| env | object | `{}` | Environment variables to configure application |
| fullnameOverride | string | `""` | String to fully override common.names.fullname template |
| image | object | `{"pullPolicy":"IfNotPresent","repository":"prefecthq/prometheus-prefect-exporter","tag":"1.1.0"}` | Image registry |
Expand Down Expand Up @@ -91,4 +92,4 @@ Shoutout to @ialejandro for the original work on this chart!
| tolerations | list | `[]` | Tolerations for pod assignment |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
4 changes: 4 additions & 0 deletions charts/prometheus-prefect-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ spec:
env:
- name: PREFECT_API_URL
value: {{ .Values.prefectApiUrl }}
{{- if .Values.csrfAuth }}
- name: PREFECT_CSRF_ENABLED
value: "True"
{{- end }}
{{- if .Values.env }}
{{- range $key, $value := .Values.env }}
- name: {{ $key | upper }}
Expand Down
5 changes: 5 additions & 0 deletions charts/prometheus-prefect-exporter/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
"title": "Prefect API URL",
"description": "Prefect API URL"
},
"csrfAuth": {
"type": "boolean",
"title": "CSRF Auth",
"description": "Enable CSRF auth"
},
"env": {
"type": "object",
"title": "Environment Variables",
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus-prefect-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ serviceAccount:

# -- Prefect API URL to connect to for metrics
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
# -- Environment variables to configure application
env: {}
# Plain vars
Expand Down

0 comments on commit 5929ef2

Please sign in to comment.