prevent fuzzer from generating impossible configurations

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2024-03-05 19:37:23 +01:00
parent 620d6ff679
commit ad1847cc3c
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D

View File

@ -34,6 +34,19 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
s.PprofAddress = "something:1234"
}
if s.LeaderElectionConfig.Namespace == "" {
s.LeaderElectionConfig.Namespace = "something"
}
if s.LeaderElectionConfig.LeaseDuration == 0 {
s.LeaderElectionConfig.LeaseDuration = 1234
}
if s.LeaderElectionConfig.RenewDeadline == 0 {
s.LeaderElectionConfig.RenewDeadline = 1234
}
if s.LeaderElectionConfig.RetryPeriod == 0 {
s.LeaderElectionConfig.RetryPeriod = 1234
}
logsapi.SetRecommendedLoggingConfiguration(&s.Logging)
},
}