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,14 +98,11 @@ 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 {
if len(v) > 0 && v[0] == v1.DryRunAll {
klog.V(6).Infof("ignore dryRun request %s", req.URL.Path) klog.V(6).Infof("ignore dryRun request %s", req.URL.Path)
return nil return nil
} }
} }
}
e := &auditv1alpha1.Event{ e := &auditv1alpha1.Event{
Workspace: info.Workspace, Workspace: info.Workspace,