From 3e87999f714410e517ce6773c6a2a6e581e16c11 Mon Sep 17 00:00:00 2001 From: rickbrouwer Date: Mon, 6 Jan 2025 13:15:41 +0100 Subject: [PATCH] Multiple minor corrections (#6404) * Correct namesapce Signed-off-by: rickbrouwer * Remove period Signed-off-by: rickbrouwer * At space Signed-off-by: rickbrouwer * Remove forgotten test Signed-off-by: rickbrouwer * Remove unnecessary optional when default Signed-off-by: Rick Brouwer * Fix scorecard badge Signed-off-by: rickbrouwer * Fix Signed-off-by: Rick Brouwer * Delete space Signed-off-by: Rick Brouwer --------- Signed-off-by: rickbrouwer Signed-off-by: Rick Brouwer --- README.md | 2 +- pkg/common/message/message.go | 2 +- pkg/eventemitter/eventemitter.go | 6 ++--- pkg/scalers/activemq_scaler.go | 4 +-- pkg/scalers/artemis_scaler.go | 20 +++++++-------- pkg/scalers/aws_cloudwatch_scaler.go | 26 +++++++++---------- pkg/scalers/beanstalkd_scaler.go | 10 ++++---- pkg/scalers/cassandra_scaler.go | 2 +- pkg/scalers/couchdb_scaler.go | 18 ++++++------- pkg/scalers/etcd_scaler.go | 18 ++++++------- pkg/scalers/mongo_scaler.go | 22 ++++++++-------- pkg/scalers/postgresql_scaler.go | 14 +++++----- pkg/scalers/prometheus_scaler.go | 14 +++++----- pkg/scalers/pulsar_scaler_test.go | 5 ---- pkg/scalers/rabbitmq_scaler.go | 34 ++++++++++++------------- pkg/scalers/redis_scaler.go | 38 ++++++++++++++-------------- pkg/scalers/redis_streams_scaler.go | 14 +++++----- pkg/scalers/solace_scaler.go | 10 ++++---- pkg/scalers/solr_scaler.go | 8 +++--- pkg/scalers/splunk_scaler.go | 4 +-- 20 files changed, 133 insertions(+), 138 deletions(-) diff --git a/README.md b/README.md index 03d9b1f3d42..8964331a580 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ main build nightly e2e - + Twitter

diff --git a/pkg/common/message/message.go b/pkg/common/message/message.go index 4abcc0402ff..674adad9690 100644 --- a/pkg/common/message/message.go +++ b/pkg/common/message/message.go @@ -17,7 +17,7 @@ limitations under the License. package message const ( - ScalerIsBuiltMsg = "Scaler %s is built." + ScalerIsBuiltMsg = "Scaler %s is built" ScalerStartMsg = "Started scalers watch" diff --git a/pkg/eventemitter/eventemitter.go b/pkg/eventemitter/eventemitter.go index 91d57f3ca4d..2faef86b8ac 100644 --- a/pkg/eventemitter/eventemitter.go +++ b/pkg/eventemitter/eventemitter.go @@ -73,7 +73,7 @@ type EventEmitter struct { type EventHandler interface { DeleteCloudEventSource(cloudEventSource eventingv1alpha1.CloudEventSourceInterface) error HandleCloudEventSource(ctx context.Context, cloudEventSource eventingv1alpha1.CloudEventSourceInterface) error - Emit(object runtime.Object, namesapce string, eventType string, cloudeventType eventingv1alpha1.CloudEventType, reason string, message string) + Emit(object runtime.Object, namespace string, eventType string, cloudeventType eventingv1alpha1.CloudEventType, reason string, message string) } // EventDataHandler defines the behavior for different event handlers @@ -328,7 +328,7 @@ func (e *EventEmitter) checkEventHandlers(ctx context.Context, cloudEventSourceI } // Emit is emitting event to both local kubernetes and custom CloudEventSource handler. After emit event to local kubernetes, event will inqueue and waitng for handler's consuming. -func (e *EventEmitter) Emit(object runtime.Object, namesapce string, eventType string, cloudeventType eventingv1alpha1.CloudEventType, reason, message string) { +func (e *EventEmitter) Emit(object runtime.Object, namespace string, eventType string, cloudeventType eventingv1alpha1.CloudEventType, reason, message string) { e.recorder.Event(object, eventType, reason, message) e.eventHandlersCacheLock.RLock() @@ -340,7 +340,7 @@ func (e *EventEmitter) Emit(object runtime.Object, namesapce string, eventType s objectName, _ := meta.NewAccessor().Name(object) objectType, _ := meta.NewAccessor().Kind(object) eventData := eventdata.EventData{ - Namespace: namesapce, + Namespace: namespace, CloudEventType: cloudeventType, ObjectName: strings.ToLower(objectName), ObjectType: strings.ToLower(objectType), diff --git a/pkg/scalers/activemq_scaler.go b/pkg/scalers/activemq_scaler.go index 1512052d110..4e92d0e0e31 100644 --- a/pkg/scalers/activemq_scaler.go +++ b/pkg/scalers/activemq_scaler.go @@ -42,8 +42,8 @@ type activeMQMetadata struct { CorsHeader string `keda:"name=corsHeader, order=triggerMetadata, optional"` RestAPITemplate string `keda:"name=restAPITemplate, order=triggerMetadata, optional"` - TargetQueueSize int64 `keda:"name=targetQueueSize, order=triggerMetadata, optional, default=10"` - ActivationTargetQueueSize int64 `keda:"name=activationTargetQueueSize, order=triggerMetadata, optional, default=0"` + TargetQueueSize int64 `keda:"name=targetQueueSize, order=triggerMetadata, default=10"` + ActivationTargetQueueSize int64 `keda:"name=activationTargetQueueSize, order=triggerMetadata, default=0"` } func (a *activeMQMetadata) Validate() error { diff --git a/pkg/scalers/artemis_scaler.go b/pkg/scalers/artemis_scaler.go index c845beae037..854de3636c2 100644 --- a/pkg/scalers/artemis_scaler.go +++ b/pkg/scalers/artemis_scaler.go @@ -27,16 +27,16 @@ type artemisScaler struct { //revive:disable:var-naming breaking change on restApiTemplate, wouldn't bring any benefit to users type artemisMetadata struct { TriggerIndex int - ManagementEndpoint string `keda:"name=managementEndpoint, order=triggerMetadata, optional"` - QueueName string `keda:"name=queueName, order=triggerMetadata, optional"` - BrokerName string `keda:"name=brokerName, order=triggerMetadata, optional"` - BrokerAddress string `keda:"name=brokerAddress, order=triggerMetadata, optional"` - Username string `keda:"name=username, order=authParams;triggerMetadata;resolvedEnv"` - Password string `keda:"name=password, order=authParams;triggerMetadata;resolvedEnv"` - RestAPITemplate string `keda:"name=restApiTemplate, order=triggerMetadata, optional"` - QueueLength int64 `keda:"name=queueLength, order=triggerMetadata, optional, default=10"` - ActivationQueueLength int64 `keda:"name=activationQueueLength, order=triggerMetadata, optional, default=10"` - CorsHeader string `keda:"name=corsHeader, order=triggerMetadata, optional"` + ManagementEndpoint string `keda:"name=managementEndpoint, order=triggerMetadata, optional"` + QueueName string `keda:"name=queueName, order=triggerMetadata, optional"` + BrokerName string `keda:"name=brokerName, order=triggerMetadata, optional"` + BrokerAddress string `keda:"name=brokerAddress, order=triggerMetadata, optional"` + Username string `keda:"name=username, order=authParams;triggerMetadata;resolvedEnv"` + Password string `keda:"name=password, order=authParams;triggerMetadata;resolvedEnv"` + RestAPITemplate string `keda:"name=restApiTemplate, order=triggerMetadata, optional"` + QueueLength int64 `keda:"name=queueLength, order=triggerMetadata, default=10"` + ActivationQueueLength int64 `keda:"name=activationQueueLength, order=triggerMetadata, default=10"` + CorsHeader string `keda:"name=corsHeader, order=triggerMetadata, optional"` } //revive:enable:var-naming diff --git a/pkg/scalers/aws_cloudwatch_scaler.go b/pkg/scalers/aws_cloudwatch_scaler.go index 534d259335f..9c16168a2c5 100644 --- a/pkg/scalers/aws_cloudwatch_scaler.go +++ b/pkg/scalers/aws_cloudwatch_scaler.go @@ -28,24 +28,24 @@ type awsCloudwatchMetadata struct { awsAuthorization awsutils.AuthorizationMetadata triggerIndex int - Namespace string `keda:"name=namespace, order=triggerMetadata, optional"` - MetricsName string `keda:"name=metricName, order=triggerMetadata, optional"` - DimensionName []string `keda:"name=dimensionName, order=triggerMetadata, optional, separator=;"` + Namespace string `keda:"name=namespace, order=triggerMetadata, optional"` + MetricsName string `keda:"name=metricName, order=triggerMetadata, optional"` + DimensionName []string `keda:"name=dimensionName, order=triggerMetadata, optional, separator=;"` DimensionValue []string `keda:"name=dimensionValue, order=triggerMetadata, optional, separator=;"` - Expression string `keda:"name=expression, order=triggerMetadata, optional"` + Expression string `keda:"name=expression, order=triggerMetadata, optional"` - TargetMetricValue float64 `keda:"name=targetMetricValue, order=triggerMetadata"` + TargetMetricValue float64 `keda:"name=targetMetricValue, order=triggerMetadata"` ActivationTargetMetricValue float64 `keda:"name=activationTargetMetricValue, order=triggerMetadata, optional"` - MinMetricValue float64 `keda:"name=minMetricValue, order=triggerMetadata"` - IgnoreNullValues bool `keda:"name=ignoreNullValues, order=triggerMetadata, optional, default=true"` + MinMetricValue float64 `keda:"name=minMetricValue, order=triggerMetadata"` + IgnoreNullValues bool `keda:"name=ignoreNullValues, order=triggerMetadata, default=true"` - MetricCollectionTime int64 `keda:"name=metricCollectionTime, order=triggerMetadata, optional, default=300"` - MetricStat string `keda:"name=metricStat, order=triggerMetadata, optional, default=Average"` - MetricUnit string `keda:"name=metricUnit, order=triggerMetadata, optional"` // Need to check the metric unit - MetricStatPeriod int64 `keda:"name=metricStatPeriod, order=triggerMetadata, optional, default=300"` - MetricEndTimeOffset int64 `keda:"name=metricEndTimeOffset, order=triggerMetadata, optional, default=0"` + MetricCollectionTime int64 `keda:"name=metricCollectionTime, order=triggerMetadata, default=300"` + MetricStat string `keda:"name=metricStat, order=triggerMetadata, default=Average"` + MetricUnit string `keda:"name=metricUnit, order=triggerMetadata, optional"` // Need to check the metric unit + MetricStatPeriod int64 `keda:"name=metricStatPeriod, order=triggerMetadata, default=300"` + MetricEndTimeOffset int64 `keda:"name=metricEndTimeOffset, order=triggerMetadata, default=0"` - AwsRegion string `keda:"name=awsRegion, order=triggerMetadata;authParams"` + AwsRegion string `keda:"name=awsRegion, order=triggerMetadata;authParams"` AwsEndpoint string `keda:"name=awsEndpoint, order=triggerMetadata, optional"` } diff --git a/pkg/scalers/beanstalkd_scaler.go b/pkg/scalers/beanstalkd_scaler.go index a658b4f104f..900d98d8779 100644 --- a/pkg/scalers/beanstalkd_scaler.go +++ b/pkg/scalers/beanstalkd_scaler.go @@ -34,12 +34,12 @@ type BeanstalkdScaler struct { } type BeanstalkdMetadata struct { - Server string `keda:"name=server, order=triggerMetadata"` - Tube string `keda:"name=tube, order=triggerMetadata"` - Value float64 `keda:"name=value, order=triggerMetadata"` + Server string `keda:"name=server, order=triggerMetadata"` + Tube string `keda:"name=tube, order=triggerMetadata"` + Value float64 `keda:"name=value, order=triggerMetadata"` ActivationValue float64 `keda:"name=activationValue, order=triggerMetadata, optional"` - IncludeDelayed bool `keda:"name=includeDelayed, order=triggerMetadata, optional"` - Timeout uint `keda:"name=timeout, order=triggerMetadata, optional, default=30"` + IncludeDelayed bool `keda:"name=includeDelayed, order=triggerMetadata, optional"` + Timeout uint `keda:"name=timeout, order=triggerMetadata, default=30"` TriggerIndex int } diff --git a/pkg/scalers/cassandra_scaler.go b/pkg/scalers/cassandra_scaler.go index b41dddb9dec..fc42fa40fb1 100644 --- a/pkg/scalers/cassandra_scaler.go +++ b/pkg/scalers/cassandra_scaler.go @@ -28,7 +28,7 @@ type cassandraScaler struct { type cassandraMetadata struct { Username string `keda:"name=username, order=triggerMetadata"` Password string `keda:"name=password, order=authParams"` - TLS string `keda:"name=tls, order=authParams, enum=enable;disable, default=disable, optional"` + TLS string `keda:"name=tls, order=authParams, enum=enable;disable, default=disable"` Cert string `keda:"name=cert, order=authParams, optional"` Key string `keda:"name=key, order=authParams, optional"` CA string `keda:"name=ca, order=authParams, optional"` diff --git a/pkg/scalers/couchdb_scaler.go b/pkg/scalers/couchdb_scaler.go index b84332b7127..114f8800d04 100644 --- a/pkg/scalers/couchdb_scaler.go +++ b/pkg/scalers/couchdb_scaler.go @@ -24,15 +24,15 @@ type couchDBScaler struct { } type couchDBMetadata struct { - ConnectionString string `keda:"name=connectionString,order=authParams;triggerMetadata;resolvedEnv,optional"` - Host string `keda:"name=host,order=authParams;triggerMetadata,optional"` - Port string `keda:"name=port,order=authParams;triggerMetadata,optional"` - Username string `keda:"name=username,order=authParams;triggerMetadata,optional"` - Password string `keda:"name=password,order=authParams;triggerMetadata;resolvedEnv,optional"` - DBName string `keda:"name=dbName,order=authParams;triggerMetadata,optional"` - Query string `keda:"name=query,order=triggerMetadata,optional"` - QueryValue int64 `keda:"name=queryValue,order=triggerMetadata,optional"` - ActivationQueryValue int64 `keda:"name=activationQueryValue,order=triggerMetadata,default=0,optional"` + ConnectionString string `keda:"name=connectionString, order=authParams;triggerMetadata;resolvedEnv,optional"` + Host string `keda:"name=host, order=authParams;triggerMetadata,optional"` + Port string `keda:"name=port, order=authParams;triggerMetadata,optional"` + Username string `keda:"name=username, order=authParams;triggerMetadata,optional"` + Password string `keda:"name=password, order=authParams;triggerMetadata;resolvedEnv,optional"` + DBName string `keda:"name=dbName, order=authParams;triggerMetadata,optional"` + Query string `keda:"name=query, order=triggerMetadata,optional"` + QueryValue int64 `keda:"name=queryValue, order=triggerMetadata,optional"` + ActivationQueryValue int64 `keda:"name=activationQueryValue, order=triggerMetadata,default=0"` TriggerIndex int } diff --git a/pkg/scalers/etcd_scaler.go b/pkg/scalers/etcd_scaler.go index eed57a3a119..50bf464fc6e 100644 --- a/pkg/scalers/etcd_scaler.go +++ b/pkg/scalers/etcd_scaler.go @@ -39,21 +39,21 @@ type etcdScaler struct { type etcdMetadata struct { triggerIndex int - Endpoints []string `keda:"name=endpoints, order=triggerMetadata"` - WatchKey string `keda:"name=watchKey, order=triggerMetadata"` - Value float64 `keda:"name=value, order=triggerMetadata"` - ActivationValue float64 `keda:"name=activationValue, order=triggerMetadata, optional, default=0"` - WatchProgressNotifyInterval int `keda:"name=watchProgressNotifyInterval, order=triggerMetadata, optional, default=600"` + Endpoints []string `keda:"name=endpoints, order=triggerMetadata"` + WatchKey string `keda:"name=watchKey, order=triggerMetadata"` + Value float64 `keda:"name=value, order=triggerMetadata"` + ActivationValue float64 `keda:"name=activationValue, order=triggerMetadata, default=0"` + WatchProgressNotifyInterval int `keda:"name=watchProgressNotifyInterval, order=triggerMetadata, default=600"` Username string `keda:"name=username,order=authParams;resolvedEnv, optional"` Password string `keda:"name=password,order=authParams;resolvedEnv, optional"` // TLS - EnableTLS string `keda:"name=tls, order=authParams, optional, default=disable"` - Cert string `keda:"name=cert, order=authParams, optional"` - Key string `keda:"name=key, order=authParams, optional"` + EnableTLS string `keda:"name=tls, order=authParams, default=disable"` + Cert string `keda:"name=cert, order=authParams, optional"` + Key string `keda:"name=key, order=authParams, optional"` KeyPassword string `keda:"name=keyPassword, order=authParams, optional"` - Ca string `keda:"name=ca, order=authParams, optional"` + Ca string `keda:"name=ca, order=authParams, optional"` } func (meta *etcdMetadata) Validate() error { diff --git a/pkg/scalers/mongo_scaler.go b/pkg/scalers/mongo_scaler.go index 25d2a62ede9..9d2e66b150c 100644 --- a/pkg/scalers/mongo_scaler.go +++ b/pkg/scalers/mongo_scaler.go @@ -28,17 +28,17 @@ type mongoDBScaler struct { } type mongoDBMetadata struct { - ConnectionString string `keda:"name=connectionString,order=authParams;triggerMetadata;resolvedEnv,optional"` - Scheme string `keda:"name=scheme,order=authParams;triggerMetadata,default=mongodb,optional"` - Host string `keda:"name=host,order=authParams;triggerMetadata,optional"` - Port string `keda:"name=port,order=authParams;triggerMetadata,optional"` - Username string `keda:"name=username,order=authParams;triggerMetadata,optional"` - Password string `keda:"name=password,order=authParams;triggerMetadata;resolvedEnv,optional"` - DBName string `keda:"name=dbName,order=authParams;triggerMetadata"` - Collection string `keda:"name=collection,order=triggerMetadata"` - Query string `keda:"name=query,order=triggerMetadata"` - QueryValue int64 `keda:"name=queryValue,order=triggerMetadata"` - ActivationQueryValue int64 `keda:"name=activationQueryValue,order=triggerMetadata,default=0"` + ConnectionString string `keda:"name=connectionString, order=authParams;triggerMetadata;resolvedEnv,optional"` + Scheme string `keda:"name=scheme, order=authParams;triggerMetadata,default=mongodb"` + Host string `keda:"name=host, order=authParams;triggerMetadata,optional"` + Port string `keda:"name=port, order=authParams;triggerMetadata,optional"` + Username string `keda:"name=username, order=authParams;triggerMetadata,optional"` + Password string `keda:"name=password, order=authParams;triggerMetadata;resolvedEnv,optional"` + DBName string `keda:"name=dbName, order=authParams;triggerMetadata"` + Collection string `keda:"name=collection, order=triggerMetadata"` + Query string `keda:"name=query, order=triggerMetadata"` + QueryValue int64 `keda:"name=queryValue, order=triggerMetadata"` + ActivationQueryValue int64 `keda:"name=activationQueryValue, order=triggerMetadata,default=0"` TriggerIndex int } diff --git a/pkg/scalers/postgresql_scaler.go b/pkg/scalers/postgresql_scaler.go index 6ea0203b898..35c30faef12 100644 --- a/pkg/scalers/postgresql_scaler.go +++ b/pkg/scalers/postgresql_scaler.go @@ -41,18 +41,18 @@ type postgreSQLScaler struct { } type postgreSQLMetadata struct { - TargetQueryValue float64 `keda:"name=targetQueryValue, order=triggerMetadata, optional"` + TargetQueryValue float64 `keda:"name=targetQueryValue, order=triggerMetadata, optional"` ActivationTargetQueryValue float64 `keda:"name=activationTargetQueryValue, order=triggerMetadata, optional"` - Connection string `keda:"name=connection, order=authParams;resolvedEnv, optional"` - Query string `keda:"name=query, order=triggerMetadata"` + Connection string `keda:"name=connection, order=authParams;resolvedEnv, optional"` + Query string `keda:"name=query, order=triggerMetadata"` triggerIndex int azureAuthContext azureAuthContext - Host string `keda:"name=host, order=authParams;triggerMetadata, optional"` - Port string `keda:"name=port, order=authParams;triggerMetadata, optional"` + Host string `keda:"name=host, order=authParams;triggerMetadata, optional"` + Port string `keda:"name=port, order=authParams;triggerMetadata, optional"` UserName string `keda:"name=userName, order=authParams;triggerMetadata, optional"` - DBName string `keda:"name=dbName, order=authParams;triggerMetadata, optional"` - SslMode string `keda:"name=sslmode, order=authParams;triggerMetadata, optional"` + DBName string `keda:"name=dbName, order=authParams;triggerMetadata, optional"` + SslMode string `keda:"name=sslmode, order=authParams;triggerMetadata, optional"` Password string `keda:"name=password, order=authParams;resolvedEnv, optional"` } diff --git a/pkg/scalers/prometheus_scaler.go b/pkg/scalers/prometheus_scaler.go index 04e92b3750d..1b2ad2fcfc4 100644 --- a/pkg/scalers/prometheus_scaler.go +++ b/pkg/scalers/prometheus_scaler.go @@ -42,14 +42,14 @@ type prometheusMetadata struct { PrometheusAuth *authentication.Config `keda:"optional"` ServerAddress string `keda:"name=serverAddress, order=triggerMetadata"` Query string `keda:"name=query, order=triggerMetadata"` - QueryParameters map[string]string `keda:"name=queryParameters, order=triggerMetadata, optional"` + QueryParameters map[string]string `keda:"name=queryParameters, order=triggerMetadata, optional"` Threshold float64 `keda:"name=threshold, order=triggerMetadata"` - ActivationThreshold float64 `keda:"name=activationThreshold, order=triggerMetadata, optional"` - Namespace string `keda:"name=namespace, order=triggerMetadata, optional"` - CustomHeaders map[string]string `keda:"name=customHeaders, order=triggerMetadata, optional"` - IgnoreNullValues bool `keda:"name=ignoreNullValues, order=triggerMetadata, optional, default=true"` - UnsafeSSL bool `keda:"name=unsafeSsl, order=triggerMetadata, optional"` - AwsRegion string `keda:"name=awsRegion, order=triggerMetadata;authParams, optional"` + ActivationThreshold float64 `keda:"name=activationThreshold, order=triggerMetadata, optional"` + Namespace string `keda:"name=namespace, order=triggerMetadata, optional"` + CustomHeaders map[string]string `keda:"name=customHeaders, order=triggerMetadata, optional"` + IgnoreNullValues bool `keda:"name=ignoreNullValues, order=triggerMetadata, default=true"` + UnsafeSSL bool `keda:"name=unsafeSsl, order=triggerMetadata, optional"` + AwsRegion string `keda:"name=awsRegion, order=triggerMetadata;authParams, optional"` } type promQueryResult struct { diff --git a/pkg/scalers/pulsar_scaler_test.go b/pkg/scalers/pulsar_scaler_test.go index 68b183488eb..4b2eddd3555 100644 --- a/pkg/scalers/pulsar_scaler_test.go +++ b/pkg/scalers/pulsar_scaler_test.go @@ -73,11 +73,6 @@ var parsePulsarMetadataTestDataset = []parsePulsarMetadataTestData{ {map[string]string{"adminURL": "http://127.0.0.1:8080", "topic": "persistent://public/default/my-topic", "isPartitionedTopic": "true", "subscription": "sub1"}, false, false, true, "http://127.0.0.1:8080", "persistent://public/default/my-topic", "sub1"}, // test metric msgBacklogThreshold {map[string]string{"adminURL": "http://127.0.0.1:8080", "topic": "persistent://public/default/my-topic", "isPartitionedTopic": "true", "subscription": "sub1", "msgBacklogThreshold": "5"}, false, false, true, "http://127.0.0.1:8080", "persistent://public/default/my-topic", "sub1"}, - // FIXME: msgBacklog support DEPRECATED to be removed in v2.14 - // test metric msgBacklog - {map[string]string{"adminURL": "http://127.0.0.1:8080", "topic": "persistent://public/default/my-topic", "isPartitionedTopic": "true", "subscription": "sub1", "msgBacklog": "5"}, false, false, true, "http://127.0.0.1:8080", "persistent://public/default/my-topic", "sub1"}, - // END FIXME - // tls {map[string]string{"adminURL": "https://localhost:8443", "tls": "enable", "cert": "certdata", "key": "keydata", "ca": "cadata", "topic": "persistent://public/default/my-topic", "subscription": "sub1"}, false, true, false, "https://localhost:8443", "persistent://public/default/my-topic", "sub1"}, } diff --git a/pkg/scalers/rabbitmq_scaler.go b/pkg/scalers/rabbitmq_scaler.go index 43a62a404ee..e3b2444dbe2 100644 --- a/pkg/scalers/rabbitmq_scaler.go +++ b/pkg/scalers/rabbitmq_scaler.go @@ -72,42 +72,42 @@ type rabbitMQMetadata struct { connectionName string // name used for the AMQP connection triggerIndex int // scaler index - QueueName string `keda:"name=queueName, order=triggerMetadata"` + QueueName string `keda:"name=queueName, order=triggerMetadata"` // QueueLength or MessageRate - Mode string `keda:"name=mode, order=triggerMetadata, optional, default=Unknown"` + Mode string `keda:"name=mode, order=triggerMetadata, optional, default=Unknown"` // - QueueLength float64 `keda:"name=queueLength, order=triggerMetadata, optional"` + QueueLength float64 `keda:"name=queueLength, order=triggerMetadata, optional"` // trigger value (queue length or publish/sec. rate) - Value float64 `keda:"name=value, order=triggerMetadata, optional"` + Value float64 `keda:"name=value, order=triggerMetadata, optional"` // activation value - ActivationValue float64 `keda:"name=activationValue, order=triggerMetadata, optional"` + ActivationValue float64 `keda:"name=activationValue, order=triggerMetadata, optional"` // connection string for either HTTP or AMQP protocol - Host string `keda:"name=host, order=triggerMetadata;authParams;resolvedEnv"` + Host string `keda:"name=host, order=triggerMetadata;authParams;resolvedEnv"` // either http or amqp protocol - Protocol string `keda:"name=protocol, order=triggerMetadata;authParams, optional, default=auto"` + Protocol string `keda:"name=protocol, order=triggerMetadata;authParams, default=auto"` // override the vhost from the connection info - VhostName string `keda:"name=vhostName, order=triggerMetadata, optional"` + VhostName string `keda:"name=vhostName, order=triggerMetadata, optional"` // specify if the queueName contains a rexeg - UseRegex bool `keda:"name=useRegex, order=triggerMetadata, optional"` + UseRegex bool `keda:"name=useRegex, order=triggerMetadata, optional"` // specify if the QueueLength value should exclude Unacknowledged messages (Ready messages only) ExcludeUnacknowledged bool `keda:"name=excludeUnacknowledged, order=triggerMetadata, optional"` // specify the page size if useRegex is enabled - PageSize int64 `keda:"name=pageSize, order=triggerMetadata, optional, default=100"` + PageSize int64 `keda:"name=pageSize, order=triggerMetadata, default=100"` // specify the operation to apply in case of multiples queues - Operation string `keda:"name=operation, order=triggerMetadata, optional, default=sum"` + Operation string `keda:"name=operation, order=triggerMetadata, default=sum"` // custom http timeout for a specific trigger - TimeoutMs int `keda:"name=timeout, order=triggerMetadata, optional"` + TimeoutMs int `keda:"name=timeout, order=triggerMetadata, optional"` Username string `keda:"name=username, order=authParams;resolvedEnv, optional"` Password string `keda:"name=password, order=authParams;resolvedEnv, optional"` // TLS - Ca string `keda:"name=ca, order=authParams, optional"` - Cert string `keda:"name=cert, order=authParams, optional"` - Key string `keda:"name=key, order=authParams, optional"` + Ca string `keda:"name=ca, order=authParams, optional"` + Cert string `keda:"name=cert, order=authParams, optional"` + Key string `keda:"name=key, order=authParams, optional"` KeyPassword string `keda:"name=keyPassword, order=authParams, optional"` - EnableTLS string `keda:"name=tls, order=authParams, optional, default=disable"` - UnsafeSsl bool `keda:"name=unsafeSsl, order=triggerMetadata, optional"` + EnableTLS string `keda:"name=tls, order=authParams, default=disable"` + UnsafeSsl bool `keda:"name=unsafeSsl, order=triggerMetadata, optional"` // token provider for azure AD WorkloadIdentityResource string `keda:"name=workloadIdentityResource, order=authParams, optional"` diff --git a/pkg/scalers/redis_scaler.go b/pkg/scalers/redis_scaler.go index 3746735dce6..9e63d40d50d 100644 --- a/pkg/scalers/redis_scaler.go +++ b/pkg/scalers/redis_scaler.go @@ -46,29 +46,29 @@ type redisScaler struct { } type redisConnectionInfo struct { - Addresses []string `keda:"name=address;addresses, order=triggerMetadata;authParams;resolvedEnv"` - Username string `keda:"name=username, order=triggerMetadata;resolvedEnv;authParams"` - Password string `keda:"name=password, order=triggerMetadata;resolvedEnv;authParams"` - SentinelUsername string `keda:"name=sentinelUsername, order=triggerMetadata;authParams;resolvedEnv"` - SentinelPassword string `keda:"name=sentinelPassword, order=triggerMetadata;authParams;resolvedEnv"` - SentinelMaster string `keda:"name=sentinelMaster, order=triggerMetadata;authParams;resolvedEnv"` - Hosts []string `keda:"name=host;hosts, order=triggerMetadata;resolvedEnv;authParams"` - Ports []string `keda:"name=port;ports, order=triggerMetadata;resolvedEnv;authParams"` + Addresses []string `keda:"name=address;addresses, order=triggerMetadata;authParams;resolvedEnv"` + Username string `keda:"name=username, order=triggerMetadata;resolvedEnv;authParams"` + Password string `keda:"name=password, order=triggerMetadata;resolvedEnv;authParams"` + SentinelUsername string `keda:"name=sentinelUsername, order=triggerMetadata;authParams;resolvedEnv"` + SentinelPassword string `keda:"name=sentinelPassword, order=triggerMetadata;authParams;resolvedEnv"` + SentinelMaster string `keda:"name=sentinelMaster, order=triggerMetadata;authParams;resolvedEnv"` + Hosts []string `keda:"name=host;hosts, order=triggerMetadata;resolvedEnv;authParams"` + Ports []string `keda:"name=port;ports, order=triggerMetadata;resolvedEnv;authParams"` EnableTLS bool - UnsafeSsl bool `keda:"name=unsafeSsl, order=triggerMetadata, optional, default=false"` - Cert string `keda:"name=Cert;cert, order=authParams"` - Key string `keda:"name=key, order=authParams"` - KeyPassword string `keda:"name=keyPassword, order=authParams"` - Ca string `keda:"name=ca, order=authParams"` + UnsafeSsl bool `keda:"name=unsafeSsl, order=triggerMetadata, default=false"` + Cert string `keda:"name=Cert;cert, order=authParams"` + Key string `keda:"name=key, order=authParams"` + KeyPassword string `keda:"name=keyPassword, order=authParams"` + Ca string `keda:"name=ca, order=authParams"` } type redisMetadata struct { - ListLength int64 `keda:"name=listLength, order=triggerMetadata, optional, default=5"` - ActivationListLength int64 `keda:"name=activationListLength, order=triggerMetadata, optional"` - ListName string `keda:"name=listName, order=triggerMetadata"` - DatabaseIndex int `keda:"name=databaseIndex, order=triggerMetadata, optional"` - MetadataEnableTLS string `keda:"name=enableTLS, order=triggerMetadata, optional"` - AuthParamEnableTLS string `keda:"name=tls, order=authParams, optional"` + ListLength int64 `keda:"name=listLength, order=triggerMetadata, default=5"` + ActivationListLength int64 `keda:"name=activationListLength, order=triggerMetadata, optional"` + ListName string `keda:"name=listName, order=triggerMetadata"` + DatabaseIndex int `keda:"name=databaseIndex, order=triggerMetadata, optional"` + MetadataEnableTLS string `keda:"name=enableTLS, order=triggerMetadata, optional"` + AuthParamEnableTLS string `keda:"name=tls, order=authParams, optional"` ConnectionInfo redisConnectionInfo `keda:"optional"` triggerIndex int } diff --git a/pkg/scalers/redis_streams_scaler.go b/pkg/scalers/redis_streams_scaler.go index 9418ee5f85b..1f2b76a78ad 100644 --- a/pkg/scalers/redis_streams_scaler.go +++ b/pkg/scalers/redis_streams_scaler.go @@ -49,16 +49,16 @@ type redisStreamsScaler struct { type redisStreamsMetadata struct { scaleFactor scaleFactor triggerIndex int - TargetPendingEntriesCount int64 `keda:"name=pendingEntriesCount, order=triggerMetadata, optional, default=5"` - TargetStreamLength int64 `keda:"name=streamLength, order=triggerMetadata, optional, default=5"` - TargetLag int64 `keda:"name=lagCount, order=triggerMetadata, optional"` - StreamName string `keda:"name=stream, order=triggerMetadata"` + TargetPendingEntriesCount int64 `keda:"name=pendingEntriesCount, order=triggerMetadata, default=5"` + TargetStreamLength int64 `keda:"name=streamLength, order=triggerMetadata, default=5"` + TargetLag int64 `keda:"name=lagCount, order=triggerMetadata, optional"` + StreamName string `keda:"name=stream, order=triggerMetadata"` ConsumerGroupName string `keda:"name=consumerGroup, order=triggerMetadata, optional"` DatabaseIndex int `keda:"name=databaseIndex, order=triggerMetadata, optional"` ConnectionInfo redisConnectionInfo `keda:"optional"` - ActivationLagCount int64 `keda:"name=activationLagCount, order=triggerMetadata, optional"` - MetadataEnableTLS string `keda:"name=enableTLS, order=triggerMetadata, optional"` - AuthParamEnableTLS string `keda:"name=tls, order=authParams, optional"` + ActivationLagCount int64 `keda:"name=activationLagCount, order=triggerMetadata, optional"` + MetadataEnableTLS string `keda:"name=enableTLS, order=triggerMetadata, optional"` + AuthParamEnableTLS string `keda:"name=tls, order=authParams, optional"` } func (r *redisStreamsMetadata) Validate() error { diff --git a/pkg/scalers/solace_scaler.go b/pkg/scalers/solace_scaler.go index c1d24279c47..40df8985f34 100644 --- a/pkg/scalers/solace_scaler.go +++ b/pkg/scalers/solace_scaler.go @@ -97,13 +97,13 @@ type SolaceMetadata struct { // Target Message Count MsgCountTarget int64 `keda:"name=messageCountTarget, order=triggerMetadata, optional"` - MsgSpoolUsageTarget int64 `keda:"name=messageSpoolUsageTarget, order=triggerMetadata, optional"` // Spool Use Target in Megabytes - MsgRxRateTarget int64 `keda:"name=messageReceiveRateTarget, order=triggerMetadata, optional"` // Ingress Rate Target per consumer in msgs/second + MsgSpoolUsageTarget int64 `keda:"name=messageSpoolUsageTarget, order=triggerMetadata, optional"` // Spool Use Target in Megabytes + MsgRxRateTarget int64 `keda:"name=messageReceiveRateTarget, order=triggerMetadata, optional"` // Ingress Rate Target per consumer in msgs/second // Activation Target Message Count - ActivationMsgCountTarget int `keda:"name=activationMessageCountTarget, order=triggerMetadata, optional, default=0"` - ActivationMsgSpoolUsageTarget int `keda:"name=activationMessageSpoolUsageTarget, order=triggerMetadata, optional, default=0"` // Spool Use Target in Megabytes - ActivationMsgRxRateTarget int `keda:"name=activationMessageReceiveRateTarget, order=triggerMetadata, optional, default=0"` // Ingress Rate Target per consumer in msgs/second + ActivationMsgCountTarget int `keda:"name=activationMessageCountTarget, order=triggerMetadata, default=0"` + ActivationMsgSpoolUsageTarget int `keda:"name=activationMessageSpoolUsageTarget, order=triggerMetadata, default=0"` // Spool Use Target in Megabytes + ActivationMsgRxRateTarget int `keda:"name=activationMessageReceiveRateTarget, order=triggerMetadata, default=0"` // Ingress Rate Target per consumer in msgs/second } func (s *SolaceMetadata) Validate() error { diff --git a/pkg/scalers/solr_scaler.go b/pkg/scalers/solr_scaler.go index 0a8fcdc7c93..3129ef11f2f 100644 --- a/pkg/scalers/solr_scaler.go +++ b/pkg/scalers/solr_scaler.go @@ -26,10 +26,10 @@ type solrMetadata struct { triggerIndex int Host string `keda:"name=host, order=triggerMetadata"` - Collection string `keda:"name=collection, order=triggerMetadata"` - TargetQueryValue float64 `keda:"name=targetQueryValue, order=triggerMetadata"` - ActivationTargetQueryValue float64 `keda:"name=activationTargetQueryValue, order=triggerMetadata, optional, default=0"` - Query string `keda:"name=query, order=triggerMetadata, optional"` + Collection string `keda:"name=collection, order=triggerMetadata"` + TargetQueryValue float64 `keda:"name=targetQueryValue, order=triggerMetadata"` + ActivationTargetQueryValue float64 `keda:"name=activationTargetQueryValue, order=triggerMetadata, default=0"` + Query string `keda:"name=query, order=triggerMetadata, optional"` // Authentication Username string `keda:"name=username, order=authParams;triggerMetadata"` diff --git a/pkg/scalers/splunk_scaler.go b/pkg/scalers/splunk_scaler.go index d11586df88d..b9fb09e7c34 100644 --- a/pkg/scalers/splunk_scaler.go +++ b/pkg/scalers/splunk_scaler.go @@ -28,9 +28,9 @@ type SplunkMetadata struct { APIToken string `keda:"name=apiToken, order=authParams, optional"` Password string `keda:"name=password, order=authParams, optional"` Username string `keda:"name=username, order=authParams"` - Host string `keda:"name=host, order=triggerMetadata"` + Host string `keda:"name=host, order=triggerMetadata"` UnsafeSsl bool `keda:"name=unsafeSsl, order=triggerMetadata, optional"` - TargetValue int `keda:"name=targetValue, order=triggerMetadata"` + TargetValue int `keda:"name=targetValue, order=triggerMetadata"` ActivationValue int `keda:"name=activationValue, order=triggerMetadata"` SavedSearchName string `keda:"name=savedSearchName, order=triggerMetadata"` ValueField string `keda:"name=valueField, order=triggerMetadata"`