datastax / kaap

KAAP, Kubernetes Autoscaling for Apache Pulsar
https://datastax.github.io/kaap/
Apache License 2.0
46 stars 16 forks source link

Functions worker configuration for Kubernetes runtime always uses TLS for adminUrl even when TLS is not enabled. #175

Closed josephglanville closed 3 months ago

josephglanville commented 3 months ago

This is hard-coded here: https://github.com/datastax/kaap/blob/b7857177f4cf9258c164ed3f86b6372c23d289db/operator/src/main/java/com/datastax/oss/kaap/controllers/function/FunctionsWorkerResourcesFactory.java#L301-L302

This results in any functions booted using the Kubernetes runtime to error because of attempting to establish a TLS handshake with a plaintext server.

You can work around this by defining the following in the pulsarcluster resource:

spec:
  functionsWorker:
    config:
      functionRuntimeFactoryConfigs:
        jobNamespace: default
        percentMemoryPadding: 10
        pulsarAdminUrl: http://pulsar-function.default.svc.cluster.local:6750/
        pulsarDockerImageName: apachepulsar/pulsar:3.3.1
        pulsarRootDir: /pulsar
        pulsarServiceUrl: pulsar://pulsar-broker.default.svc.cluster.local:6650/
        submittingInsidePod: true

Note the overridden pulsarAdminUrl.

josephglanville commented 3 months ago

Dupe of #156