diff --git a/charts/pyrra/Chart.yaml b/charts/pyrra/Chart.yaml index f69def1..3f8ae44 100644 --- a/charts/pyrra/Chart.yaml +++ b/charts/pyrra/Chart.yaml @@ -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.15.0 +version: 0.15.1 # 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 diff --git a/charts/pyrra/README.md b/charts/pyrra/README.md index 3d07bb5..f5b5ea7 100644 --- a/charts/pyrra/README.md +++ b/charts/pyrra/README.md @@ -21,6 +21,7 @@ The dashboards can be deployed using a ConfigMap and get's automatically [reload | Key | Type | Default | Description | |-----|------|---------|-------------| | additionalLabels | object | `{}` | | +| configMapMode.enabled | bool | `false` | enables configMap mode to generate the PrometheusRules in a configMap | | dashboards.annotations | object | `{}` | | | dashboards.enabled | bool | `false` | enables Grafana dashboards being deployed via configmap | | dashboards.extraLabels | object | `{}` | | diff --git a/charts/pyrra/templates/clusterrole.yaml b/charts/pyrra/templates/clusterrole.yaml index bd2740c..5b4304a 100644 --- a/charts/pyrra/templates/clusterrole.yaml +++ b/charts/pyrra/templates/clusterrole.yaml @@ -44,3 +44,16 @@ rules: - get - patch - update +{{- if .Values.configMapMode.enabled }} +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - create + - list + - watch + - update + - delete +{{- end }} diff --git a/charts/pyrra/templates/deployment.yaml b/charts/pyrra/templates/deployment.yaml index 85d3c4f..4d918ab 100644 --- a/charts/pyrra/templates/deployment.yaml +++ b/charts/pyrra/templates/deployment.yaml @@ -36,6 +36,9 @@ spec: {{- if .Values.genericRules.enabled }} - --generic-rules {{- end }} + {{- if .Values.configMapMode.enabled }} + - --config-map-mode + {{- end }} {{- if and .Values.validatingWebhookConfiguration.enabled ($.Capabilities.APIVersions.Has "cert-manager.io/v1") }} - --disable-webhooks=false {{- end }} diff --git a/charts/pyrra/values.yaml b/charts/pyrra/values.yaml index c36a172..8b08eee 100644 --- a/charts/pyrra/values.yaml +++ b/charts/pyrra/values.yaml @@ -140,6 +140,10 @@ genericRules: # -- enables generate Pyrra generic recording rules. Pyrra generates metrics with the same name for each SLO. enabled: false +configMapMode: + # -- enables configMap mode to generate the PrometheusRules in a configMap + enabled: false + validatingWebhookConfiguration: # -- enables admission webhook for server to validate SLOs, this requires cert-manager to be installed enabled: false