diff --git a/content/docs/2.8/scalers/apache-kafka.md b/content/docs/2.8/scalers/apache-kafka.md index 7a2b079f6..27fc9276d 100644 --- a/content/docs/2.8/scalers/apache-kafka.md +++ b/content/docs/2.8/scalers/apache-kafka.md @@ -32,6 +32,7 @@ triggers: allowIdleConsumers: false scaleToZeroOnInvalidOffset: false version: 1.0.0 + partitionLimitation: '1,2,10-20,31' ``` **Parameter list:** @@ -48,6 +49,7 @@ partitions on a topic, allowing for idle consumers. (Default: `false`, Optional) If 'false' (the default), the scaler will keep a single consumer for that partition. Otherwise ('true'), the consumers for that partition will be scaled to zero. See the [discussion](https://github.com/kedacore/keda/issues/2612) about this parameter. - `version` - Version of your Kafka brokers. See [samara](https://github.com/Shopify/sarama) version (Default: `1.0.0`, Optional) +- `partitionLimitation` - Comma separated list of partition ids to scope the scaling on. Allowed patterns are "x,y" and/or ranges "x-y". If set, the calculation of the lag will only take these ids into account. (Default: All partitions, Optional) > **Note:** > diff --git a/content/docs/2.9/scalers/etcd.md b/content/docs/2.9/scalers/etcd.md new file mode 100644 index 000000000..e8008a283 --- /dev/null +++ b/content/docs/2.9/scalers/etcd.md @@ -0,0 +1,117 @@ ++++ +title = "Etcd" +availability = "v2.9+" +maintainer = "Huawei Cloud" +description = "Scale applications based on an etcd key-value pair. By watching an etcd key, a passively received push mode, the scaler can activate applications with lower load usage than frequent pull mode" +go_file = "etcd_scaler" ++++ + +### Trigger Specification + +This specification describes the `etcd` trigger that scales based on an etcd key-value pair. + +```yaml + triggers: + - type: etcd + metadata: + endpoints: 172.0.0.1:2379,172.0.0.2:2379,172.0.0.3:2379 + watchKey: length + value: '5.5' + activationValue: '0.5' + watchProgressNotifyInterval: '600' +``` + +**Parameter list:** + +- `endpoints` - Etcd servers' endpoints information. It supports multiple endpoints split by a comma character (`,`). +- `watchKey` - Name of the etcd key used for the scaler client to get/watch the etcd value from etcd servers. +- `value` - Target relation between the scaled workload and the etcd value. It will be calculated following this formula: relation = (etcd value) / (scaled workload pods). (This value can be a float) +- `activationValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float) +- `watchProgressNotifyInterval` - Set this parameter to the same as `--experimental-watch-progress-notify-interval` parameter of etcd servers. (Default: `600`, units are seconds, Optional) + +### Authentication Parameters + +You can use `TriggerAuthentication` CRD to configure the authenticate by tls. It is required you should set `tls` to `enable`. If required for your etcd configuration, you may also provide a `ca`, `cert`, `key` and `keyPassword`. `cert` and `key` must be specified together. + +**Credential based authentication:** + +**TLS:** + +- `tls` - To enable SSL auth for Kafka, set this to `enable`. If not set, TLS for Kafka 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) +- `keyPassword` - If set the `keyPassword` is used to decrypt the provided `key`. (Optional) + +### Example + +Your etcd cluster no TLS auth: + +```yaml +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: etcd-scaledobject +spec: + scaleTargetRef: + name: my-app-target + pollingInterval: 30 + triggers: + - type: etcd + metadata: + endpoints: 172.0.0.1:2379,172.0.0.2:2379,172.0.0.3:2379 + watchKey: length + value: '5.5' +``` + +Your etcd cluster turn on SASL/TLS auth: + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: keda-etcd-secrets + namespace: default +data: + tls: ZW5hYmxl + ca: + cert: + key: +--- +apiVersion: keda.sh/v1alpha1 +kind: TriggerAuthentication +metadata: + name: keda-trigger-auth-etcd-credential + namespace: default +spec: + secretTargetRef: + - parameter: tls + name: keda-etcd-secrets + key: tls + - parameter: ca + name: keda-etcd-secrets + key: ca + - parameter: cert + name: keda-etcd-secrets + key: cert + - parameter: key + name: keda-etcd-secrets + key: key +--- +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: etcd-scaledobject +spec: + scaleTargetRef: + name: my-app-target + pollingInterval: 30 + triggers: + - type: etcd + metadata: + endpoints: 172.0.0.1:2379,172.0.0.2:2379,172.0.0.3:2379 + watchKey: length + value: '5.5' + authenticationRef: + name: keda-trigger-auth-etcd-credential +```