ScalingGroup API reference
ScalingGroup is supplied by the Kedify KEDA chart. It coordinates replica capacity across label-selected ScaledObjects. Preserve its documented external-metric restrictions and native-HPA fallback; it is not a security or node-resource quota.
API details
Section titled “API details”Group: keda.kedify.io. Kind: ScalingGroup. Scope: Namespaced.
Defaults below are schema defaults only. “Not specified” does not imply a controller default of zero or false. Required fields are required within their containing object. Runtime behavior can impose additional conditions described in the capability guide.
v1alpha1 fields
Section titled “v1alpha1 fields”Served: true; storage: true.
| Field | Type | Required | Schema default | Meaning and validation |
|---|---|---|---|---|
spec | object | No | Not specified | ScalingGroupSpec defines the desired state of ScalingGroup, total capacity and policy how to allocate resources |
spec.capacity | integer | Yes | Not specified | Capacity is the total max number of replicas that can be created in the group minimum: 1 |
spec.selector | object | Yes | Not specified | Selector is a label selector that defines the group membership |
spec.selector.matchExpressions | array | No | Not specified | matchExpressions is a list of label selector requirements. The requirements are ANDed. |
spec.selector.matchExpressions[] | object | No | Not specified | A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. |
spec.selector.matchExpressions[].key | string | Yes | Not specified | key is the label key that the selector applies to. |
spec.selector.matchExpressions[].operator | string | Yes | Not specified | operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. |
spec.selector.matchExpressions[].values | array | No | Not specified | values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. |
spec.selector.matchExpressions[].values[] | string | No | Not specified | |
spec.selector.matchLabels | object | No | Not specified | matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed. |
spec.selector.matchLabels.* | string | No | Not specified |
status
Section titled “status”| Field | Type | Required | Schema default | Meaning and validation |
|---|---|---|---|---|
status | object | No | Not specified | ScalingGroupStatus defines the observed state of ScalingGroup resources that match the selector |
status.conditions | array | No | Not specified | Conditions is a list of conditions describing status of this group |
status.conditions[] | object | No | Not specified | Condition contains details for one aspect of the current state of this API Resource. |
status.conditions[].lastTransitionTime | string | Yes | Not specified | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
status.conditions[].message | string | Yes | Not specified | message is a human readable message indicating details about the transition. This may be an empty string. maxLength: 32768 |
status.conditions[].observedGeneration | integer | No | Not specified | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. minimum: 0 |
status.conditions[].reason | string | Yes | Not specified | reason contains a programmatic identifier indicating the reason for the condition’s last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. minLength: 1; maxLength: 1024; pattern: ”^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$” |
status.conditions[].status | string | Yes | Not specified | status of the condition, one of True, False, Unknown. enum: [“True”,“False”,“Unknown”] |
status.conditions[].type | string | Yes | Not specified | type of condition in CamelCase or in foo.example.com/CamelCase. maxLength: 316; pattern: ”^([a-z0-9]([-a-z0-9][a-z0-9])?(\.[a-z0-9]([-a-z0-9][a-z0-9])?)/)?(([A-Za-z0-9][-A-Za-z0-9_.])?[A-Za-z0-9])$” |
status.memberCount | integer | Yes | Not specified | MemberCount is the number of scalable objects that match the selector |
status.residualCapacity | integer | Yes | Not specified | ResidualCapacity is the number of replicas that can be allocated to the scalable objects |
status.scaledJobs | object | No | Not specified | ScaledJobs is a map of ScaledJob names matching the selector to their current status |
status.scaledJobs.* | object | No | Not specified | ScalableStatus defines the observed state of a scalable object (ScaledObject or ScaledJob) |
status.scaledJobs.*.cappedStatus | object | No | Not specified | CappedStatus contains information about the capped status of the scalable object |
status.scaledJobs.*.cappedStatus.replicaCountBasedOnMetrics | integer | Yes | Not specified | ReplicaCountBasedOnMetrics is the number of replicas that would be allocated if the object wasn’t capped |
status.scaledJobs.*.cappedStatus.replicaCountCapped | integer | Yes | Not specified | ReplicaCountCapped is the number of replicas that are actually allocated to the object and capped |
status.scaledJobs.*.hpaDesiredReplicaCount | integer | Yes | Not specified | HPADesiredReplicaCount is the desired number of replicas as reported by the HPA |
status.scaledObjects | object | No | Not specified | ScaledObjects is a map of ScaledObjects names matching the selector to their current status |
status.scaledObjects.* | object | No | Not specified | ScalableStatus defines the observed state of a scalable object (ScaledObject or ScaledJob) |
status.scaledObjects.*.cappedStatus | object | No | Not specified | CappedStatus contains information about the capped status of the scalable object |
status.scaledObjects.*.cappedStatus.replicaCountBasedOnMetrics | integer | Yes | Not specified | ReplicaCountBasedOnMetrics is the number of replicas that would be allocated if the object wasn’t capped |
status.scaledObjects.*.cappedStatus.replicaCountCapped | integer | Yes | Not specified | ReplicaCountCapped is the number of replicas that are actually allocated to the object and capped |
status.scaledObjects.*.hpaDesiredReplicaCount | integer | Yes | Not specified | HPADesiredReplicaCount is the desired number of replicas as reported by the HPA |
Inspect the installed contract
Section titled “Inspect the installed contract”kubectl get crd scalinggroups.keda.kedify.io -o yamlkubectl explain scalinggroup.spec --recursiveCompare served/storage versions and schema before applying configuration. Inspect the resource’s status and events after changing its owning source; schema acceptance alone does not prove successful reconciliation.
Use, verify and diagnose
Section titled “Use, verify and diagnose”Example observed status
Section titled “Example observed status”This is controller output, not an authored desired-state manifest.
status: memberCount: 3 # how many ScaledObjects belong to the group residualCapacity: 0 # capacity available to allocate for scale-out scaledObjects: # scaling status for individual members pear-store: hpaDesiredReplicaCount: 7 # how many replicas KEDA allows HPA to scale to cappedStatus: replicaCountBasedOnMetrics: 14 # what would be the replica count purely based on the metric replicaCountCapped: 7 # capped replica count pear-tunes: hpaDesiredReplicaCount: 3 cappedStatus: replicaCountBasedOnMetrics: 9 replicaCountCapped: 3 pear-cloud: hpaDesiredReplicaCount: 5 cappedStatus: replicaCountBasedOnMetrics: 6 replicaCountCapped: 5