Skip to content

Commit

Permalink
[stable/prometheus-operator] Added option to disable kube-apiserver-a…
Browse files Browse the repository at this point in the history
…vailability rules (helm#23136)

Signed-off-by: Dan Sexton <[email protected]>
  • Loading branch information
dsexton authored and includerandom committed Jul 19, 2020
1 parent 7644927 commit a3f402e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/prometheus-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sources:
- https://github.com/coreos/kube-prometheus
- https://github.com/coreos/prometheus-operator
- https://coreos.com/operators/prometheus
version: 8.16.0
version: 8.16.1
appVersion: 0.38.1
tillerVersion: ">=2.12.0"
home: https://github.com/coreos/prometheus-operator
Expand Down
1 change: 1 addition & 0 deletions stable/prometheus-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ The following tables list the configurable parameters of the prometheus-operator
| `defaultRules.rules.general` | Create General default rules| `true` |
| `defaultRules.rules.k8s` | Create K8S default rules| `true` |
| `defaultRules.rules.kubeApiserver` | Create Api Server default rules| `true` |
| `defaultRules.rules.kubeApiserverAvailability` | Create Api Server Availability default rules| `true` |
| `defaultRules.rules.kubeApiserverError` | Create Api Server Error default rules| `true` |
| `defaultRules.rules.kubeApiserverSlos` | Create Api Server SLOs default rules| `true` |
| `defaultRules.rules.kubelet` | Create kubelet default rules | `true` |
Expand Down
1 change: 1 addition & 0 deletions stable/prometheus-operator/hack/sync_prometheus_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def new_representer(dumper, data):
'general.rules': ' .Values.defaultRules.rules.general',
'k8s.rules': ' .Values.defaultRules.rules.k8s',
'kube-apiserver.rules': ' .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserver',
'kube-apiserver-availability.rules': ' .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverAvailability',
'kube-apiserver-error': ' .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverError',
'kube-apiserver-slos': ' .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverSlos',
'kube-prometheus-general.rules': ' .Values.defaultRules.rules.kubePrometheusGeneral',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Do not change in-place! In order to change this file first read following link:
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create }}
{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverAvailability }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
Expand Down
1 change: 1 addition & 0 deletions stable/prometheus-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ defaultRules:
general: true
k8s: true
kubeApiserver: true
kubeApiserverAvailability: true
kubeApiserverError: true
kubeApiserverSlos: true
kubelet: true
Expand Down

0 comments on commit a3f402e

Please sign in to comment.