You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
26
26
### Breaking change
27
27
28
28
- The `filter_extra` variable has been removed and replaced with `error_patterns_include` and `error_patterns_exclude`. To migrate:
29
-
- If you were using `filter_extra` to add custom error patterns, use `error_patterns_include` instead.
29
+
- If you were using `filter_extra` to add custom error patterns for `jsonPayload.error` matching, use `error_patterns_include` instead.
30
30
- If you need to exclude specific default error patterns, use `error_patterns_exclude`.
31
+
-**Note:** The new options only support error pattern matching against `jsonPayload.error`. If you were using `filter_extra` for arbitrary log filter conditions (e.g., negative filters like `-textPayload:"..."`), this functionality is no longer available.
31
32
- See [examples/main.tf](examples/main.tf) for usage examples.
| <aname="input_konnectivity_agent"></a> [konnectivity\_agent](#input\_konnectivity\_agent)| Configuration for Konnectivity agent deployment replica alert in GKE. Triggers when there are no available replicas. | <pre>object({<br/> enabled = optional(bool, true)<br/> cluster_name = optional(string, null)<br/> project_id = optional(string, null)<br/> namespace = optional(string, "kube-system")<br/> deployment_name = optional(string, "konnectivity-agent")<br/> duration_seconds = optional(number, 60)<br/> auto_close_seconds = optional(number, 3600)<br/> notification_enabled = optional(bool, true)<br/> notification_channels = optional(list(string), [])<br/> notification_prompts = optional(list(string), null)<br/> })</pre> |`{}`| no |
59
-
| <a name="input_kyverno"></a> [kyverno](#input\_kyverno) | Configuration for Kyverno monitoring alerts. Allows customization of cluster name, project, notification channels, alert documentation, metric thresholds, auto-close timing, enablement, error pattern inclusions/exclusions, and namespace. | <pre>object({<br/> enabled = optional(bool, true)<br/> cluster_name = optional(string, null)<br/> project_id = optional(string, null)<br/> notification_enabled = optional(bool, true)<br/> notification_channels = optional(list(string), [])<br/> # Rate limit for notifications, e.g. "300s" for 5 minutes, used only for log match alerts<br/> logmatch_notification_rate_limit = optional(string, "300s")<br/> alert_documentation = optional(string, null)<br/> auto_close_seconds = optional(number, 3600)<br/> namespace = optional(string, "kyverno")<br/> # List of error patterns to exclude from the default set.<br/> # Default patterns available for exclusion:<br/> # "internal error", "failed calling webhook", "timeout", "client-side throttling",<br/> # "failed to run warmup", "schema not found", "failed to list resources",<br/> # "failed to watch resource", "context deadline exceeded", "is forbidden",<br/> # "cannot list resource", "cannot watch resource", "RBAC.*denied",<br/> # "failed to start watcher", "leader election lost", "unable to update .*WebhookConfiguration",<br/> # "failed to sync", "dropping request", "failed to load certificate",<br/> # "failed to update lock", "the object has been modified", "no matches for kind",<br/> # "the server could not find the requested resource", "Too Many Requests", "x509",<br/> # "is invalid:", "connection refused", "no agent available", "fatal error", "panic"<br/> error_patterns_exclude = optional(list(string), [])<br/> # List of additional error patterns to include (added to default set)<br/> # e.g. ["my custom error", "another pattern"]<br/> error_patterns_include = optional(list(string), [])<br/> })</pre> | `{}` | no |
59
+
| <a name="input_kyverno"></a> [kyverno](#input\_kyverno) | Configuration for Kyverno monitoring alerts. Allows customization of cluster name, project, notification channels, alert documentation, metric thresholds, auto-close timing, enablement, error pattern inclusions/exclusions for jsonPayload.error matching, and namespace. | <pre>object({<br/> enabled = optional(bool, true)<br/> cluster_name = optional(string, null)<br/> project_id = optional(string, null)<br/> notification_enabled = optional(bool, true)<br/> notification_channels = optional(list(string), [])<br/> # Rate limit for notifications, e.g. "300s" for 5 minutes, used only for log match alerts<br/> logmatch_notification_rate_limit = optional(string, "300s")<br/> alert_documentation = optional(string, null)<br/> auto_close_seconds = optional(number, 3600)<br/> namespace = optional(string, "kyverno")<br/> # List of error patterns to exclude from the default set.<br/> # Default patterns available for exclusion:<br/> # "internal error", "failed calling webhook", "timeout", "client-side throttling",<br/> # "failed to run warmup", "schema not found", "failed to list resources",<br/> # "failed to watch resource", "context deadline exceeded", "is forbidden",<br/> # "cannot list resource", "cannot watch resource", "RBAC.*denied",<br/> # "failed to start watcher", "leader election lost", "unable to update .*WebhookConfiguration",<br/> # "failed to sync", "dropping request", "failed to load certificate",<br/> # "failed to update lock", "the object has been modified", "no matches for kind",<br/> # "the server could not find the requested resource", "Too Many Requests", "x509",<br/> # "is invalid:", "connection refused", "no agent available", "fatal error", "panic"<br/> error_patterns_exclude = optional(list(string), [])<br/> # List of additional regex error patterns to include (added to default set)<br/> # e.g. ["my custom.*error", "failed to connect.*database"]<br/> error_patterns_include = optional(list(string), [])<br/> })</pre> | `{}` | no |
| <aname="input_notification_channels"></a> [notification\_channels](#input\_notification\_channels)| List of notification channel IDs to notify when an alert is triggered |`list(string)`|`[]`| no |
62
62
| <aname="input_project_id"></a> [project\_id](#input\_project\_id)| The Google Cloud project ID where logging exclusions will be created |`string`| n/a | yes |
error_message="error_patterns_exclude contains invalid pattern(s). Only default patterns can be excluded. Check the variable description for the list of valid patterns."
146
146
}
147
+
148
+
validation {
149
+
condition=(
150
+
!var.kyverno.enabled||
151
+
length(setsubtract(
152
+
toset(concat([
153
+
"internal error",
154
+
"failed calling webhook",
155
+
"timeout",
156
+
"client-side throttling",
157
+
"failed to run warmup",
158
+
"schema not found",
159
+
"failed to list resources",
160
+
"failed to watch resource",
161
+
"context deadline exceeded",
162
+
"is forbidden",
163
+
"cannot list resource",
164
+
"cannot watch resource",
165
+
"RBAC.*denied",
166
+
"failed to start watcher",
167
+
"leader election lost",
168
+
"unable to update .*WebhookConfiguration",
169
+
"failed to sync",
170
+
"dropping request",
171
+
"failed to load certificate",
172
+
"failed to update lock",
173
+
"the object has been modified",
174
+
"no matches for kind",
175
+
"the server could not find the requested resource",
176
+
"Too Many Requests",
177
+
"x509",
178
+
"is invalid:",
179
+
"connection refused",
180
+
"no agent available",
181
+
"fatal error",
182
+
"panic",
183
+
], var.kyverno.error_patterns_include)),
184
+
toset(var.kyverno.error_patterns_exclude)
185
+
)) >0
186
+
)
187
+
error_message="The combination of error_patterns_exclude and error_patterns_include results in no active error patterns. At least one pattern must remain active, otherwise the alert will not be created."
0 commit comments