mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fix: remove error prone debug field (#4794)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
83bd8bdbb5
commit
f079bfb25f
2 changed files with 1 additions and 9 deletions
|
@ -193,8 +193,6 @@ func main() {
|
|||
signalCtx, signalCancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
defer signalCancel()
|
||||
|
||||
debug := serverIP != ""
|
||||
|
||||
// Metrics Configuration
|
||||
var metricsConfig *metrics.MetricsConfig
|
||||
metricsConfigData, err := config.NewMetricsConfigData(kubeClient)
|
||||
|
@ -320,7 +318,6 @@ func main() {
|
|||
metricsConfig,
|
||||
serverIP,
|
||||
int32(webhookTimeout),
|
||||
debug,
|
||||
autoUpdateWebhooks,
|
||||
logging.GlobalLogger(),
|
||||
)
|
||||
|
@ -552,7 +549,7 @@ func main() {
|
|||
go configurationController.Run(signalCtx, configcontroller.Workers)
|
||||
go eventGenerator.Run(signalCtx, 3)
|
||||
|
||||
if !debug {
|
||||
if serverIP != "" {
|
||||
go webhookMonitor.Run(signalCtx, webhookCfg, certRenewer, eventGenerator)
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ type Register struct {
|
|||
serverIP string // when running outside a cluster
|
||||
timeoutSeconds int32
|
||||
log logr.Logger
|
||||
debug bool
|
||||
autoUpdateWebhooks bool
|
||||
|
||||
// manage implements methods to manage webhook configurations
|
||||
|
@ -84,7 +83,6 @@ func NewRegister(
|
|||
metricsConfig metrics.MetricsConfigManager,
|
||||
serverIP string,
|
||||
webhookTimeout int32,
|
||||
debug bool,
|
||||
autoUpdateWebhooks bool,
|
||||
log logr.Logger,
|
||||
) *Register {
|
||||
|
@ -102,7 +100,6 @@ func NewRegister(
|
|||
serverIP: serverIP,
|
||||
timeoutSeconds: webhookTimeout,
|
||||
log: log.WithName("Register"),
|
||||
debug: debug,
|
||||
autoUpdateWebhooks: autoUpdateWebhooks,
|
||||
}
|
||||
|
||||
|
@ -130,8 +127,6 @@ func (wrc *Register) Register() error {
|
|||
logger := wrc.log
|
||||
if wrc.serverIP != "" {
|
||||
logger.Info("Registering webhook", "url", fmt.Sprintf("https://%s", wrc.serverIP))
|
||||
}
|
||||
if !wrc.debug {
|
||||
if err := wrc.checkEndpoint(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue