Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS logging eror when using only a store path #1197

Open
julopezc-acciona opened this issue Dec 2, 2024 · 0 comments
Open

TLS logging eror when using only a store path #1197

julopezc-acciona opened this issue Dec 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@julopezc-acciona
Copy link

Report

When declaring only the environment variable KEDA_HTTP_PROXY_TLS_CERT_STORE_PATHS keda-add-ons-http-interceptor fails to launch because it looks first in the folder KEDA_HTTP_PROXY_TLS_CERT_STORE_PATHS for a tls.crt file and fails when logging

Expected Behavior

Log without failure

Actual Behavior

Fails when logging the ignore key

Steps to Reproduce the Problem

  1. Setup the env variable KEDA_HTTP_PROXY_TLS_CERT_STORE_PATHS but do not set KEDA_HTTP_PROXY_TLS_KEY_PATH nor KEDA_HTTP_PROXY_TLS_KEY_PATH
  2. keda-add-ons-http-interceptor starts looking into the folder specified by KEDA_HTTP_PROXY_TLS_CERT_STORE_PATHS and if it finds no tls.crt here, it fails instead of recursively searching (there are certificates at $KEDA_HTTP_PROXY_TLS_CERT_STORE_PATHS/app1 and KEDA_HTTP_PROXY_TLS_CERT_STORE_PATHS/app2 though)

Logs from KEDA HTTP operator

2024-12-02T12:46:07Z    DPANIC    odd number of arguments passed as key-value pairs for logging    {"ignored key": "open /certs/tls.crt: no such file or directory"}
main.runProxyServer
    github.com/kedacore/http-add-on/interceptor/main.go:258
main.main.func5
    github.com/kedacore/http-add-on/interceptor/main.go:176
golang.org/x/sync/errgroup.(*Group).Go.func1
    golang.org/x/[email protected]/errgroup/errgroup.go:78
panic: odd number of arguments passed as key-value pairs for logging

goroutine 71 [running]:
go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x8c?, 0xb?, {0x0?, 0x0?, 0xc000512200?})
    go.uber.org/[email protected]/zapcore/entry.go:196 +0x54
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000275a00, {0xc000300240, 0x1, 0x1})
    go.uber.org/[email protected]/zapcore/entry.go:262 +0x24e
go.uber.org/zap.(*Logger).DPanic(0x1d9888c?, {0x1df617a?, 0x1b36900?}, {0xc000300240, 0x1, 0x1})
    go.uber.org/[email protected]/logger.go:275 +0x51
github.com/go-logr/zapr.(*zapLogger).handleFields(0xc00029d080, 0xffffffffffffffff, {0xc0002be0b0, 0x1, 0xc0003c08a0?}, {0xc0003001c0, 0x1, 0x7fe960969f18?})
    github.com/go-logr/[email protected]/zapr.go:147 +0xd33
github.com/go-logr/zapr.(*zapLogger).Error(0xc00029d080, {0x204a980, 0xc0002be090}, {0x1d90265?, 0xc0003c0948?}, {0xc0002be0b0, 0x1, 0x1})
    github.com/go-logr/[email protected]/zapr.go:207 +0x18d
sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).Error(0xc0001b9b00, {0x204a980, 0xc0002be090}, {0x1d90265, 0x5}, {0xc0002be0b0, 0x1, 0x1})
    sigs.k8s.io/[email protected]/pkg/log/deleg.go:142 +0xed
github.com/go-logr/logr.Logger.Error({{0x2070300?, 0xc0001b9b00?}, 0x5?}, {0x204a980, 0xc0002be090}, {0x1d90265, 0x5}, {0xc0002be0b0, 0x1, 0x1})
    github.com/go-logr/[email protected]/logr.go:301 +0xec
main.runProxyServer({0x206aa70, 0xc000282000}, {{0x2070300?, 0xc0001b9b00?}, 0x0?}, {0x206f7c8, 0xc0000104e0}, 0xc00051a6c0, {0x206aeb0, 0xc0001ec9a0}, ...)
    github.com/kedacore/http-add-on/interceptor/main.go:258 +0x445
main.main.func5()
    github.com/kedacore/http-add-on/interceptor/main.go:176 +0x2f5
golang.org/x/sync/errgroup.(*Group).Go.func1()
    golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
    golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96

HTTP Add-on Version

0.8.0

Kubernetes Version

1.28

Platform

Microsoft Azure

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To Triage
Development

No branches or pull requests

1 participant