diff --git a/CHANGELOG.md b/CHANGELOG.md index f9969125fea..f30514b7ba0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ To learn more about active deprecations, we recommend checking [GitHub Discussio - **General**: Enable OpenSSF Scorecard to enhance security practices across the project ([#5913](https://github.com/kedacore/keda/issues/5913)) - **General**: Introduce new NSQ scaler ([#3281](https://github.com/kedacore/keda/issues/3281)) - **General**: Operator flag to control patching of webhook resources certificates ([#6184](https://github.com/kedacore/keda/issues/6184)) +- **General**: Trigger Schema Generated Tool ([#6345](https://github.com/kedacore/keda/issues/6345)) - **Azure Pipelines Scaler**: Introduce requireAllDemandsAndIgnoreOthers to match job demands while ignoring extras ([#5579](https://github.com/kedacore/keda/issues/5579)) #### Experimental diff --git a/Makefile b/Makefile index f2c827e1c92..a345aeccb5a 100644 --- a/Makefile +++ b/Makefile @@ -64,6 +64,16 @@ GOLANGCI_VERSION:=1.63.4 SHELL = /usr/bin/env bash -o pipefail .SHELLFLAGS = -ec +# Scaler schema generation parameters +SCALERS_BUILDER_FILE ?= "pkg/scaling/scalers_builder.go" +SCALERS_FILES_DIR ?= "pkg/scalers" +OUTPUT_FILE_PATH ?= "schema/generated/" +OUTPUT_FILE_NAME ?= "scalers-metadata-schema" + +ifneq '${VERSION}' 'main' + OUTPUT_FILE_NAME :="${OUTPUT_FILE_NAME}_v${VERSION}" +endif + ################################################## # All # ################################################## @@ -266,6 +276,14 @@ set-version: @sed -i".out" -e 's@Version[ ]*=.*@Version = "$(VERSION)"@g' ./version/version.go; rm -rf ./version/version.go.out +.PHONY: generate-scalers-schema +generate-scalers-schema: ## Generate scalers shcema + GOBIN=$(LOCALBIN) go run ./schema/generate_scaler_schema.go --keda-version $(VERSION) --scalers-builder-file $(SCALERS_BUILDER_FILE) --scalers-files-dir $(SCALERS_FILES_DIR) --output-file-path $(OUTPUT_FILE_PATH) --output-file-name $(OUTPUT_FILE_NAME) --output-file-format both + +.PHONY: verify-scalers-schema +verify-scalers-schema: ## Verify scalers shcema + ./hack/verify-schema.sh + ################################################## # Deployment # ################################################## diff --git a/hack/verify-schema.sh b/hack/verify-schema.sh new file mode 100755 index 00000000000..e8cbc29611a --- /dev/null +++ b/hack/verify-schema.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +# Copyright 2025 The KEDA Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# set -o errexit +set -o nounset +set -o pipefail + +SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. + +SCHEMAROOT="${SCRIPT_ROOT}/schema/generated" +TMP_DIFFROOT="${SCRIPT_ROOT}/_tmp/schema" +_tmp="${SCRIPT_ROOT}/_tmp" + +cleanup() { + rm -rf "${_tmp}" +} +trap "cleanup" EXIT SIGINT + +# Make sure schema json file has correct format +find $SCHEMAROOT -name "*.json" | while read file; do + if jq -e . $file >/dev/null 2>&1; then + echo "Parsed JSON successfully and got something other than false/null" + else + echo "Failed to parse JSON, or got false/null from $file" + break + fi + + err_line_content=$(grep -vE '"kedaVersion":.+|"schemaVersion":.+|"scalers": \[|"metadata": \[|"optional":.+|"default":.+|"canReadFromEnv":.+|"canReadFromAuth":.+|"type":.+|"name":.+|"rangeSeparator":.+|"separator":.+|"allowedValue": \[|"deprecatedAnnounce":.+|^[^:]*$' "$file") + + if [ ! -z "$err_line_content" ]; then + echo "ERROR: error schema format founded: $err_line_content in $file" + exit 1 + fi +done +echo "Schema json files are in correct format" + +# Make sure schema yaml file has correct format +find $SCHEMAROOT -name "*.yaml" | while read file; do + err_line_content=$(grep -vE "kedaVersion:.+|schemaVersion:.+|scalers:|metadata:|optional:.+|default:.+|canReadFromEnv:.+|canReadFromAuth:.+|type:.+|name:.+|rangeSeparator:.+|separator:.+|allowedValue:|deprecatedAnnounce:.+|^[^:]*$" "$file") + if [ ! -z "$err_line_content" ]; then + echo "ERROR: error schema format founded: $err_line_content in $file" + exit 1 + fi +done +echo "Schema yaml files are in correct format" + +cleanup + +mkdir -p "${TMP_DIFFROOT}" +cp -a "${SCHEMAROOT}"/* "${TMP_DIFFROOT}" + +make generate-scalers-schema +echo "diffing ${SCHEMAROOT} against freshly generated scalers schema" +ret=0 +diff -Naup "${SCHEMAROOT}" "${TMP_DIFFROOT}" || ret=$? +cp -a "${TMP_DIFFROOT}"/* "${SCHEMAROOT}" +if [[ $ret -eq 0 ]] +then + echo "${SCHEMAROOT} up to date." +else + echo "${SCHEMAROOT} is out of date. Please run 'make generate-scalers-schema'" + exit 1 +fi diff --git a/pkg/scalers/scalersconfig/typed_config.go b/pkg/scalers/scalersconfig/typed_config.go index ac485fe91f2..040d46f74c8 100644 --- a/pkg/scalers/scalersconfig/typed_config.go +++ b/pkg/scalers/scalersconfig/typed_config.go @@ -48,8 +48,8 @@ const ( AuthParams ParsingOrder = "authParams" ) -// allowedParsingOrderMap is a map with set of valid parsing orders -var allowedParsingOrderMap = map[ParsingOrder]bool{ +// AllowedParsingOrderMap is a map with set of valid parsing orders +var AllowedParsingOrderMap = map[ParsingOrder]bool{ TriggerMetadata: true, ResolvedEnv: true, AuthParams: true, @@ -58,28 +58,28 @@ var allowedParsingOrderMap = map[ParsingOrder]bool{ // separators for field tag structure // e.g. name=stringVal,order=triggerMetadata;resolvedEnv;authParams,optional const ( - tagSeparator = "," - tagKeySeparator = "=" - tagValueSeparator = ";" + TagSeparator = "," + TagKeySeparator = "=" + TagValueSeparator = ";" ) // separators for map and slice elements const ( - elemKeyValSeparator = "=" + ElemKeyValSeparator = "=" ) // field tag parameters const ( - optionalTag = "optional" - deprecatedTag = "deprecated" - deprecatedAnnounceTag = "deprecatedAnnounce" - defaultTag = "default" - orderTag = "order" - nameTag = "name" - enumTag = "enum" - exclusiveSetTag = "exclusiveSet" - rangeTag = "range" - separatorTag = "separator" + OptionalTag = "optional" + DeprecatedTag = "deprecated" + DeprecatedAnnounceTag = "deprecatedAnnounce" + DefaultTag = "default" + OrderTag = "order" + NameTag = "name" + EnumTag = "enum" + ExclusiveSetTag = "exclusiveSet" + RangeTag = "range" + SeparatorTag = "separator" ) // Params is a struct that represents the parameter list that can be used in the keda tag @@ -139,7 +139,7 @@ func (p Params) IsDeprecated() bool { // DeprecatedMessage is a function that returns the optional deprecated message if the parameter is deprecated func (p Params) DeprecatedMessage() string { - if p.Deprecated == deprecatedTag { + if p.Deprecated == DeprecatedTag { return "" } return fmt.Sprintf(": %s", p.Deprecated) @@ -219,7 +219,7 @@ func (sc *ScalerConfig) setValue(field reflect.Value, params Params) error { } if !exists && !(params.Optional || params.IsDeprecated()) { if len(params.Order) == 0 { - apo := slices.Sorted(maps.Keys(allowedParsingOrderMap)) + apo := slices.Sorted(maps.Keys(AllowedParsingOrderMap)) return fmt.Errorf("missing required parameter %q, no 'order' tag, provide any from %v", params.Name(), apo) } return fmt.Errorf("missing required parameter %q in %v", params.Name(), params.Order) @@ -301,9 +301,9 @@ func setConfigValueMap(params Params, valFromConfig string, field reflect.Value) split := splitWithSeparator(valFromConfig, params.Separator) for _, s := range split { s := strings.TrimSpace(s) - kv := strings.Split(s, elemKeyValSeparator) + kv := strings.Split(s, ElemKeyValSeparator) if len(kv) != 2 { - return fmt.Errorf("expected format key%vvalue, got %q", elemKeyValSeparator, s) + return fmt.Errorf("expected format key%vvalue, got %q", ElemKeyValSeparator, s) } key := strings.TrimSpace(kv[0]) val := strings.TrimSpace(kv[1]) @@ -459,66 +459,66 @@ func (sc *ScalerConfig) configParamValue(params Params) (string, bool) { // paramsFromTag is a function that returns the Params struct based on the field tag func paramsFromTag(tag string, field reflect.StructField) (Params, error) { params := Params{FieldName: field.Name} - tagSplit := strings.Split(tag, tagSeparator) + tagSplit := strings.Split(tag, TagSeparator) for _, ts := range tagSplit { - tsplit := strings.Split(ts, tagKeySeparator) + tsplit := strings.Split(ts, TagKeySeparator) tsplit[0] = strings.TrimSpace(tsplit[0]) switch tsplit[0] { - case optionalTag: + case OptionalTag: if len(tsplit) == 1 { params.Optional = true } if len(tsplit) > 1 { params.Optional, _ = strconv.ParseBool(strings.TrimSpace(tsplit[1])) } - case orderTag: + case OrderTag: if len(tsplit) > 1 { - order := strings.Split(tsplit[1], tagValueSeparator) + order := strings.Split(tsplit[1], TagValueSeparator) for _, po := range order { poTyped := ParsingOrder(strings.TrimSpace(po)) - if !allowedParsingOrderMap[poTyped] { - apo := slices.Sorted(maps.Keys(allowedParsingOrderMap)) + if !AllowedParsingOrderMap[poTyped] { + apo := slices.Sorted(maps.Keys(AllowedParsingOrderMap)) return params, fmt.Errorf("unknown parsing order value %s, has to be one of %s", po, apo) } params.Order = append(params.Order, poTyped) } } - case nameTag: + case NameTag: if len(tsplit) > 1 { - params.Names = strings.Split(strings.TrimSpace(tsplit[1]), tagValueSeparator) + params.Names = strings.Split(strings.TrimSpace(tsplit[1]), TagValueSeparator) } - case deprecatedTag: + case DeprecatedTag: if len(tsplit) == 1 { - params.Deprecated = deprecatedTag + params.Deprecated = DeprecatedTag } else { params.Deprecated = strings.TrimSpace(tsplit[1]) } - case deprecatedAnnounceTag: + case DeprecatedAnnounceTag: if len(tsplit) == 1 { - params.DeprecatedAnnounce = deprecatedAnnounceTag + params.DeprecatedAnnounce = DeprecatedAnnounceTag } else { params.DeprecatedAnnounce = strings.TrimSpace(tsplit[1]) } - case defaultTag: + case DefaultTag: if len(tsplit) > 1 { params.Default = strings.TrimSpace(tsplit[1]) } - case enumTag: + case EnumTag: if len(tsplit) > 1 { - params.Enum = strings.Split(tsplit[1], tagValueSeparator) + params.Enum = strings.Split(tsplit[1], TagValueSeparator) } - case exclusiveSetTag: + case ExclusiveSetTag: if len(tsplit) > 1 { - params.ExclusiveSet = strings.Split(tsplit[1], tagValueSeparator) + params.ExclusiveSet = strings.Split(tsplit[1], TagValueSeparator) } - case rangeTag: + case RangeTag: if len(tsplit) == 1 { params.RangeSeparator = "-" } if len(tsplit) == 2 { params.RangeSeparator = strings.TrimSpace(tsplit[1]) } - case separatorTag: + case SeparatorTag: if len(tsplit) > 1 { params.Separator = strings.TrimSpace(tsplit[1]) } diff --git a/schema/generate_scaler_schema.go b/schema/generate_scaler_schema.go new file mode 100644 index 00000000000..8578ab934ee --- /dev/null +++ b/schema/generate_scaler_schema.go @@ -0,0 +1,550 @@ +/* +Copyright 2024 The KEDA Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "encoding/json" + "errors" + "flag" + "fmt" + "go/ast" + "go/parser" + "go/token" + "log" + "os" + "sort" + "strconv" + "strings" + + "github.com/spf13/pflag" + "golang.org/x/exp/maps" + "golang.org/x/exp/slices" + "gopkg.in/yaml.v3" + + "github.com/kedacore/keda/v2/pkg/scalers/scalersconfig" +) + +var ( + kedaVersion = "1.0" + schemaVersion = 1.0 +) + +// Identifier for the creator function of the scaler +// e.g. NewRedisScaler, NewSeleniumGridScaler +const ( + creatorSymbol = "New" +) + +// Metadata is a struct that represents each field of the scaler metadata +type Metadata struct { + // Name is the name of the field + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + // Type is the variable type of the field + Type string `json:"type,omitempty" yaml:"type,omitempty"` + + // Optional is a boolean that indicates if the field is optional + Optional bool `json:"optional,omitempty" yaml:"optional,omitempty"` + + // Default is the default value of the field if exists + Default string `json:"default,omitempty" yaml:"default,omitempty"` + + // AllowedValue is a list of allowed values for the field + AllowedValue []string `json:"allowedValue,omitempty" yaml:"allowedValue,omitempty"` + + // Deprecated is a string that indicates if the field is deprecated + Deprecated string `json:"deprecated,omitempty" yaml:"deprecated,omitempty"` + + // DeprecatedAnnounce is a string that indicates the deprecation message + DeprecatedAnnounce string `json:"deprecatedAnnounce,omitempty" yaml:"deprecatedAnnounce,omitempty"` + + // Separator is the symbol that separates the value of the field + Separator string `json:"separator,omitempty" yaml:"separator,omitempty"` + + // ExclusiveSet is a list of fields that are exclusive with the field + ExclusiveSet []string `json:"exclusiveSet,omitempty" yaml:"exclusiveSet,omitempty"` + + // RangeSeparator is the symbol that indicates the range of the field + RangeSeparator string `json:"rangeSeparator,omitempty" yaml:"rangeSeparator,omitempty"` + + // CanReadFromEnv is a boolean that indicates if the field can be read from the environment + CanReadFromEnv bool `json:"canReadFromEnv,omitempty" yaml:"canReadFromEnv,omitempty"` + + // CanReadFromAuth is a boolean that indicates if the field can be read from the TriggerAuthentication + CanReadFromAuth bool `json:"canReadFromAuth,omitempty" yaml:"canReadFromAuth,omitempty"` +} + +// ScalerMetadataSchema is a struct that represents the metadata of a scler +type ScalerMetadataSchema struct { + // Type is the name of the scaler + Type string `json:"type,omitempty" yaml:"type,omitempty"` + + // Metadata is a list of fields of the scaler + Metadata []Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty"` +} + +// FullMetadataSchema is a complete schema of the scaler metadata +type FullMetadataSchema struct { + // KedaVersion is the version of the current KEDA + KedaVersion string `json:"kedaVersion,omitempty" yaml:"kedaVersion,omitempty"` + + // SchemaVersion is the version of the schema + SchemaVersion float64 `json:"schemaVersion,omitempty" yaml:"schemaVersion,omitempty"` + + // Scalers is a list of scalers + Scalers []ScalerMetadataSchema `json:"scalers,omitempty" yaml:"scalers,omitempty"` +} + +// aggregateSchemaStruct is a function that aggregates the info from different scaler structs and generates a schema +// scalersSelectors is a map that contains the name of the scaler and the name of the scaler creator function from the scalers_builder file +// kedaScalerStructs is the structs of the scalers that are tagged with `keda` +// kedaReferenceKedaTagStructs is the sub structs that are referenced by the keda tagged structs +func aggregateSchemaStruct(scalerSelectors map[string]string, kedaScalerStructs map[string]*ast.StructType, otherReferenceKedaTagStructs map[string]*ast.StructType, outputFileName string, outputFilePath string, outputFileFormat string) (err error) { + scalerMetadataSchemas := []ScalerMetadataSchema{} + sortedScalerCreatorNames := []string{} + for k := range kedaScalerStructs { + sortedScalerCreatorNames = append(sortedScalerCreatorNames, k) + } + sort.Strings(sortedScalerCreatorNames) + + sortedScalerNames := []string{} + for k := range scalerSelectors { + sortedScalerNames = append(sortedScalerNames, k) + } + sort.Strings(sortedScalerNames) + + for _, creatorName := range sortedScalerCreatorNames { + metadataFields := generateMetadataFields(kedaScalerStructs[creatorName], otherReferenceKedaTagStructs) + if len(metadataFields) == 0 { + fmt.Printf("Error generating metadata fields with creator %s: %s\n", creatorName, err) + continue + } + + // Find which scaler names the creator is called by and construct the metadata schema + for _, scalerName := range sortedScalerNames { + if scalerSelectors[scalerName] == creatorName { + scalerMetadataSchema := ScalerMetadataSchema{} + scalerMetadataSchema.Type = scalerName + scalerMetadataSchema.Metadata = metadataFields + scalerMetadataSchemas = append(scalerMetadataSchemas, scalerMetadataSchema) + fmt.Printf("Scaler Metadata Schema Added: %s\n", scalerName) + } + } + } + + // Combine all the metadata schemas into a complete schema + fullMetadataSchema := FullMetadataSchema{ + KedaVersion: kedaVersion, + SchemaVersion: schemaVersion, + Scalers: scalerMetadataSchemas, + } + + if _, err := os.Stat(outputFilePath); errors.Is(err, os.ErrNotExist) { + err := os.Mkdir(outputFilePath, os.ModePerm) + if err != nil { + return err + } + } + + switch outputFileFormat { + case "yaml": + filedata, err := yaml.Marshal(fullMetadataSchema) + if err != nil { + return err + } + + fileName := outputFilePath + "/" + outputFileName + ".yaml" + err = os.WriteFile(fileName, filedata, 0644) + if err != nil { + return err + } + case "json": + filedata, err := json.MarshalIndent(fullMetadataSchema, "", " ") + if err != nil { + return err + } + + filedata = append(filedata, '\n') + fileName := outputFilePath + "/" + outputFileName + ".json" + err = os.WriteFile(fileName, filedata, 0644) + if err != nil { + return err + } + case "both": + + filedata, err := yaml.Marshal(fullMetadataSchema) + if err != nil { + return err + } + + fileName := outputFilePath + "/" + outputFileName + ".yaml" + err = os.WriteFile(fileName, filedata, 0644) + if err != nil { + return err + } + + filedata, err = json.MarshalIndent(fullMetadataSchema, "", " ") + if err != nil { + return err + } + + filedata = append(filedata, '\n') + fileName = outputFilePath + "/" + outputFileName + ".json" + err = os.WriteFile(fileName, filedata, 0644) + if err != nil { + return err + } + default: + return fmt.Errorf("output file format %s is not supported", outputFileFormat) + } + + return err +} + +// generateMetadataFields is a function that generates the metadata fields of a scaler struct +func generateMetadataFields(structType *ast.StructType, otherReferenceKedaTagStructs map[string]*ast.StructType) []Metadata { + scalerMetadata := []Metadata{} + + // get the tag of each field and generate the metadata + for _, commentGroup := range structType.Fields.List { + if commentGroup.Tag == nil || commentGroup.Tag.Value == "" { + continue + } + metadataList, hasSubstruct, err := generateMetadatas(commentGroup.Tag.Value) + + if err != nil { + fmt.Printf("Error generating metadata fields from tag value: %s, err: %s\n", commentGroup.Tag.Value, err) + continue + } + + if !hasSubstruct { + scalerMetadata = append(scalerMetadata, metadataList...) + continue + } + + // If the field has a substruct, try to find substruct from reference structs + s, ok := commentGroup.Type.(*ast.Ident) + if !ok { + continue + } + if otherReferenceKedaTagStructs[s.Name] != nil { + subStructMetadataField := generateMetadataFields(otherReferenceKedaTagStructs[s.Name], otherReferenceKedaTagStructs) + if len(subStructMetadataField) > 0 { + scalerMetadata = append(scalerMetadata, subStructMetadataField...) + } + } + } + + return scalerMetadata +} + +// generateMetadatas is a function that generates the metadata field from tag +func generateMetadatas(tag string) ([]Metadata, bool, error) { + var fieldNames []string + metadata := Metadata{Type: "string"} + tagSplit := strings.Split(strings.Trim(strings.Split(strings.Trim(tag, "`"), ":")[1], "\""), scalersconfig.TagSeparator) + + if len(tagSplit) == 1 && tagSplit[0] == scalersconfig.OptionalTag { + return nil, true, nil + } + + for _, ts := range tagSplit { + tsplit := strings.Split(ts, scalersconfig.TagKeySeparator) + tsplit[0] = strings.TrimSpace(tsplit[0]) + switch tsplit[0] { + case scalersconfig.OptionalTag: + if len(tsplit) == 1 { + metadata.Optional = true + } + if len(tsplit) > 1 { + optional, err := strconv.ParseBool(strings.TrimSpace(tsplit[1])) + if err != nil { + return nil, false, fmt.Errorf("error parsing optional value %s: %w", tsplit[1], err) + } + metadata.Optional = optional + } + case scalersconfig.OrderTag: + if len(tsplit) > 1 { + order := strings.Split(tsplit[1], scalersconfig.TagValueSeparator) + canReadFromEnv, canReadFromAuth, err := retrieveDataFromOrder(order) + if err != nil { + return nil, false, err + } + metadata.CanReadFromEnv = canReadFromEnv + metadata.CanReadFromAuth = canReadFromAuth + } + case scalersconfig.NameTag: + if len(tsplit) > 1 { + fieldNames = strings.Split(strings.TrimSpace(tsplit[1]), scalersconfig.TagValueSeparator) + } + case scalersconfig.DeprecatedTag: + if len(tsplit) == 1 { + metadata.Deprecated = scalersconfig.DeprecatedTag + } else { + metadata.Deprecated = strings.TrimSpace(tsplit[1]) + } + case scalersconfig.DeprecatedAnnounceTag: + if len(tsplit) == 1 { + metadata.DeprecatedAnnounce = scalersconfig.DeprecatedAnnounceTag + } else { + metadata.DeprecatedAnnounce = strings.TrimSpace(tsplit[1]) + } + case scalersconfig.DefaultTag: + if len(tsplit) > 1 { + metadata.Default = strings.TrimSpace(tsplit[1]) + } + case scalersconfig.EnumTag: + if len(tsplit) > 1 { + metadata.AllowedValue = strings.Split(tsplit[1], scalersconfig.TagValueSeparator) + } + case scalersconfig.ExclusiveSetTag: + if len(tsplit) > 1 { + metadata.ExclusiveSet = strings.Split(tsplit[1], scalersconfig.TagValueSeparator) + } + case scalersconfig.RangeTag: + if len(tsplit) == 1 { + metadata.RangeSeparator = "-" + } + if len(tsplit) == 2 { + metadata.RangeSeparator = strings.TrimSpace(tsplit[1]) + } + case scalersconfig.SeparatorTag: + if len(tsplit) > 1 { + metadata.Separator = strings.TrimSpace(tsplit[1]) + } + case "": + continue + default: + return nil, false, fmt.Errorf("unknown tag param %s: %s", tsplit[0], tag) + } + } + + if len(fieldNames) == 0 { + return nil, false, fmt.Errorf("fieldname doesn't exist in tag value") + } + + metadatas := createMetadatas(metadata, fieldNames) + return metadatas, false, nil +} + +// retrieveDataFromOrder is a function that retrieves the data from the order tag +func retrieveDataFromOrder(orders []string) (bool, bool, error) { + var canReadFromEnv, canReadFromAuth = false, false + for _, po := range orders { + poTyped := scalersconfig.ParsingOrder(strings.TrimSpace(po)) + if !scalersconfig.AllowedParsingOrderMap[poTyped] { + apo := maps.Keys(scalersconfig.AllowedParsingOrderMap) + slices.Sort(apo) + return false, false, fmt.Errorf("unknown parsing order value %s, has to be one of %s", po, apo) + } + if poTyped == scalersconfig.ResolvedEnv { + canReadFromEnv = true + } else if poTyped == scalersconfig.AuthParams { + canReadFromAuth = true + } + } + return canReadFromEnv, canReadFromAuth, nil +} + +// createMetadatas is a function that creates the metadata with the field names +func createMetadatas(metadata Metadata, fieldNames []string) []Metadata { + metadatas := []Metadata{} + for _, fieldName := range fieldNames { + metadata.Name = fieldName + metadatas = append(metadatas, metadata) + } + return metadatas +} + +// getBuildScalerCalls is a function that gets the map of scaler names and the creator function names from the scalers_builder file +func getBuildScalerCalls(fileName string) (map[string]string, error) { + scalerCallers := map[string]string{} + data, err := os.ReadFile(fileName) + if err != nil { + return nil, err + } + + fset := token.NewFileSet() + f, err := parser.ParseFile(fset, "", string(data), 0) + if err != nil { + return nil, err + } + + // Try to find the "triggerType" switch statement and get the trigger names and creator function names + ast.Inspect(f, func(n ast.Node) bool { + switch t := n.(type) { + case *ast.SwitchStmt: + s, ok := t.Tag.(*ast.Ident) + if !ok || s.Name != "triggerType" { + break + } + // retrieve the creator function name from each case statement + for _, casesAst := range t.Body.List { + c, ok := casesAst.(*ast.CaseClause) + + if !ok || len(c.List) == 0 || len(c.Body) == 0 { + continue + } + + basic, ok := c.List[0].(*ast.BasicLit) + if !ok { + continue + } + + r, ok := c.Body[0].(*ast.ReturnStmt) + if !ok { + continue + } + + if len(r.Results) == 0 { + continue + } + caller, ok := r.Results[0].(*ast.CallExpr) + if !ok { + continue + } + + expr, ok := caller.Fun.(*ast.SelectorExpr) + if !ok { + continue + } + + scalerCallers[strings.Trim(basic.Value, "\"")] = expr.Sel.Name + } + } + return true + }) + return scalerCallers, nil +} + +// getAllKedaTagedStructs is a function that gets all the structs that are tagged with `keda` from the scalers files +func getAllKedaTagedStructs(dir string) (map[string]*ast.StructType, map[string]*ast.StructType) { + // loop all files in the scalers directory and get the structs that are tagged with `keda` + entries, err := os.ReadDir(dir) + if err != nil { + log.Fatal(err) + } + + kedaScalerStructs := map[string]*ast.StructType{} + kedaTagStructs := map[string]*ast.StructType{} + + for _, e := range entries { + if e.IsDir() { + getAllKedaTagedStructs(dir + "/" + e.Name()) + continue + } + + data, err := os.ReadFile(dir + "/" + e.Name()) + if err != nil { + continue + } + + fset := token.NewFileSet() + f, err := parser.ParseFile(fset, "", string(data), 0) + if err != nil { + continue + } + + var scalerStructs *ast.StructType + + for _, decl := range f.Decls { + switch v := decl.(type) { + case *ast.GenDecl: + for _, spec := range v.Specs { + ts, ok := spec.(*ast.TypeSpec) + if !ok { + continue + } + + structType, ok := ts.Type.(*ast.StructType) + if !ok { + continue + } + + hasTriggerIndex := false + for _, v := range structType.Fields.List { + // Find `triggerIndex` field and identify the struct as a scaler struct, otherwise identify the struct as an abstract substruct + if len(v.Names) > 0 && v.Names[0].Name == "triggerIndex" { + hasTriggerIndex = true + continue + } + + if v.Tag == nil || v.Tag.Value == "" { + continue + } + + tagvalue := strings.Split(strings.Trim(v.Tag.Value, "`"), ":") + + // if the tag is `keda`, add the struct to the kedaTagStructs map + if len(tagvalue) > 0 && tagvalue[0] == "keda" { + kedaTagStructs[ts.Name.Name] = structType + } + } + + if hasTriggerIndex { + scalerStructs = kedaTagStructs[ts.Name.Name] + delete(kedaTagStructs, ts.Name.Name) + } + } + case *ast.FuncDecl: + if strings.HasPrefix(v.Name.Name, creatorSymbol) && scalerStructs != nil { + kedaScalerStructs[v.Name.Name] = scalerStructs + } + } + } + } + + return kedaScalerStructs, kedaTagStructs +} + +func main() { + var builderFilePath string + var scalersFilesDirPath string + var specifyScaler string + var outputFileName string + var outputFilePath string + var outputFormat string + pflag.StringVar(&kedaVersion, "keda-version", "1.0", "Set the version of current KEDA in schema.") + pflag.StringVar(&builderFilePath, "scalers-builder-file", "../pkg/scaling/scalers_builder.go", "The file that exists `buildScaler` func.") + pflag.StringVar(&scalersFilesDirPath, "scalers-files-dir", "../pkg/scalers", "The directory that exists all scalers' files.") + pflag.StringVar(&specifyScaler, "specify-scaler", "", "Specify scaler name.") + pflag.StringVar(&outputFileName, "output-file-name", "scalers-metadata-schema", "Output file name.") + pflag.StringVar(&outputFilePath, "output-file-path", "./", "Output file path.") + pflag.StringVar(&outputFormat, "output-file-format", "both", "Output file format. support json and yaml.") + pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + pflag.Parse() + + scalerSelectors, err := getBuildScalerCalls(builderFilePath) + if err != nil { + fmt.Printf("get build scaler calls error: %s\n", err) + } + + if specifyScaler != "" { + if scalerSelectors[specifyScaler] != "" { + scalerSelectors = map[string]string{specifyScaler: scalerSelectors[specifyScaler]} + } else { + fmt.Println("Cannot find the specified scaler") + os.Exit(0) + } + } + + kedaTagStructs, otherReferenceStructs := getAllKedaTagedStructs(scalersFilesDirPath) + err = aggregateSchemaStruct(scalerSelectors, kedaTagStructs, otherReferenceStructs, outputFileName, outputFilePath, outputFormat) + if err != nil { + fmt.Printf("Error aggregating schema struct: %s\n", err) + } +} diff --git a/schema/generated/scalers-metadata-schema_v2.16.1.json b/schema/generated/scalers-metadata-schema_v2.16.1.json new file mode 100644 index 00000000000..b6a09172fb9 --- /dev/null +++ b/schema/generated/scalers-metadata-schema_v2.16.1.json @@ -0,0 +1,2112 @@ +{ + "kedaVersion": "2.16.1", + "schemaVersion": 1, + "scalers": [ + { + "type": "activemq", + "metadata": [ + { + "name": "managementEndpoint", + "type": "string", + "optional": true + }, + { + "name": "destinationName", + "type": "string", + "optional": true + }, + { + "name": "brokerName", + "type": "string", + "optional": true + }, + { + "name": "username", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "corsHeader", + "type": "string", + "optional": true + }, + { + "name": "restAPITemplate", + "type": "string", + "optional": true + }, + { + "name": "targetQueueSize", + "type": "string", + "optional": true, + "default": "10" + }, + { + "name": "activationTargetQueueSize", + "type": "string", + "optional": true, + "default": "0" + } + ] + }, + { + "type": "apache-kafka", + "metadata": [ + { + "name": "bootstrapServers", + "type": "string", + "canReadFromEnv": true + }, + { + "name": "consumerGroup", + "type": "string", + "canReadFromEnv": true + }, + { + "name": "topic", + "type": "string", + "optional": true, + "canReadFromEnv": true + }, + { + "name": "partitionLimitation", + "type": "string", + "optional": true, + "rangeSeparator": "-" + }, + { + "name": "lagThreshold", + "type": "string", + "default": "10" + }, + { + "name": "activationLagThreshold", + "type": "string", + "default": "0" + }, + { + "name": "offsetResetPolicy", + "type": "string", + "default": "latest", + "allowedValue": [ + "earliest", + "latest" + ] + }, + { + "name": "allowIdleConsumers", + "type": "string", + "optional": true + }, + { + "name": "excludePersistentLag", + "type": "string", + "optional": true + }, + { + "name": "scaleToZeroOnInvalidOffset", + "type": "string", + "optional": true + }, + { + "name": "limitToPartitionsWithLag", + "type": "string", + "optional": true + }, + { + "name": "sasl", + "type": "string", + "default": "none", + "allowedValue": [ + "none", + "plaintext", + "scram_sha256", + "scram_sha512", + "gssapi", + "aws_msk_iam" + ], + "canReadFromAuth": true + }, + { + "name": "username", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "awsRegion", + "type": "string", + "optional": true + }, + { + "name": "awsEndpoint", + "type": "string", + "optional": true + }, + { + "name": "tls", + "type": "string", + "default": "disable", + "allowedValue": [ + "enable", + "disable" + ], + "canReadFromAuth": true + }, + { + "name": "cert", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "key", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "keyPassword", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "ca", + "type": "string", + "optional": true, + "canReadFromAuth": true + } + ] + }, + { + "type": "arangodb", + "metadata": [ + { + "name": "endpoints", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "collection", + "type": "string" + }, + { + "name": "query", + "type": "string" + }, + { + "name": "queryValue", + "type": "string", + "default": "0" + }, + { + "name": "activationQueryValue", + "type": "string", + "default": "0" + }, + { + "name": "unsafeSsl", + "type": "string", + "default": "false" + }, + { + "name": "connectionLimit", + "type": "string", + "optional": true + } + ] + }, + { + "type": "aws-cloudwatch", + "metadata": [ + { + "name": "namespace", + "type": "string", + "optional": true + }, + { + "name": "metricName", + "type": "string", + "optional": true + }, + { + "name": "dimensionName", + "type": "string", + "optional": true, + "separator": ";" + }, + { + "name": "dimensionValue", + "type": "string", + "optional": true, + "separator": ";" + }, + { + "name": "expression", + "type": "string", + "optional": true + }, + { + "name": "targetMetricValue", + "type": "string" + }, + { + "name": "activationTargetMetricValue", + "type": "string", + "optional": true + }, + { + "name": "minMetricValue", + "type": "string" + }, + { + "name": "ignoreNullValues", + "type": "string", + "optional": true, + "default": "true" + }, + { + "name": "metricCollectionTime", + "type": "string", + "optional": true, + "default": "300" + }, + { + "name": "metricStat", + "type": "string", + "optional": true, + "default": "Average" + }, + { + "name": "metricUnit", + "type": "string", + "optional": true + }, + { + "name": "metricStatPeriod", + "type": "string", + "optional": true, + "default": "300" + }, + { + "name": "metricEndTimeOffset", + "type": "string", + "optional": true, + "default": "0" + }, + { + "name": "awsRegion", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "awsEndpoint", + "type": "string", + "optional": true + } + ] + }, + { + "type": "aws-dynamodb", + "metadata": [ + { + "name": "tableName", + "type": "string" + }, + { + "name": "awsRegion", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "awsEndpoint", + "type": "string", + "optional": true + }, + { + "name": "keyConditionExpression", + "type": "string" + }, + { + "name": "indexName", + "type": "string", + "optional": true + }, + { + "name": "targetValue", + "type": "string", + "optional": true, + "default": "-1" + }, + { + "name": "activationTargetValue", + "type": "string", + "default": "0" + } + ] + }, + { + "type": "aws-dynamodb-streams", + "metadata": [ + { + "name": "shardCount", + "type": "string", + "default": "2" + }, + { + "name": "activationShardCount", + "type": "string", + "default": "0" + }, + { + "name": "tableName", + "type": "string" + }, + { + "name": "awsRegion", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "awsEndpoint", + "type": "string", + "optional": true + } + ] + }, + { + "type": "aws-kinesis-stream", + "metadata": [ + { + "name": "shardCount", + "type": "string", + "default": "2" + }, + { + "name": "activationShardCount", + "type": "string", + "default": "0" + }, + { + "name": "streamName", + "type": "string" + }, + { + "name": "awsRegion", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "awsEndpoint", + "type": "string", + "optional": true + } + ] + }, + { + "type": "aws-sqs-queue", + "metadata": [ + { + "name": "queueLength", + "type": "string", + "default": "5" + }, + { + "name": "activationQueueLength", + "type": "string", + "default": "0" + }, + { + "name": "queueURL", + "type": "string", + "canReadFromEnv": true + }, + { + "name": "queueURLFromEnv", + "type": "string", + "canReadFromEnv": true + }, + { + "name": "awsRegion", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "awsEndpoint", + "type": "string", + "optional": true + }, + { + "name": "scaleOnInFlight", + "type": "string", + "default": "true" + }, + { + "name": "scaleOnDelayed", + "type": "string", + "default": "false" + } + ] + }, + { + "type": "etcd", + "metadata": [ + { + "name": "endpoints", + "type": "string" + }, + { + "name": "watchKey", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "activationValue", + "type": "string", + "optional": true, + "default": "0" + }, + { + "name": "watchProgressNotifyInterval", + "type": "string", + "optional": true, + "default": "600" + }, + { + "name": "username", + "type": "string", + "optional": true, + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "optional": true, + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "tls", + "type": "string", + "optional": true, + "default": "disable", + "canReadFromAuth": true + }, + { + "name": "cert", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "key", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "keyPassword", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "ca", + "type": "string", + "optional": true, + "canReadFromAuth": true + } + ] + }, + { + "type": "gcp-cloudtasks", + "metadata": [ + { + "name": "value", + "type": "string", + "optional": true, + "default": "100" + }, + { + "name": "activationValue", + "type": "string", + "optional": true, + "default": "0" + }, + { + "name": "filterDuration", + "type": "string", + "optional": true + }, + { + "name": "queueName", + "type": "string" + }, + { + "name": "projectID", + "type": "string" + } + ] + }, + { + "type": "ibmmq", + "metadata": [ + { + "name": "host", + "type": "string" + }, + { + "name": "queueName", + "type": "string" + }, + { + "name": "queueNames", + "type": "string" + }, + { + "name": "queueDepth", + "type": "string", + "default": "20" + }, + { + "name": "activationQueueDepth", + "type": "string", + "default": "0" + }, + { + "name": "operation", + "type": "string", + "default": "max", + "allowedValue": [ + "max", + "avg", + "sum" + ] + }, + { + "name": "username", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "unsafeSsl", + "type": "string", + "default": "false" + }, + { + "name": "tls", + "type": "string", + "default": "false", + "deprecatedAnnounce": "The 'tls' setting is DEPRECATED and will be removed in v2.18 - Use 'unsafeSsl' instead" + }, + { + "name": "ca", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "cert", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "key", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "keyPassword", + "type": "string", + "optional": true, + "canReadFromAuth": true + } + ] + }, + { + "type": "influxdb", + "metadata": [ + { + "name": "authToken", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "organizationName", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "query", + "type": "string" + }, + { + "name": "serverURL", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "unsafeSsl", + "type": "string", + "optional": true + }, + { + "name": "thresholdValue", + "type": "string", + "optional": true + }, + { + "name": "activationThresholdValue", + "type": "string", + "optional": true + } + ] + }, + { + "type": "kubernetes-workload", + "metadata": [ + { + "name": "podSelector", + "type": "string" + }, + { + "name": "value", + "type": "string", + "default": "0" + }, + { + "name": "activationValue", + "type": "string", + "default": "0" + } + ] + }, + { + "type": "nsq", + "metadata": [ + { + "name": "nsqLookupdHTTPAddresses", + "type": "string", + "canReadFromEnv": true + }, + { + "name": "topic", + "type": "string", + "canReadFromEnv": true + }, + { + "name": "channel", + "type": "string", + "canReadFromEnv": true + }, + { + "name": "depthThreshold", + "type": "string", + "default": "10", + "canReadFromEnv": true + }, + { + "name": "activationDepthThreshold", + "type": "string", + "default": "0", + "canReadFromEnv": true + }, + { + "name": "useHttps", + "type": "string", + "default": "false", + "canReadFromEnv": true + }, + { + "name": "unsafeSsl", + "type": "string", + "default": "false", + "canReadFromEnv": true + } + ] + }, + { + "type": "postgresql", + "metadata": [ + { + "name": "targetQueryValue", + "type": "string", + "optional": true + }, + { + "name": "activationTargetQueryValue", + "type": "string", + "optional": true + }, + { + "name": "connection", + "type": "string", + "optional": true, + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "query", + "type": "string" + }, + { + "name": "host", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "port", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "userName", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "dbName", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "sslmode", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "optional": true, + "canReadFromEnv": true, + "canReadFromAuth": true + } + ] + }, + { + "type": "predictkube", + "metadata": [ + { + "name": "prometheusAddress", + "type": "string" + }, + { + "name": "query", + "type": "string" + }, + { + "name": "predictHorizon", + "type": "string" + }, + { + "name": "queryStep", + "type": "string" + }, + { + "name": "historyTimeWindow", + "type": "string" + }, + { + "name": "apiKey", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "threshold", + "type": "string", + "optional": true + }, + { + "name": "activationThreshold", + "type": "string", + "optional": true + } + ] + }, + { + "type": "prometheus", + "metadata": [ + { + "name": "serverAddress", + "type": "string" + }, + { + "name": "query", + "type": "string" + }, + { + "name": "queryParameters", + "type": "string", + "optional": true + }, + { + "name": "threshold", + "type": "string" + }, + { + "name": "activationThreshold", + "type": "string", + "optional": true + }, + { + "name": "namespace", + "type": "string", + "optional": true + }, + { + "name": "customHeaders", + "type": "string", + "optional": true + }, + { + "name": "ignoreNullValues", + "type": "string", + "optional": true, + "default": "true" + }, + { + "name": "unsafeSsl", + "type": "string", + "optional": true + }, + { + "name": "awsRegion", + "type": "string", + "optional": true, + "canReadFromAuth": true + } + ] + }, + { + "type": "rabbitmq", + "metadata": [ + { + "name": "queueName", + "type": "string" + }, + { + "name": "mode", + "type": "string", + "optional": true, + "default": "Unknown" + }, + { + "name": "queueLength", + "type": "string", + "optional": true + }, + { + "name": "value", + "type": "string", + "optional": true + }, + { + "name": "activationValue", + "type": "string", + "optional": true + }, + { + "name": "host", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "protocol", + "type": "string", + "optional": true, + "default": "auto", + "canReadFromAuth": true + }, + { + "name": "vhostName", + "type": "string", + "optional": true + }, + { + "name": "useRegex", + "type": "string", + "optional": true + }, + { + "name": "excludeUnacknowledged", + "type": "string", + "optional": true + }, + { + "name": "pageSize", + "type": "string", + "optional": true, + "default": "100" + }, + { + "name": "operation", + "type": "string", + "optional": true, + "default": "sum" + }, + { + "name": "timeout", + "type": "string", + "optional": true + }, + { + "name": "username", + "type": "string", + "optional": true, + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "optional": true, + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "ca", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "cert", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "key", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "keyPassword", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "tls", + "type": "string", + "optional": true, + "default": "disable", + "canReadFromAuth": true + }, + { + "name": "unsafeSsl", + "type": "string", + "optional": true + }, + { + "name": "workloadIdentityResource", + "type": "string", + "optional": true, + "canReadFromAuth": true + } + ] + }, + { + "type": "redis", + "metadata": [ + { + "name": "listLength", + "type": "string", + "optional": true, + "default": "5" + }, + { + "name": "activationListLength", + "type": "string", + "optional": true + }, + { + "name": "listName", + "type": "string" + }, + { + "name": "databaseIndex", + "type": "string", + "optional": true + }, + { + "name": "enableTLS", + "type": "string", + "optional": true + }, + { + "name": "tls", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "address", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "addresses", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "username", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelUsername", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelPassword", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelMaster", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "host", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "hosts", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "port", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "ports", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "unsafeSsl", + "type": "string", + "optional": true, + "default": "false" + }, + { + "name": "Cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "key", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "keyPassword", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "ca", + "type": "string", + "canReadFromAuth": true + } + ] + }, + { + "type": "redis-cluster", + "metadata": [ + { + "name": "listLength", + "type": "string", + "optional": true, + "default": "5" + }, + { + "name": "activationListLength", + "type": "string", + "optional": true + }, + { + "name": "listName", + "type": "string" + }, + { + "name": "databaseIndex", + "type": "string", + "optional": true + }, + { + "name": "enableTLS", + "type": "string", + "optional": true + }, + { + "name": "tls", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "address", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "addresses", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "username", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelUsername", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelPassword", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelMaster", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "host", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "hosts", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "port", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "ports", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "unsafeSsl", + "type": "string", + "optional": true, + "default": "false" + }, + { + "name": "Cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "key", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "keyPassword", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "ca", + "type": "string", + "canReadFromAuth": true + } + ] + }, + { + "type": "redis-sentinel", + "metadata": [ + { + "name": "listLength", + "type": "string", + "optional": true, + "default": "5" + }, + { + "name": "activationListLength", + "type": "string", + "optional": true + }, + { + "name": "listName", + "type": "string" + }, + { + "name": "databaseIndex", + "type": "string", + "optional": true + }, + { + "name": "enableTLS", + "type": "string", + "optional": true + }, + { + "name": "tls", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "address", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "addresses", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "username", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelUsername", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelPassword", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelMaster", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "host", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "hosts", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "port", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "ports", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "unsafeSsl", + "type": "string", + "optional": true, + "default": "false" + }, + { + "name": "Cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "key", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "keyPassword", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "ca", + "type": "string", + "canReadFromAuth": true + } + ] + }, + { + "type": "redis-cluster-streams", + "metadata": [ + { + "name": "pendingEntriesCount", + "type": "string", + "optional": true, + "default": "5" + }, + { + "name": "streamLength", + "type": "string", + "optional": true, + "default": "5" + }, + { + "name": "lagCount", + "type": "string", + "optional": true + }, + { + "name": "stream", + "type": "string" + }, + { + "name": "consumerGroup", + "type": "string", + "optional": true + }, + { + "name": "databaseIndex", + "type": "string", + "optional": true + }, + { + "name": "address", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "addresses", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "username", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelUsername", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelPassword", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelMaster", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "host", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "hosts", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "port", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "ports", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "unsafeSsl", + "type": "string", + "optional": true, + "default": "false" + }, + { + "name": "Cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "key", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "keyPassword", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "ca", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "activationLagCount", + "type": "string", + "optional": true + }, + { + "name": "enableTLS", + "type": "string", + "optional": true + }, + { + "name": "tls", + "type": "string", + "optional": true, + "canReadFromAuth": true + } + ] + }, + { + "type": "redis-sentinel-streams", + "metadata": [ + { + "name": "pendingEntriesCount", + "type": "string", + "optional": true, + "default": "5" + }, + { + "name": "streamLength", + "type": "string", + "optional": true, + "default": "5" + }, + { + "name": "lagCount", + "type": "string", + "optional": true + }, + { + "name": "stream", + "type": "string" + }, + { + "name": "consumerGroup", + "type": "string", + "optional": true + }, + { + "name": "databaseIndex", + "type": "string", + "optional": true + }, + { + "name": "address", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "addresses", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "username", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelUsername", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelPassword", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelMaster", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "host", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "hosts", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "port", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "ports", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "unsafeSsl", + "type": "string", + "optional": true, + "default": "false" + }, + { + "name": "Cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "key", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "keyPassword", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "ca", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "activationLagCount", + "type": "string", + "optional": true + }, + { + "name": "enableTLS", + "type": "string", + "optional": true + }, + { + "name": "tls", + "type": "string", + "optional": true, + "canReadFromAuth": true + } + ] + }, + { + "type": "redis-streams", + "metadata": [ + { + "name": "pendingEntriesCount", + "type": "string", + "optional": true, + "default": "5" + }, + { + "name": "streamLength", + "type": "string", + "optional": true, + "default": "5" + }, + { + "name": "lagCount", + "type": "string", + "optional": true + }, + { + "name": "stream", + "type": "string" + }, + { + "name": "consumerGroup", + "type": "string", + "optional": true + }, + { + "name": "databaseIndex", + "type": "string", + "optional": true + }, + { + "name": "address", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "addresses", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "username", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelUsername", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelPassword", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "sentinelMaster", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "host", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "hosts", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "port", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "ports", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "unsafeSsl", + "type": "string", + "optional": true, + "default": "false" + }, + { + "name": "Cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "cert", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "key", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "keyPassword", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "ca", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "activationLagCount", + "type": "string", + "optional": true + }, + { + "name": "enableTLS", + "type": "string", + "optional": true + }, + { + "name": "tls", + "type": "string", + "optional": true, + "canReadFromAuth": true + } + ] + }, + { + "type": "selenium-grid", + "metadata": [ + { + "name": "url", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "authType", + "type": "string", + "optional": true, + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "username", + "type": "string", + "optional": true, + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "optional": true, + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "accessToken", + "type": "string", + "optional": true, + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "browserName", + "type": "string", + "optional": true + }, + { + "name": "sessionBrowserName", + "type": "string", + "optional": true + }, + { + "name": "browserVersion", + "type": "string", + "optional": true + }, + { + "name": "platformName", + "type": "string", + "optional": true + }, + { + "name": "activationThreshold", + "type": "string", + "optional": true + }, + { + "name": "unsafeSsl", + "type": "string", + "default": "false" + }, + { + "name": "nodeMaxSessions", + "type": "string", + "default": "1" + } + ] + }, + { + "type": "solace-event-queue", + "metadata": [ + { + "name": "solaceSempBaseURL", + "type": "string" + }, + { + "name": "messageVpn", + "type": "string" + }, + { + "name": "queueName", + "type": "string" + }, + { + "name": "username", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "canReadFromEnv": true, + "canReadFromAuth": true + }, + { + "name": "messageCountTarget", + "type": "string", + "optional": true + }, + { + "name": "messageSpoolUsageTarget", + "type": "string", + "optional": true + }, + { + "name": "messageReceiveRateTarget", + "type": "string", + "optional": true + }, + { + "name": "activationMessageCountTarget", + "type": "string", + "optional": true, + "default": "0" + }, + { + "name": "activationMessageSpoolUsageTarget", + "type": "string", + "optional": true, + "default": "0" + }, + { + "name": "activationMessageReceiveRateTarget", + "type": "string", + "optional": true, + "default": "0" + } + ] + }, + { + "type": "solr", + "metadata": [ + { + "name": "host", + "type": "string" + }, + { + "name": "collection", + "type": "string" + }, + { + "name": "targetQueryValue", + "type": "string" + }, + { + "name": "activationTargetQueryValue", + "type": "string", + "optional": true, + "default": "0" + }, + { + "name": "query", + "type": "string", + "optional": true + }, + { + "name": "username", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "canReadFromAuth": true + } + ] + }, + { + "type": "splunk", + "metadata": [ + { + "name": "apiToken", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "password", + "type": "string", + "optional": true, + "canReadFromAuth": true + }, + { + "name": "username", + "type": "string", + "canReadFromAuth": true + }, + { + "name": "host", + "type": "string" + }, + { + "name": "unsafeSsl", + "type": "string", + "optional": true + }, + { + "name": "targetValue", + "type": "string" + }, + { + "name": "activationValue", + "type": "string" + }, + { + "name": "savedSearchName", + "type": "string" + }, + { + "name": "valueField", + "type": "string" + } + ] + } + ] +} diff --git a/schema/generated/scalers-metadata-schema_v2.16.1.yaml b/schema/generated/scalers-metadata-schema_v2.16.1.yaml new file mode 100644 index 00000000000..2008717955b --- /dev/null +++ b/schema/generated/scalers-metadata-schema_v2.16.1.yaml @@ -0,0 +1,1297 @@ +kedaVersion: 2.16.1 +schemaVersion: 1 +scalers: + - type: activemq + metadata: + - name: managementEndpoint + type: string + optional: true + - name: destinationName + type: string + optional: true + - name: brokerName + type: string + optional: true + - name: username + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: corsHeader + type: string + optional: true + - name: restAPITemplate + type: string + optional: true + - name: targetQueueSize + type: string + optional: true + default: "10" + - name: activationTargetQueueSize + type: string + optional: true + default: "0" + - type: apache-kafka + metadata: + - name: bootstrapServers + type: string + canReadFromEnv: true + - name: consumerGroup + type: string + canReadFromEnv: true + - name: topic + type: string + optional: true + canReadFromEnv: true + - name: partitionLimitation + type: string + optional: true + rangeSeparator: '-' + - name: lagThreshold + type: string + default: "10" + - name: activationLagThreshold + type: string + default: "0" + - name: offsetResetPolicy + type: string + default: latest + allowedValue: + - earliest + - latest + - name: allowIdleConsumers + type: string + optional: true + - name: excludePersistentLag + type: string + optional: true + - name: scaleToZeroOnInvalidOffset + type: string + optional: true + - name: limitToPartitionsWithLag + type: string + optional: true + - name: sasl + type: string + default: none + allowedValue: + - none + - plaintext + - scram_sha256 + - scram_sha512 + - gssapi + - aws_msk_iam + canReadFromAuth: true + - name: username + type: string + optional: true + canReadFromAuth: true + - name: password + type: string + optional: true + canReadFromAuth: true + - name: awsRegion + type: string + optional: true + - name: awsEndpoint + type: string + optional: true + - name: tls + type: string + default: disable + allowedValue: + - enable + - disable + canReadFromAuth: true + - name: cert + type: string + optional: true + canReadFromAuth: true + - name: key + type: string + optional: true + canReadFromAuth: true + - name: keyPassword + type: string + optional: true + canReadFromAuth: true + - name: ca + type: string + optional: true + canReadFromAuth: true + - type: arangodb + metadata: + - name: endpoints + type: string + canReadFromAuth: true + - name: collection + type: string + - name: query + type: string + - name: queryValue + type: string + default: "0" + - name: activationQueryValue + type: string + default: "0" + - name: unsafeSsl + type: string + default: "false" + - name: connectionLimit + type: string + optional: true + - type: aws-cloudwatch + metadata: + - name: namespace + type: string + optional: true + - name: metricName + type: string + optional: true + - name: dimensionName + type: string + optional: true + separator: ; + - name: dimensionValue + type: string + optional: true + separator: ; + - name: expression + type: string + optional: true + - name: targetMetricValue + type: string + - name: activationTargetMetricValue + type: string + optional: true + - name: minMetricValue + type: string + - name: ignoreNullValues + type: string + optional: true + default: "true" + - name: metricCollectionTime + type: string + optional: true + default: "300" + - name: metricStat + type: string + optional: true + default: Average + - name: metricUnit + type: string + optional: true + - name: metricStatPeriod + type: string + optional: true + default: "300" + - name: metricEndTimeOffset + type: string + optional: true + default: "0" + - name: awsRegion + type: string + canReadFromAuth: true + - name: awsEndpoint + type: string + optional: true + - type: aws-dynamodb + metadata: + - name: tableName + type: string + - name: awsRegion + type: string + canReadFromAuth: true + - name: awsEndpoint + type: string + optional: true + - name: keyConditionExpression + type: string + - name: indexName + type: string + optional: true + - name: targetValue + type: string + optional: true + default: "-1" + - name: activationTargetValue + type: string + default: "0" + - type: aws-dynamodb-streams + metadata: + - name: shardCount + type: string + default: "2" + - name: activationShardCount + type: string + default: "0" + - name: tableName + type: string + - name: awsRegion + type: string + canReadFromAuth: true + - name: awsEndpoint + type: string + optional: true + - type: aws-kinesis-stream + metadata: + - name: shardCount + type: string + default: "2" + - name: activationShardCount + type: string + default: "0" + - name: streamName + type: string + - name: awsRegion + type: string + canReadFromAuth: true + - name: awsEndpoint + type: string + optional: true + - type: aws-sqs-queue + metadata: + - name: queueLength + type: string + default: "5" + - name: activationQueueLength + type: string + default: "0" + - name: queueURL + type: string + canReadFromEnv: true + - name: queueURLFromEnv + type: string + canReadFromEnv: true + - name: awsRegion + type: string + canReadFromAuth: true + - name: awsEndpoint + type: string + optional: true + - name: scaleOnInFlight + type: string + default: "true" + - name: scaleOnDelayed + type: string + default: "false" + - type: etcd + metadata: + - name: endpoints + type: string + - name: watchKey + type: string + - name: value + type: string + - name: activationValue + type: string + optional: true + default: "0" + - name: watchProgressNotifyInterval + type: string + optional: true + default: "600" + - name: username + type: string + optional: true + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + optional: true + canReadFromEnv: true + canReadFromAuth: true + - name: tls + type: string + optional: true + default: disable + canReadFromAuth: true + - name: cert + type: string + optional: true + canReadFromAuth: true + - name: key + type: string + optional: true + canReadFromAuth: true + - name: keyPassword + type: string + optional: true + canReadFromAuth: true + - name: ca + type: string + optional: true + canReadFromAuth: true + - type: gcp-cloudtasks + metadata: + - name: value + type: string + optional: true + default: "100" + - name: activationValue + type: string + optional: true + default: "0" + - name: filterDuration + type: string + optional: true + - name: queueName + type: string + - name: projectID + type: string + - type: ibmmq + metadata: + - name: host + type: string + - name: queueName + type: string + - name: queueNames + type: string + - name: queueDepth + type: string + default: "20" + - name: activationQueueDepth + type: string + default: "0" + - name: operation + type: string + default: max + allowedValue: + - max + - avg + - sum + - name: username + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: unsafeSsl + type: string + default: "false" + - name: tls + type: string + default: "false" + deprecatedAnnounce: The 'tls' setting is DEPRECATED and will be removed in v2.18 - Use 'unsafeSsl' instead + - name: ca + type: string + optional: true + canReadFromAuth: true + - name: cert + type: string + optional: true + canReadFromAuth: true + - name: key + type: string + optional: true + canReadFromAuth: true + - name: keyPassword + type: string + optional: true + canReadFromAuth: true + - type: influxdb + metadata: + - name: authToken + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: organizationName + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: query + type: string + - name: serverURL + type: string + canReadFromAuth: true + - name: unsafeSsl + type: string + optional: true + - name: thresholdValue + type: string + optional: true + - name: activationThresholdValue + type: string + optional: true + - type: kubernetes-workload + metadata: + - name: podSelector + type: string + - name: value + type: string + default: "0" + - name: activationValue + type: string + default: "0" + - type: nsq + metadata: + - name: nsqLookupdHTTPAddresses + type: string + canReadFromEnv: true + - name: topic + type: string + canReadFromEnv: true + - name: channel + type: string + canReadFromEnv: true + - name: depthThreshold + type: string + default: "10" + canReadFromEnv: true + - name: activationDepthThreshold + type: string + default: "0" + canReadFromEnv: true + - name: useHttps + type: string + default: "false" + canReadFromEnv: true + - name: unsafeSsl + type: string + default: "false" + canReadFromEnv: true + - type: postgresql + metadata: + - name: targetQueryValue + type: string + optional: true + - name: activationTargetQueryValue + type: string + optional: true + - name: connection + type: string + optional: true + canReadFromEnv: true + canReadFromAuth: true + - name: query + type: string + - name: host + type: string + optional: true + canReadFromAuth: true + - name: port + type: string + optional: true + canReadFromAuth: true + - name: userName + type: string + optional: true + canReadFromAuth: true + - name: dbName + type: string + optional: true + canReadFromAuth: true + - name: sslmode + type: string + optional: true + canReadFromAuth: true + - name: password + type: string + optional: true + canReadFromEnv: true + canReadFromAuth: true + - type: predictkube + metadata: + - name: prometheusAddress + type: string + - name: query + type: string + - name: predictHorizon + type: string + - name: queryStep + type: string + - name: historyTimeWindow + type: string + - name: apiKey + type: string + canReadFromAuth: true + - name: threshold + type: string + optional: true + - name: activationThreshold + type: string + optional: true + - type: prometheus + metadata: + - name: serverAddress + type: string + - name: query + type: string + - name: queryParameters + type: string + optional: true + - name: threshold + type: string + - name: activationThreshold + type: string + optional: true + - name: namespace + type: string + optional: true + - name: customHeaders + type: string + optional: true + - name: ignoreNullValues + type: string + optional: true + default: "true" + - name: unsafeSsl + type: string + optional: true + - name: awsRegion + type: string + optional: true + canReadFromAuth: true + - type: rabbitmq + metadata: + - name: queueName + type: string + - name: mode + type: string + optional: true + default: Unknown + - name: queueLength + type: string + optional: true + - name: value + type: string + optional: true + - name: activationValue + type: string + optional: true + - name: host + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: protocol + type: string + optional: true + default: auto + canReadFromAuth: true + - name: vhostName + type: string + optional: true + - name: useRegex + type: string + optional: true + - name: excludeUnacknowledged + type: string + optional: true + - name: pageSize + type: string + optional: true + default: "100" + - name: operation + type: string + optional: true + default: sum + - name: timeout + type: string + optional: true + - name: username + type: string + optional: true + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + optional: true + canReadFromEnv: true + canReadFromAuth: true + - name: ca + type: string + optional: true + canReadFromAuth: true + - name: cert + type: string + optional: true + canReadFromAuth: true + - name: key + type: string + optional: true + canReadFromAuth: true + - name: keyPassword + type: string + optional: true + canReadFromAuth: true + - name: tls + type: string + optional: true + default: disable + canReadFromAuth: true + - name: unsafeSsl + type: string + optional: true + - name: workloadIdentityResource + type: string + optional: true + canReadFromAuth: true + - type: redis + metadata: + - name: listLength + type: string + optional: true + default: "5" + - name: activationListLength + type: string + optional: true + - name: listName + type: string + - name: databaseIndex + type: string + optional: true + - name: enableTLS + type: string + optional: true + - name: tls + type: string + optional: true + canReadFromAuth: true + - name: address + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: addresses + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: username + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelUsername + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelPassword + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelMaster + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: host + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: hosts + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: port + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: ports + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: unsafeSsl + type: string + optional: true + default: "false" + - name: Cert + type: string + canReadFromAuth: true + - name: cert + type: string + canReadFromAuth: true + - name: key + type: string + canReadFromAuth: true + - name: keyPassword + type: string + canReadFromAuth: true + - name: ca + type: string + canReadFromAuth: true + - type: redis-cluster + metadata: + - name: listLength + type: string + optional: true + default: "5" + - name: activationListLength + type: string + optional: true + - name: listName + type: string + - name: databaseIndex + type: string + optional: true + - name: enableTLS + type: string + optional: true + - name: tls + type: string + optional: true + canReadFromAuth: true + - name: address + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: addresses + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: username + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelUsername + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelPassword + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelMaster + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: host + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: hosts + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: port + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: ports + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: unsafeSsl + type: string + optional: true + default: "false" + - name: Cert + type: string + canReadFromAuth: true + - name: cert + type: string + canReadFromAuth: true + - name: key + type: string + canReadFromAuth: true + - name: keyPassword + type: string + canReadFromAuth: true + - name: ca + type: string + canReadFromAuth: true + - type: redis-sentinel + metadata: + - name: listLength + type: string + optional: true + default: "5" + - name: activationListLength + type: string + optional: true + - name: listName + type: string + - name: databaseIndex + type: string + optional: true + - name: enableTLS + type: string + optional: true + - name: tls + type: string + optional: true + canReadFromAuth: true + - name: address + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: addresses + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: username + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelUsername + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelPassword + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelMaster + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: host + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: hosts + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: port + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: ports + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: unsafeSsl + type: string + optional: true + default: "false" + - name: Cert + type: string + canReadFromAuth: true + - name: cert + type: string + canReadFromAuth: true + - name: key + type: string + canReadFromAuth: true + - name: keyPassword + type: string + canReadFromAuth: true + - name: ca + type: string + canReadFromAuth: true + - type: redis-cluster-streams + metadata: + - name: pendingEntriesCount + type: string + optional: true + default: "5" + - name: streamLength + type: string + optional: true + default: "5" + - name: lagCount + type: string + optional: true + - name: stream + type: string + - name: consumerGroup + type: string + optional: true + - name: databaseIndex + type: string + optional: true + - name: address + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: addresses + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: username + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelUsername + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelPassword + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelMaster + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: host + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: hosts + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: port + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: ports + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: unsafeSsl + type: string + optional: true + default: "false" + - name: Cert + type: string + canReadFromAuth: true + - name: cert + type: string + canReadFromAuth: true + - name: key + type: string + canReadFromAuth: true + - name: keyPassword + type: string + canReadFromAuth: true + - name: ca + type: string + canReadFromAuth: true + - name: activationLagCount + type: string + optional: true + - name: enableTLS + type: string + optional: true + - name: tls + type: string + optional: true + canReadFromAuth: true + - type: redis-sentinel-streams + metadata: + - name: pendingEntriesCount + type: string + optional: true + default: "5" + - name: streamLength + type: string + optional: true + default: "5" + - name: lagCount + type: string + optional: true + - name: stream + type: string + - name: consumerGroup + type: string + optional: true + - name: databaseIndex + type: string + optional: true + - name: address + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: addresses + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: username + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelUsername + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelPassword + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelMaster + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: host + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: hosts + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: port + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: ports + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: unsafeSsl + type: string + optional: true + default: "false" + - name: Cert + type: string + canReadFromAuth: true + - name: cert + type: string + canReadFromAuth: true + - name: key + type: string + canReadFromAuth: true + - name: keyPassword + type: string + canReadFromAuth: true + - name: ca + type: string + canReadFromAuth: true + - name: activationLagCount + type: string + optional: true + - name: enableTLS + type: string + optional: true + - name: tls + type: string + optional: true + canReadFromAuth: true + - type: redis-streams + metadata: + - name: pendingEntriesCount + type: string + optional: true + default: "5" + - name: streamLength + type: string + optional: true + default: "5" + - name: lagCount + type: string + optional: true + - name: stream + type: string + - name: consumerGroup + type: string + optional: true + - name: databaseIndex + type: string + optional: true + - name: address + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: addresses + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: username + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelUsername + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelPassword + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: sentinelMaster + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: host + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: hosts + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: port + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: ports + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: unsafeSsl + type: string + optional: true + default: "false" + - name: Cert + type: string + canReadFromAuth: true + - name: cert + type: string + canReadFromAuth: true + - name: key + type: string + canReadFromAuth: true + - name: keyPassword + type: string + canReadFromAuth: true + - name: ca + type: string + canReadFromAuth: true + - name: activationLagCount + type: string + optional: true + - name: enableTLS + type: string + optional: true + - name: tls + type: string + optional: true + canReadFromAuth: true + - type: selenium-grid + metadata: + - name: url + type: string + canReadFromAuth: true + - name: authType + type: string + optional: true + canReadFromEnv: true + canReadFromAuth: true + - name: username + type: string + optional: true + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + optional: true + canReadFromEnv: true + canReadFromAuth: true + - name: accessToken + type: string + optional: true + canReadFromEnv: true + canReadFromAuth: true + - name: browserName + type: string + optional: true + - name: sessionBrowserName + type: string + optional: true + - name: browserVersion + type: string + optional: true + - name: platformName + type: string + optional: true + - name: activationThreshold + type: string + optional: true + - name: unsafeSsl + type: string + default: "false" + - name: nodeMaxSessions + type: string + default: "1" + - type: solace-event-queue + metadata: + - name: solaceSempBaseURL + type: string + - name: messageVpn + type: string + - name: queueName + type: string + - name: username + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: password + type: string + canReadFromEnv: true + canReadFromAuth: true + - name: messageCountTarget + type: string + optional: true + - name: messageSpoolUsageTarget + type: string + optional: true + - name: messageReceiveRateTarget + type: string + optional: true + - name: activationMessageCountTarget + type: string + optional: true + default: "0" + - name: activationMessageSpoolUsageTarget + type: string + optional: true + default: "0" + - name: activationMessageReceiveRateTarget + type: string + optional: true + default: "0" + - type: solr + metadata: + - name: host + type: string + - name: collection + type: string + - name: targetQueryValue + type: string + - name: activationTargetQueryValue + type: string + optional: true + default: "0" + - name: query + type: string + optional: true + - name: username + type: string + canReadFromAuth: true + - name: password + type: string + canReadFromAuth: true + - type: splunk + metadata: + - name: apiToken + type: string + optional: true + canReadFromAuth: true + - name: password + type: string + optional: true + canReadFromAuth: true + - name: username + type: string + canReadFromAuth: true + - name: host + type: string + - name: unsafeSsl + type: string + optional: true + - name: targetValue + type: string + - name: activationValue + type: string + - name: savedSearchName + type: string + - name: valueField + type: string