From 1d6a2519005517555cb732dd7e8a982f462c5722 Mon Sep 17 00:00:00 2001 From: gauron99 Date: Tue, 4 Jul 2023 18:52:08 +0200 Subject: [PATCH] add new manifest, comments --- apis/keda/v1alpha1/scaledobject_types.go | 3 +- config/crd/bases/keda.sh_scaledobjects.yaml | 56 +++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/apis/keda/v1alpha1/scaledobject_types.go b/apis/keda/v1alpha1/scaledobject_types.go index 67e666a1a2a..ae38fcd636b 100644 --- a/apis/keda/v1alpha1/scaledobject_types.go +++ b/apis/keda/v1alpha1/scaledobject_types.go @@ -121,8 +121,7 @@ type ComplexScalingLogic struct { // ExternalCalculation structure describes name and URL of a gRPC server // that KEDA can connect to with collected metrics and modify them. Each server -// has a timeout and optional Fallback replica count. It is not a complete -// fallback functionality because the threshold should be always 1. +// has a timeout and optional Fallback functionality. type ExternalCalculation struct { Name string `json:"name"` URL string `json:"url"` diff --git a/config/crd/bases/keda.sh_scaledobjects.yaml b/config/crd/bases/keda.sh_scaledobjects.yaml index c83b988b301..ec483199bd7 100644 --- a/config/crd/bases/keda.sh_scaledobjects.yaml +++ b/config/crd/bases/keda.sh_scaledobjects.yaml @@ -73,6 +73,47 @@ spec: advanced: description: AdvancedConfig specifies advance scaling options properties: + complexScalingLogic: + description: ComplexScalingLogic describes advanced scaling logic + options like formula and gRPC server for external calculations + properties: + externalCalculators: + items: + description: ExternalCalculation structure describes name + and URL of a gRPC server that KEDA can connect to with + collected metrics and modify them. Each server has a timeout + and optional Fallback functionality. + properties: + name: + type: string + timeout: + type: string + url: + type: string + required: + - name + - timeout + - url + type: object + type: array + fallback: + description: Fallback is the spec for fallback options + properties: + failureThreshold: + format: int32 + type: integer + replicas: + format: int32 + type: integer + required: + - failureThreshold + - replicas + type: object + formula: + type: string + target: + type: string + type: object horizontalPodAutoscalerConfig: description: HorizontalPodAutoscalerConfig specifies horizontal scale config @@ -291,6 +332,8 @@ spec: status: description: ScaledObjectStatus is the status for a ScaledObject resource properties: + compositeScalerName: + type: string conditions: description: Conditions an array representation to store multiple Conditions @@ -315,6 +358,19 @@ spec: - type type: object type: array + externalCalculationHealth: + additionalProperties: + description: HealthStatus is the status for a ScaledObject's health + properties: + numberOfFailures: + format: int32 + type: integer + status: + description: HealthStatusType is an indication of whether the + health status is happy or failing + type: string + type: object + type: object externalMetricNames: items: type: string