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

fix: External Scalers docs explain correctly the parameters #1248

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
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
57 changes: 48 additions & 9 deletions content/docs/2.11/scalers/external-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ triggers:
**Parameter list:**

- `scalerAddress` - Address of the external push scaler implementing `ExternalScaler.StreamIsActive` in externalscaler.proto. Format must be `host:port`.
- `caCert` - Location of a Certificate Authority (CA) certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientCert` - Location of a client certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientKey` - Location of a client private key to use for the GRPC connection to authenticate with. (Optional)
- `tlsCertFile` - Location of a certificate to use for the GRPC connection to authenticate with. (Optional)
- `unsafeSsl` - Skip certificate validation when connecting over HTTPS. (Values: `true`, `false`, Default: `false`, Optional)

The entire metadata object is passed to the external scaler in `ScaledObjectRef.scalerMetadata`.
Expand All @@ -36,25 +34,66 @@ The entire metadata object is passed to the external scaler in `ScaledObjectRef.

### Authentication Parameters

Not supported.
- `caCert` - Certificate Authority (CA) certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientCert` - Client certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientKey` - Client private key to use for the GRPC connection to authenticate with. (Optional)

### Example

```yaml
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: name
namespace: namespace
name: external-scaledobject
spec:
scaleTargetRef:
name: keda-node
triggers:
- type: external-push
metadata:
scalerAddress: external-scaler-service:8080
caCert : /path/to/tls/ca.pem
tlsClientCert: /path/to/tls/cert.pem
tlsClientKey: /path/to/tls/key.pem
unsafeSsl: false
```

Here is an example of external scaler with certificates

```yaml
apiVersion: v1
kind: Secret
metadata:
name: certificate
data:
ca.crt: "YOUR_CA_IN_SECRET"
tls.crt: "YOUR_CERTIFICATE_IN_SECRET"
tls.key: "YOUR_KEY_IN_SECRET"
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth
spec:
secretTargetRef:
- parameter: caCert
name: certificate
key: ca.crt
- parameter: tlsClientCert
name: certificate
key: tls.crt
- parameter: tlsClientKey
name: certificate
key: tls.key
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: external-scaledobject
spec:
scaleTargetRef:
name: keda-node
triggers:
- type: external-push
metadata:
scalerAddress: external-scaler-service:8080
authenticationRef:
name: keda-trigger-auth
```
59 changes: 53 additions & 6 deletions content/docs/2.11/scalers/external.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,26 @@ triggers:
**Parameter list:**

- `scalerAddress` - Address of the external scaler. Format must be `host:port`.
- `caCert` - Location of a Certificate Authority (CA) certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientCert` - Location of a client certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientKey` - Location of a client private key to use for the GRPC connection to authenticate with. (Optional)
- `tlsCertFile` - Location of a certificate to use for the GRPC connection to authenticate with. (Optional)
- `unsafeSsl` - Skip certificate validation when connecting over HTTPS. (Values: `true`, `false`, Default: `false`, Optional)

The entire metadata object is passed to the external scaler in `ScaledObjectRef.scalerMetadata`.

> For implementing an external scaler, refer to [External Scalers Concept](../concepts/external-scalers.md).

### Authentication Parameters

Not supported yet.
- `caCert` - Certificate Authority (CA) certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientCert` - Client certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientKey` - Client private key to use for the GRPC connection to authenticate with. (Optional)

### Example

```yaml
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: redis-scaledobject
namespace: keda-redis-test
name: external-scaledobject
spec:
scaleTargetRef:
name: keda-redis-node
Expand All @@ -56,3 +57,49 @@ spec:
listName: mylist
listLength: "5"
```

Here is an example of external scaler with certificates

```yaml
apiVersion: v1
kind: Secret
metadata:
name: certificate
data:
ca.crt: "YOUR_CA_IN_SECRET"
tls.crt: "YOUR_CERTIFICATE_IN_SECRET"
tls.key: "YOUR_KEY_IN_SECRET"
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth
spec:
secretTargetRef:
- parameter: caCert
name: certificate
key: ca.crt
- parameter: tlsClientCert
name: certificate
key: tls.crt
- parameter: tlsClientKey
name: certificate
key: tls.key
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: external-scaledobject
spec:
scaleTargetRef:
name: keda-redis-node
triggers:
- type: external
metadata:
scalerAddress: redis-external-scaler-service:8080
metricType: mymetric
scalerAddress: mydomain.com:443
extraKey: "demo"
authenticationRef:
name: keda-trigger-auth
```
63 changes: 54 additions & 9 deletions content/docs/2.12/scalers/external-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ triggers:
**Parameter list:**

- `scalerAddress` - Address of the external push scaler implementing `ExternalScaler.StreamIsActive` in externalscaler.proto. Format must be `host:port`.
- `caCert` - Location of a Certificate Authority (CA) certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientCert` - Location of a client certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientKey` - Location of a client private key to use for the GRPC connection to authenticate with. (Optional)
- `tlsCertFile` - Location of a certificate to use for the GRPC connection to authenticate with. (Optional)
- `unsafeSsl` - Skip certificate validation when connecting over HTTPS. (Values: `true`, `false`, Default: `false`, Optional)

The entire metadata object is passed to the external scaler in `ScaledObjectRef.scalerMetadata`.
Expand All @@ -36,25 +34,72 @@ The entire metadata object is passed to the external scaler in `ScaledObjectRef.

### Authentication Parameters

Not supported.
- `caCert` - Certificate Authority (CA) certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientCert` - Client certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientKey` - Client private key to use for the GRPC connection to authenticate with. (Optional)

### Authentication Parameters

- `caCert` - Certificate Authority (CA) certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientCert` - Client certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientKey` - Client private key to use for the GRPC connection to authenticate with. (Optional)

### Example

```yaml
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: name
namespace: namespace
name: external-scaledobject
spec:
scaleTargetRef:
name: keda-node
triggers:
- type: external-push
metadata:
scalerAddress: external-scaler-service:8080
caCert : /path/to/tls/ca.pem
tlsClientCert: /path/to/tls/cert.pem
tlsClientKey: /path/to/tls/key.pem
unsafeSsl: false
```

Here is an example of external scaler with certificates

```yaml
apiVersion: v1
kind: Secret
metadata:
name: certificate
data:
ca.crt: "YOUR_CA_IN_SECRET"
tls.crt: "YOUR_CERTIFICATE_IN_SECRET"
tls.key: "YOUR_KEY_IN_SECRET"
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth
spec:
secretTargetRef:
- parameter: caCert
name: certificate
key: ca.crt
- parameter: tlsClientCert
name: certificate
key: tls.crt
- parameter: tlsClientKey
name: certificate
key: tls.key
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: external-scaledobject
spec:
scaleTargetRef:
name: keda-node
triggers:
- type: external-push
metadata:
scalerAddress: external-scaler-service:8080
authenticationRef:
name: keda-trigger-auth
```
59 changes: 53 additions & 6 deletions content/docs/2.12/scalers/external.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,26 @@ triggers:
**Parameter list:**

- `scalerAddress` - Address of the external scaler. Format must be `host:port`.
- `caCert` - Location of a Certificate Authority (CA) certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientCert` - Location of a client certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientKey` - Location of a client private key to use for the GRPC connection to authenticate with. (Optional)
- `tlsCertFile` - Location of a certificate to use for the GRPC connection to authenticate with. (Optional)
- `unsafeSsl` - Skip certificate validation when connecting over HTTPS. (Values: `true`, `false`, Default: `false`, Optional)

The entire metadata object is passed to the external scaler in `ScaledObjectRef.scalerMetadata`.

> For implementing an external scaler, refer to [External Scalers Concept](../concepts/external-scalers.md).

### Authentication Parameters

Not supported yet.
- `caCert` - Certificate Authority (CA) certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientCert` - Client certificate to use for the GRPC connection to authenticate with. (Optional)
- `tlsClientKey` - Client private key to use for the GRPC connection to authenticate with. (Optional)

### Example

```yaml
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: redis-scaledobject
namespace: keda-redis-test
name: external-scaledobject
spec:
scaleTargetRef:
name: keda-redis-node
Expand All @@ -56,3 +57,49 @@ spec:
listName: mylist
listLength: "5"
```

Here is an example of external scaler with certificates

```yaml
apiVersion: v1
kind: Secret
metadata:
name: certificate
data:
ca.crt: "YOUR_CA_IN_SECRET"
tls.crt: "YOUR_CERTIFICATE_IN_SECRET"
tls.key: "YOUR_KEY_IN_SECRET"
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth
spec:
secretTargetRef:
- parameter: caCert
name: certificate
key: ca.crt
- parameter: tlsClientCert
name: certificate
key: tls.crt
- parameter: tlsClientKey
name: certificate
key: tls.key
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: external-scaledobject
spec:
scaleTargetRef:
name: keda-redis-node
triggers:
- type: external
metadata:
scalerAddress: redis-external-scaler-service:8080
metricType: mymetric
scalerAddress: mydomain.com:443
extraKey: "demo"
authenticationRef:
name: keda-trigger-auth
```
Loading