Skip to content

Commit

Permalink
[operator] Allow PrometheusRule duration set
Browse files Browse the repository at this point in the history
  • Loading branch information
araiu committed Nov 13, 2024
1 parent ea49f62 commit adf0eec
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 21 deletions.
2 changes: 1 addition & 1 deletion charts/opentelemetry-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-operator
version: 0.74.0
version: 0.74.1
description: OpenTelemetry Operator Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -91,7 +91,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -30,7 +30,7 @@ apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -223,7 +223,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -242,7 +242,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -26,7 +26,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -32,7 +32,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: opentelemetry-operator
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: "example-opentelemetry-operator-cert-manager"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: "example-opentelemetry-operator-metrics"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -44,7 +44,7 @@ metadata:
name: "example-opentelemetry-operator-webhook"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.74.0
helm.sh/chart: opentelemetry-operator-0.74.1
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
4 changes: 2 additions & 2 deletions charts/opentelemetry-operator/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
rules:
- alert: ReconcileErrors
expr: rate(controller_runtime_reconcile_total{controller="opentelemetrycollector",result="error"}[5m]) > 0
for: 5m
for: {{ .Values.manager.prometheusRule.defaultRules.duration }}
labels:
severity: warning
{{- with .Values.manager.prometheusRule.defaultRules.additionalRuleLabels }}
Expand All @@ -38,7 +38,7 @@ spec:
{{- end }}
- alert: WorkqueueDepth
expr: workqueue_depth{name="opentelemetrycollector"} > 0
for: 5m
for: {{ .Values.manager.prometheusRule.defaultRules.duration }}
labels:
severity: warning
{{- with .Values.manager.prometheusRule.defaultRules.additionalRuleLabels }}
Expand Down
8 changes: 8 additions & 0 deletions charts/opentelemetry-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,14 @@
"required": [],
"properties": {},
"examples": [{}]
},
"duration": {
"type": "string",
"default": {},
"title": "The prometheusRule duration to be considered firing",
"required": [],
"properties": {},
"examples": [{}]
}
},
"examples": [{
Expand Down
2 changes: 2 additions & 0 deletions charts/opentelemetry-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ manager:
additionalRuleLabels: {}
## Additional annotations for PrometheusRule alerts
additionalRuleAnnotations: {}
## Alerts are considered firing once they have been returned for this long.
duration: 5m
# additional labels on the PrometheusRule object
extraLabels: {}
# add annotations on the PrometheusRule object
Expand Down

0 comments on commit adf0eec

Please sign in to comment.