resovle conversation

Signed-off-by: wanjunlei <wanjunlei@yunify.com>
This commit is contained in:
wanjunlei
2020-07-16 17:32:57 +08:00
parent a0255d6409
commit 5d99024f0b

View File

@@ -98,12 +98,9 @@ func (a *auditing) LogRequestObject(req *http.Request, info *request.RequestInfo
// Ignore the dryRun k8s request. // Ignore the dryRun k8s request.
if info.IsKubernetesRequest { if info.IsKubernetesRequest {
values := req.URL.Query() if len(req.URL.Query()["dryRun"]) != 0 {
if v, ok := values["dryRun"]; ok { klog.V(6).Infof("ignore dryRun request %s", req.URL.Path)
if len(v) > 0 && v[0] == v1.DryRunAll { return nil
klog.V(6).Infof("ignore dryRun request %s", req.URL.Path)
return nil
}
} }
} }