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 docs for tls #1354

Merged
merged 1 commit into from
Apr 10, 2024
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
69 changes: 67 additions & 2 deletions content/docs/2.14/scalers/nats-streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ You can authenticate with the NATS streaming server by using connection string a

- `natsServerMonitoringEndpoint` - Location of the NATS Streaming monitoring endpoint.

### Example
**TLS Authentication**

- `tls` - To enable SSL auth for nats-streaming, set this to `enable`. If not set, TLS for nats-streaming 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)

### Example without any TriggerAuthentication

```yaml
apiVersion: keda.sh/v1alpha1
Expand All @@ -64,7 +71,7 @@ spec:
lagThreshold: "10"
useHttps: "false"
```
#### Example with TriggerAuthentication:
#### Example with no TLS

```yaml
apiVersion: v1
Expand Down Expand Up @@ -109,3 +116,61 @@ spec:
authenticationRef:
name: keda-trigger-auth-stan-secret
```

#### Example with TLS

```yaml
apiVersion: v1
kind: Secret
metadata:
name: keda-stan-secrets
namespace: default
data:
tls: enable
ca: <your ca>
cert: <your cert>
key: <your key>
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-stan-secret
namespace: default
spec:
secretTargetRef:
- parameter: tls
name: keda-stan-secrets
key: tls
- parameter: ca
name: keda-stan-secrets
key: ca
- parameter: cert
name: keda-stan-secrets
key: cert
- parameter: key
name: keda-stan-secrets
key: key
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: stan-scaledobject
namespace: example
spec:
pollingInterval: 10 # Optional. Default: 30 seconds
cooldownPeriod: 30 # Optional. Default: 300 seconds
minReplicaCount: 0 # Optional. Default: 0
maxReplicaCount: 30 # Optional. Default: 100
scaleTargetRef:
name: gonuts-sub
triggers:
- type: stan
metadata:
queueGroup: "grp1"
durableName: "ImDurable"
subject: "Test"
lagThreshold: "10"
useHttps: "true"
authenticationRef:
name: keda-trigger-auth-stan-secret
```
Loading