Skip to content

Commit

Permalink
fix: document fields, bump version, fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
fstr committed Oct 2, 2024
1 parent 70c64ed commit 8e958eb
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/pyrra/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type: application
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 0.13.4
version: 0.14.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
7 changes: 6 additions & 1 deletion charts/pyrra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ The dashboards can be deployed using a ConfigMap and get's automatically [reload
| prometheusExternalUrl | string | `""` | url to public-facing prometheus UI in case it differs from prometheusUrl |
| prometheusRule.enabled | bool | `false` | enables creation of PrometheusRules to monitor Pyrra |
| prometheusRule.labels | object | `{}` | Set labels that will be applied on all PrometheusRules (alerts) |
| prometheusRule.pyrraReconciliationError.severity | string | `"warning"` | Set severity for PyrraReconciliationError alert |
| prometheusUrl | string | `"http://prometheus-operated.monitoring.svc.cluster.local:9090"` | url to prometheus instance with metrics |
| resources | object | `{}` | resource limits and requests for server pod |
| securityContext | object | `{}` | additional security context for server |
Expand All @@ -61,8 +62,12 @@ The dashboards can be deployed using a ConfigMap and get's automatically [reload
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | If not set and create is true, a name is generated using the fullname template |
| serviceMonitor.enabled | bool | `false` | enables servicemonitor for server monitoring |
| serviceMonitor.enabled | bool | `true` | enables servicemonitor for server monitoring |
| serviceMonitor.interval | string | `""` | Set interval for scraping metrics |
| serviceMonitor.jobLabel | string | `""` | provides the possibility to override the jobName if needed |
| serviceMonitor.labels | object | `{}` | Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator |
| serviceMonitor.metricRelabelings | list | `[]` | Set metric relabelings for the ServiceMonitor |
| serviceMonitor.relabelings | list | `[]` | Set relabelings for the ServiceMonitor |
| tolerations | object | `{}` | tolerations for scheduling server pod |
| validatingWebhookConfiguration.enabled | bool | `false` | enables admission webhook for server to validate SLOs, this requires cert-manager to be installed |

Expand Down
4 changes: 2 additions & 2 deletions charts/pyrra/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.prometheusRule.enabled }}
{{- if .Values.prometheusRule.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
Expand All @@ -16,7 +16,7 @@ spec:
expr: sum by (job) (rate(controller_runtime_reconcile_errors_total{controller="servicelevelobjective"}[20m])) > 0
for: 1m
labels:
severity: error
severity: {{ .Values.prometheusRule.pyrraReconciliationError.severity }}
{{- if .Values.prometheusRule.labels }}
{{- toYaml .Values.prometheusRule.labels | nindent 12 }}
{{- end }}
Expand Down
8 changes: 4 additions & 4 deletions charts/pyrra/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ spec:
{{- end }}
{{- if .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ toYaml .Values.serviceMonitor.metricRelabelings | indent 4 }}
{{- toYaml .Values.serviceMonitor.metricRelabelings | nindent 6 }}
{{- end }}
{{- if .Values.serviceMonitor.relabelings }}
relabelings:
{{ toYaml .Values.serviceMonitor.relabelings | indent 4 }}
{{- toYaml .Values.serviceMonitor.relabelings | nindent 6 }}
{{- end }}
- port: op-metrics
{{- if .Values.serviceMonitor.interval }}
interval: {{ .Values.serviceMonitor.interval }}
{{- end }}
{{- if .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ toYaml .Values.serviceMonitor.metricRelabelings | indent 4 }}
{{- toYaml .Values.serviceMonitor.metricRelabelings | nindent 6 }}
{{- end }}
{{- if .Values.serviceMonitor.relabelings }}
relabelings:
{{ toYaml .Values.serviceMonitor.relabelings | indent 4 }}
{{- toYaml .Values.serviceMonitor.relabelings | nindent 6 }}
{{- end }}
{{- end }}
13 changes: 11 additions & 2 deletions charts/pyrra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,26 @@ tolerations: {}

serviceMonitor:
# -- enables servicemonitor for server monitoring
enabled: false
enabled: true
# -- Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator
labels: {}
# -- provides the possibility to override the jobName if needed
# jobLabel: fancy-pyrra-server
jobLabel: ""
# -- Set interval for scraping metrics
interval: ""
# -- Set metric relabelings for the ServiceMonitor
metricRelabelings: []
# -- Set relabelings for the ServiceMonitor
relabelings: []

prometheusRule:
# -- enables creation of PrometheusRules to monitor Pyrra
enabled: false
# -- Set labels that will be applied on all PrometheusRules (alerts)
labels: {}
pyrraReconciliationError:
# -- Set severity for PyrraReconciliationError alert
severity: warning

genericRules:
# -- enables generate Pyrra generic recording rules. Pyrra generates metrics with the same name for each SLO.
Expand Down

0 comments on commit 8e958eb

Please sign in to comment.