Skip to content

omitEmpty on tlsAllowInsecureConnection causes infinite loop when value is false #374

@ThomasVerhoeven1998

Description

@ThomasVerhoeven1998

We found an issue with tlsAllowInsecureConnection, when set to false it is constantly removed by the operator even though we set it on PulsarConnection resource

I think it is a consequence of the omitEmpty in its definition
false is acting as the nil value for a boolean, therefore it gets omitted. Is this correct?

what's the way forward for us?
can we just drop the tlsAllowInsecureConnection from a spec like the one below?

apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarConnection
metadata:
  name: pulsar-prd-connection
  namespace: prd
spec:
  adminServiceSecureURL: https://...
  adminServiceURL: https://...
  authentication:
    tls:
      clientCertificateKeyPath: /certs/tls.key
      clientCertificatePath: /certs/tls.crt
  brokerServiceSecureURL: pulsar+ssl://...
  tlsAllowInsecureConnection: false
  tlsEnableHostnameVerification: true
  tlsTrustCertsFilePath: /certs/ca.crt

Possible this issue is present on more fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions