Skip to content

Panic(nil) when the TLS certificate in Secret is the default one #626

@tdeverdiere

Description

@tdeverdiere

Describe the bug
The instructions in the README do not work since 1.13 : https://github.com/knative-extensions/eventing-redis/tree/main/config/source

And the modifications in code does not allow to start the redis source stream without a TLS certificate for Redis.

An error log in redis stream source pod:

panic: panic called with nil argument

goroutine 1 [running]:
[knative.dev/eventing-redis/pkg/source/adapter.(*Adapter).newPool.func1()](http://knative.dev/eventing-redis/pkg/source/adapter.(*Adapter).newPool.func1())
[knative.dev/eventing-redis/pkg/source/adapter/adapter.go:244](http://knative.dev/eventing-redis/pkg/source/adapter/adapter.go:244) +0x3ab

Expected behavior
Without TLS certificate for Redis in the secret it should run properly

To Reproduce
Follow the README here: https://github.com/knative-extensions/eventing-redis/tree/main/config/source

Knative release version
1.15.0

Additional context
The tls-secret.yaml file contains a default certificate: https://github.com/knative-extensions/eventing-redis/blob/main/config/source/tls-secret.yaml
If we replace the tls_cert value by "" like:

stringData:
  # the data is abbreviated in this example
  TLS_CERT: ""

it fails in pkg/source/reconciler/streamsource/streamsource.go:136

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions