mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
Fix : failed to parse BACKGROUND_SCAN_INTERVAL log message wrong (#9933)
* Update policy_controller.go Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> Signed-off-by: mohamedasifs123 <asifabu272@gmail.com> * Update policy_controller.go Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> Signed-off-by: mohamedasifs123 <asifabu272@gmail.com> * Update policy_controller.go Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> Signed-off-by: mohamedasifs123 <asifabu272@gmail.com> * Update policy_controller.go -s Signed-off-by: mohamedasifs123 <asifabu272@gmail.com> * Update policy_controller.go Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> Signed-off-by: mohamedasifs123 <asifabu272@gmail.com> * Update policy_controller.go Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> Signed-off-by: mohamedasifs123 <asifabu272@gmail.com> --------- Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> Signed-off-by: mohamedasifs123 <asifabu272@gmail.com> Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
This commit is contained in:
parent
12a2ba34b2
commit
97327fd31c
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ func (pc *policyController) canBackgroundProcess(p kyvernov1.PolicyInterface) bo
|
|||
val := os.Getenv("BACKGROUND_SCAN_INTERVAL")
|
||||
interval, err := time.ParseDuration(val)
|
||||
if err != nil {
|
||||
logger.V(4).Info("failed to parse BACKGROUND_SCAN_INTERVAL env variable, falling to default 1h", "msg", err.Error())
|
||||
logger.V(4).Info("The BACKGROUND_SCAN_INTERVAL env variable is not set, therefore the default interval of 1h will be used.", "msg", err.Error())
|
||||
interval = time.Hour
|
||||
}
|
||||
if p.GetCreationTimestamp().Add(interval).After(time.Now()) {
|
||||
|
|
Loading…
Reference in a new issue