diff --git a/charts/pyrra/Chart.yaml b/charts/pyrra/Chart.yaml index 9733c6c36..b0d78511a 100644 --- a/charts/pyrra/Chart.yaml +++ b/charts/pyrra/Chart.yaml @@ -22,4 +22,4 @@ version: 0.13.3 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: v0.7.7 +appVersion: v0.8.0 diff --git a/charts/pyrra/README.md b/charts/pyrra/README.md index 82bf10c8a..2cf0a5708 100644 --- a/charts/pyrra/README.md +++ b/charts/pyrra/README.md @@ -1,6 +1,6 @@ # pyrra -![Version: 0.13.3](https://img.shields.io/badge/Version-0.13.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.7.7](https://img.shields.io/badge/AppVersion-v0.7.7-informational?style=flat-square) +![Version: 0.13.3](https://img.shields.io/badge/Version-0.13.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.8.0](https://img.shields.io/badge/AppVersion-v0.8.0-informational?style=flat-square) SLO manager and alert generator @@ -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 | @@ -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 | diff --git a/charts/pyrra/templates/prometheusrule.yaml b/charts/pyrra/templates/prometheusrule.yaml index a7f0434b2..0599a5f0d 100644 --- a/charts/pyrra/templates/prometheusrule.yaml +++ b/charts/pyrra/templates/prometheusrule.yaml @@ -1,4 +1,4 @@ -{{ if .Values.prometheusRule.enabled }} +{{- if .Values.prometheusRule.enabled }} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: @@ -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 }} diff --git a/charts/pyrra/templates/servicemonitor.yaml b/charts/pyrra/templates/servicemonitor.yaml index 3b3e2d543..59d5612d4 100644 --- a/charts/pyrra/templates/servicemonitor.yaml +++ b/charts/pyrra/templates/servicemonitor.yaml @@ -23,11 +23,11 @@ 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 }} @@ -35,10 +35,10 @@ 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 }} {{- end }} diff --git a/charts/pyrra/values.yaml b/charts/pyrra/values.yaml index b87489227..5c8792221 100644 --- a/charts/pyrra/values.yaml +++ b/charts/pyrra/values.yaml @@ -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.