AliyunContainerService / kube-eventer

kube-eventer emit kubernetes events to sinks
Apache License 2.0
1k stars 275 forks source link

webhook正则匹配 #252

Open xuzheng0017 opened 1 year ago

xuzheng0017 commented 1 year ago

看最近有更新,所以用master分支重新打的镜像

需求:过滤Reason不是Unhealthy和FailedMount类型的事件

表达式: --sink=xxxx&reason=^(?!Unhealthy|FailedMount)

日志: generic_filter.go:51] Failed to match pattern ^(?!Unhealthy|FailedMount) with FailedPullImage,because of error parsing regexp: invalid or unsupported Perl syntax:(?!``

查了下,golang的regexp不支持这种零宽断言写法,需要使用regexp2。不晓得会不会加入计划