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

Proxy configmap is renders with wrong broker urls when cluster.sepc.global.components.brokerBaseName is configured #160

Open
MarkusNeuron opened this issue Sep 21, 2023 · 0 comments

Comments

@MarkusNeuron
Copy link

MarkusNeuron commented Sep 21, 2023

By configuring:

cluster:
  spec:
    global:
      components: # legacy names to be compatible with existing clusters
        brokerBaseName: neuron-pulsar-broker

The service is created correctly:

kind: Service
apiVersion: v1
metadata:
  name: dev01-neuron-pulsar-broker
  namespace: dev01-neuron-pulsar
  labels:
    app: pulsar
    cluster: dev01
    component: neuron-pulsar-broker
    resource-set: broker
spec:
  clusterIP: None
  ipFamilies:
    - IPv4
  ports:
    - name: http
      protocol: TCP
  ...
  ...
  selector:
    app: pulsar
    cluster: dev01
    component: neuron-pulsar-broker

but both dev01-neuron-pulsar-proxy and dev01-neuron-pulsar-proxy-ws config maps contain the wrong broker urls because broker- is prefixed but should not be. Wrong URL http://dev01-broker-neuron-pulsar-broker.dev01-neuron-pulsar.svc.cluster.local:8080/ instead of correct URL http://dev01-neuron-pulsar-broker.dev01-neuron-pulsar.svc.cluster.local:8080/

Proxy config map wrong values PULSAR_PREFIX_brokerServiceURL, PULSAR_PREFIX_brokerServiceURLTLS, PULSAR_PREFIX_brokerWebServiceURL, PULSAR_PREFIX_brokerWebServiceURLTLS:

kind: ConfigMap
apiVersion: v1
metadata:
  name: dev01-neuron-pulsar-proxy
  namespace: dev01-neuron-pulsar
  labels:
    app: pulsar
    cluster: dev01
    component: neuron-pulsar-proxy
    resource-set: proxy
data:
  PULSAR_PREFIX_numHttpServerThreads: '10'
  PULSAR_PREFIX_tlsHostnameVerificationEnabled: 'false'
  PULSAR_LOG_ROOT_LEVEL: info
  PULSAR_LOG_LEVEL: info
  PULSAR_PREFIX_brokerServiceURL: pulsar://dev01-broker-neuron-pulsar-broker.dev01-neuron-pulsar.svc.cluster.local:6650/
  PULSAR_PREFIX_brokerServiceURLTLS: pulsar+ssl://dev01-broker-neuron-pulsar-broker.dev01-neuron-pulsar.svc.cluster.local:6651/
  PULSAR_PREFIX_brokerWebServiceURL: http://dev01-broker-neuron-pulsar-broker.dev01-neuron-pulsar.svc.cluster.local:8080/
  PULSAR_PREFIX_brokerWebServiceURLTLS: https://dev01-broker-neuron-pulsar-broker.dev01-neuron-pulsar.svc.cluster.local:8443/
  PULSAR_EXTRA_OPTS: '-Dpulsar.log.root.level=info'
  PULSAR_PREFIX_authenticateMetricsEndpoint: 'false'
  PULSAR_PREFIX_tlsEnabledWithKeyStore: 'false'
  PULSAR_PREFIX_clusterName: dev01
  PULSAR_PREFIX_configurationStoreServers: 'dev01-neuron-pulsar-zookeeper-ca.dev01-neuron-pulsar.svc.cluster.local:2181'
  PULSAR_PREFIX_zookeeperServers: 'dev01-neuron-pulsar-zookeeper-ca.dev01-neuron-pulsar.svc.cluster.local:2181'
  PULSAR_PREFIX_forwardAuthorizationCredentials: 'true'

Proxy WS config map wrong values PULSAR_PREFIX_serviceUrl, PULSAR_PREFIX_serviceUrlTls, PULSAR_PREFIX_brokerServiceUrl, PULSAR_PREFIX_brokerServiceUrlTls:

kind: ConfigMap
apiVersion: v1
metadata:
  name: dev01-neuron-pulsar-proxy-ws
  namespace: dev01-neuron-pulsar
  labels:
    app: pulsar
    cluster: dev01
    component: neuron-pulsar-proxy
    resource-set: proxy
data:
  PULSAR_PREFIX_numHttpServerThreads: '10'
  PULSAR_PREFIX_tlsHostnameVerificationEnabled: 'false'
  PULSAR_LOG_ROOT_LEVEL: info
  PULSAR_PREFIX_serviceUrl: http://dev01-broker-neuron-pulsar-broker.dev01-neuron-pulsar.svc.cluster.local:8080/
  PULSAR_PREFIX_serviceUrlTls: https://dev01-broker-neuron-pulsar-broker.dev01-neuron-pulsar.svc.cluster.local:8443/
  PULSAR_PREFIX_brokerServiceUrl: pulsar://dev01-broker-neuron-pulsar-broker.dev01-neuron-pulsar.svc.cluster.local:6650/
  PULSAR_PREFIX_brokerServiceUrlTls: pulsar+ssl://dev01-broker-neuron-pulsar-broker.dev01-neuron-pulsar.svc.cluster.local:6651/
  PULSAR_LOG_LEVEL: info
  PULSAR_PREFIX_webServicePort: '8000'
  PULSAR_PREFIX_zookeeperServers: 'dev01-neuron-pulsar-zookeeper-ca.dev01-neuron-pulsar.svc.cluster.local:2181'
  PULSAR_EXTRA_OPTS: '-Dpulsar.log.root.level=info'
  PULSAR_PREFIX_tlsEnabledWithKeyStore: 'false'
  PULSAR_PREFIX_clusterName: dev01
  PULSAR_PREFIX_configurationStoreServers: 'dev01-neuron-pulsar-zookeeper-ca.dev01-neuron-pulsar.svc.cluster.local:2181'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant