kube-eventer icon indicating copy to clipboard operation
kube-eventer copied to clipboard

webhook正则匹配

Open xuzheng0017 opened this issue 2 years ago • 0 comments

看最近有更新,所以用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。不晓得会不会加入计划

xuzheng0017 avatar Dec 02 '22 08:12 xuzheng0017