From a212c4e13a81ebe1d69db3510af6ae6e8122a6db Mon Sep 17 00:00:00 2001 From: bread <75878656+broadeditz@users.noreply.github.com> Date: Tue, 10 Oct 2023 22:07:33 +0200 Subject: [PATCH] only watch kubernetes if it is configured --- internal/irc-reader/service.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/irc-reader/service.go b/internal/irc-reader/service.go index 8385f3f..f634714 100644 --- a/internal/irc-reader/service.go +++ b/internal/irc-reader/service.go @@ -92,9 +92,11 @@ func (c *Controller) Init() error { } // watch for changes to OAuth in kubernetes secret - err = c.watchKube(context.Background(), c.updateOauthFromKubeSecret) - if err != nil { - return err + if c.cfg.Kube.Oauthsecret != "" { + err = c.watchKube(context.Background(), c.updateOauthFromKubeSecret) + if err != nil { + return err + } } // feed back twitch channels that got disconnected to the IRC