Skip to content

RabbitMQ Scalers -issues in connecting with TLS enabled  #967

Closed
@maverickmetro

Description

When we have a TLS enabled Rabbit MQ service hosted in the cloud, Rabbit MQ scaler is not able to connect to the Rabbit MQ host Receiving the below error in Keda Operator API service pod . In Rabbit MQ Scaler i used the apiHost parameter with https protocol.

E0803 23:09:48.173311       1 provider.go:94] keda_metrics_adapter/provider "msg"="error getting metric for scaler" "error"="error inspecting rabbitMQ: Get \"https://ibm_cloud_26d26b44_4a05_4a02_a7fd_3423c5f6a4f7:***@a5adefe4-8087-450a-83c9-113f3de3b9b0.8117147f814b4b2ea643610826cd2046.databases.appdomain.cloud:30347/api/queues/%2F/KedaTestQueue\": x509: certificate signed by unknown authority"  "ScaledObject.Name"="keda-sample" "ScaledObject.Namespace"="default" "Scaler"={}
E0803 23:09:48.173371       1 status.go:71] apiserver received an error that is not an metav1.Status: &errors.errorString{s:"No matching metrics found for queuelength"}

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

  1. Install Rabbit MQ with TLS enabled
  2. Install Keda
  3. Configure Rabbit MQ scaler scaled object to use apiHost Parameter with https protocol.

Sample Scaled Object Yaml:

apiVersion: v1
kind: Secret
metadata:
  name: rabbitmq-consumer-secret
data:
  RabbitHttpHost: xxxxxxxxxxx #https://XXXXXXXXXXXXX
---
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
  name: keda-sample
  namespace: default
  labels:
    deploymentName: keda-sample
spec:
  scaleTargetRef:
    deploymentName: keda-sample
  pollingInterval: 5 # Optional. Default: 30 seconds
  cooldownPeriod: 30 # Optional. Default: 300 seconds
  minReplicaCount: 1
  maxReplicaCount: 5 # Optional. Default: 100
  triggers:
    - type: rabbitmq
      metadata:
        includeUnacked: "true"
        queueName: KedaTestQueue
        queueLength: "5"
        
      authenticationRef:
        name: rabbitmq-consumer-trigger
---
apiVersion: keda.k8s.io/v1alpha1
kind: TriggerAuthentication
metadata:
  name: rabbitmq-consumer-trigger
  namespace: default
spec:
  secretTargetRef:
    - parameter: apiHost
      name: rabbitmq-consumer-secret
      key: RabbitHttpHost

---

Specifications

  • KEDA Version: 1.5.0
  • Platform & Version: IBM public Cloud
  • Kubernetes Version: 1.15.12
  • Scaler(s): RabbitMQ Scaler

// EDIT: fixed formating (Zbynek)

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    • Status

      Proposed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions