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

Add tls auth doc for rabbitmq scaler (#967) #1036

Merged
merged 2 commits into from
Jan 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions content/docs/2.10/scalers/rabbitmq-queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ TriggerAuthentication CRD is used to connect and authenticate to RabbitMQ:

> See the [RabbitMQ Ports](https://www.rabbitmq.com/networking.html#ports) section for more details on how to configure the ports.

**TLS authentication:**

- `tls` - To enable SSL auth for RabbitMQ, set this to `enable`. If not set, TLS for RabbitMQ is not used. (Values: `enable`, `disable`, Default: `disable`, Optional)
- `ca` - Certificate authority file for TLS client authentication. (Optional)
- `cert` - Certificate for client authentication. (Optional)
- `key` - Key for client authentication. (Optional)

> Using RabbitMQ host with amqps will require enabling the tls settings and passing the required parameters.

### Example

#### AMQP protocol:
Expand Down Expand Up @@ -111,6 +120,63 @@ spec:
name: keda-trigger-auth-rabbitmq-conn
```

#### AMQPS protocol with TLS auth:

```yaml
apiVersion: v1
kind: Secret
metadata:
name: keda-rabbitmq-secret
data:
host: <AMQPS URI connection string> # base64 encoded value of format amqps://guest:password@localhost:5672/vhost
tls: "enable"
ca: <your ca>
cert: <your cert>
key: <your key>
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-rabbitmq-conn
namespace: default
spec:
secretTargetRef:
- parameter: host
name: keda-rabbitmq-secret
key: host
- parameter: tls
name: keda-rabbitmq-secret
key: tls
- parameter: ca
name: keda-rabbitmq-secret
key: ca
- parameter: cert
name: keda-rabbitmq-secret
key: cert
- parameter: key
name: keda-rabbitmq-secret
key: key
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: rabbitmq-scaledobject
namespace: default
spec:
scaleTargetRef:
name: rabbitmq-deployment
triggers:
- type: rabbitmq
metadata:
protocol: amqp
queueName: testqueue
mode: QueueLength
value: "20"
metricName: custom-testqueue #optional. Generated value would be `rabbitmq-custom-testqueue`
authenticationRef:
name: keda-trigger-auth-rabbitmq-conn
```

#### HTTP protocol (`QueueLength`):

```yaml
Expand Down