Skip to content

Commit

Permalink
make interval/scrapeTimeout configurable for service monitors
Browse files Browse the repository at this point in the history
Signed-off-by: vraiyani <[email protected]>
  • Loading branch information
vraiyaninv committed Nov 16, 2023
1 parent 7af6520 commit 0e147de
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
16 changes: 10 additions & 6 deletions charts/flyte-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ helm install gateway bitnami/contour -n flyte
| flyteadmin.serviceAccount.create | bool | `true` | Should a service account be created for flyteadmin |
| flyteadmin.serviceAccount.createClusterRole | bool | `true` | Should a ClusterRole be created for Flyteadmin |
| flyteadmin.serviceAccount.imagePullSecrets | list | `[]` | ImagePullSecrets to automatically assign to the service account |
| flyteadmin.serviceMonitor | object | `{"enabled":false,"labels":null}` | Settings for flyteadmin service monitor |
| flyteadmin.serviceMonitor.enabled | bool | `false` | If enabled create the flyteadmin service monitor. |
| flyteadmin.serviceMonitor.labels | string | `nil` | Sets the labels for the service monitor which are required by the prometheus to auto-detect the service monitor and start scrapping the metrics |
| flyteadmin.serviceMonitor | object | `{"enabled":false,"interval":"60s","labels":{},"scrapeTimeout":"30s"}` | Settings for flyteadmin service monitor |
| flyteadmin.serviceMonitor.enabled | bool | `false` | If enabled create the flyteadmin service monitor |
| flyteadmin.serviceMonitor.interval | string | `"60s"` | Sets the interval at which metrics will be scraped by prometheus |
| flyteadmin.serviceMonitor.labels | object | `{}` | Sets the labels for the service monitor which are required by the prometheus to auto-detect the service monitor and start scrapping the metrics |
| flyteadmin.serviceMonitor.scrapeTimeout | string | `"30s"` | Sets the timeout after which request to scrape metrics will time out |
| flyteadmin.tolerations | list | `[]` | tolerations for Flyteadmin deployment |
| flyteagent.enabled | bool | `false` | |
| flyteconsole.affinity | object | `{}` | affinity for Flyteconsole deployment |
Expand Down Expand Up @@ -220,9 +222,11 @@ helm install gateway bitnami/contour -n flyte
| flytepropeller.serviceAccount.annotations | object | `{}` | Annotations for ServiceAccount attached to FlytePropeller pods |
| flytepropeller.serviceAccount.create | bool | `true` | Should a service account be created for FlytePropeller |
| flytepropeller.serviceAccount.imagePullSecrets | list | `[]` | ImagePullSecrets to automatically assign to the service account |
| flytepropeller.serviceMonitor | object | `{"enabled":false,"labels":null}` | Settings for flytepropeller service monitor |
| flytepropeller.serviceMonitor.enabled | bool | `false` | If enabled create the flyetepropeller service monitor. |
| flytepropeller.serviceMonitor.labels | string | `nil` | Sets the labels for the service monitor which are required by the prometheus to auto-detect the service monitor and start scrapping the metrics |
| flytepropeller.serviceMonitor | object | `{"enabled":false,"interval":"60s","labels":{},"scrapeTimeout":"30s"}` | Settings for flytepropeller service monitor |
| flytepropeller.serviceMonitor.enabled | bool | `false` | If enabled create the flyetepropeller service monitor |
| flytepropeller.serviceMonitor.interval | string | `"60s"` | Sets the interval at which metrics will be scraped by prometheus |
| flytepropeller.serviceMonitor.labels | object | `{}` | Sets the labels for the service monitor which are required by the prometheus to auto-detect the service monitor and start scrapping the metrics |
| flytepropeller.serviceMonitor.scrapeTimeout | string | `"30s"` | Sets the timeout after which request to scrape metrics will time out |
| flytepropeller.terminationMessagePolicy | string | `"FallbackToLogsOnError"` | Error reporting |
| flytepropeller.tolerations | list | `[]` | tolerations for Flytepropeller deployment |
| flytescheduler.additionalContainers | list | `[]` | Appends additional containers to the deployment spec. May include template values. |
Expand Down
4 changes: 2 additions & 2 deletions charts/flyte-core/templates/admin/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ metadata:
{{- end }}
spec:
endpoints:
- interval: 60s
- interval: {{ .Values.flyteadmin.serviceMonitor.interval }}
port: http-metrics
path: /metrics
scrapeTimeout: 30s
scrapeTimeout: {{ .Values.flyteadmin.serviceMonitor.scrapeTimeout }}
selector:
matchLabels: {{ include "flyteadmin.selectorLabels" . | nindent 6 }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/flyte-core/templates/propeller/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ metadata:
{{- end }}
spec:
endpoints:
- interval: 60s
- interval: {{ .Values.flytepropeller.serviceMonitor.interval }}
port: http-metrics
path: /metrics
scrapeTimeout: 30s
scrapeTimeout: {{ .Values.flytepropeller.serviceMonitor.scrapeTimeout }}
selector:
matchLabels: {{ include "flytepropeller.selectorLabels" . | nindent 6 }}
{{- end }}
18 changes: 12 additions & 6 deletions charts/flyte-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,15 @@ flyteadmin:

# -- Settings for flyteadmin service monitor
serviceMonitor:
# -- If enabled create the flyteadmin service monitor.
# -- If enabled create the flyteadmin service monitor
enabled: false
# -- Sets the interval at which metrics will be scraped by prometheus
interval: 60s
# -- Sets the timeout after which request to scrape metrics will time out
scrapeTimeout: 30s
# -- Sets the labels for the service monitor which are required by the
# prometheus to auto-detect the service monitor and start scrapping the metrics
labels:

labels: {}
#
# FLYTESCHEDULER SETTINGS
#
Expand Down Expand Up @@ -305,12 +308,15 @@ flytepropeller:

# -- Settings for flytepropeller service monitor
serviceMonitor:
# -- If enabled create the flyetepropeller service monitor.
# -- If enabled create the flyetepropeller service monitor
enabled: false
# -- Sets the labels for the service monitor which are required by the
# prometheus to auto-detect the service monitor and start scrapping the metrics
labels:

labels: {}
# -- Sets the interval at which metrics will be scraped by prometheus
interval: 60s
# -- Sets the timeout after which request to scrape metrics will time out
scrapeTimeout: 30s
#
# FLYTECONSOLE SETTINGS
#
Expand Down

0 comments on commit 0e147de

Please sign in to comment.