mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-29 10:55:05 +00:00
- fix variable validation; - update log level
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
This commit is contained in:
parent
91713ee566
commit
4d01f76797
3 changed files with 3 additions and 7 deletions
|
@ -308,7 +308,7 @@ func main() {
|
|||
case <-registerTicker.C:
|
||||
err = webhookCfg.Register()
|
||||
if err != nil {
|
||||
setupLog.Info("Failed to register admission control webhooks")
|
||||
setupLog.V(3).Info("Failed to register admission control webhooks", "reason", err.Error())
|
||||
} else {
|
||||
break loop
|
||||
}
|
||||
|
|
|
@ -156,11 +156,7 @@ func substituteVariablesIfAny(log logr.Logger, ctx context.EvalInterface) jsonUt
|
|||
variable = strings.TrimSpace(variable)
|
||||
|
||||
operation, err := ctx.Query("request.operation")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to check request.operation")
|
||||
}
|
||||
|
||||
if operation == "DELETE" {
|
||||
if err == nil && operation == "DELETE" {
|
||||
variable = strings.ReplaceAll(variable, "request.object", "request.oldObject")
|
||||
}
|
||||
|
||||
|
|
|
@ -498,6 +498,6 @@ func (wrc *Register) checkEndpoint() error {
|
|||
}
|
||||
}
|
||||
err = fmt.Errorf("Endpoint not ready")
|
||||
wrc.log.Error(err, "Endpoint not ready", "ns", config.KyvernoNamespace, "name", config.KyvernoServiceName)
|
||||
wrc.log.V(3).Info(err.Error(), "ns", config.KyvernoNamespace, "name", config.KyvernoServiceName)
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue