Skip to content

Commit 6a53852

Browse files
committed
Update CRD preview
1 parent a8e7321 commit 6a53852

1 file changed

Lines changed: 62 additions & 20 deletions

File tree

crates/stackable-operator/crds/Scaler.yaml

Lines changed: 62 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,38 +65,80 @@ spec:
6565
type: string
6666
state:
6767
description: The current state of the scaler state machine.
68+
oneOf:
69+
- required:
70+
- idle
71+
- required:
72+
- preScaling
73+
- required:
74+
- scaling
75+
- required:
76+
- postScaling
77+
- required:
78+
- failed
6879
properties:
69-
details:
80+
failed:
81+
description: |-
82+
A hook returned an error.
83+
84+
The scaler stays here until the user applies the [`Annotation::autoscaling_retry`] annotation
85+
to trigger a reset to [`ScalerState::Idle`].
7086
properties:
7187
failedIn:
72-
description: In which state the scaling operation failed.
88+
description: Which stage produced the error.
7389
enum:
74-
- preScaling
75-
- scaling
76-
- postScaling
90+
- PreScaling
91+
- Scaling
92+
- PostScaling
7793
type: string
78-
previous_replicas:
79-
maximum: 65535.0
80-
minimum: 0.0
81-
type: uint16
8294
reason:
95+
description: Human-readable error message from the hook.
8396
type: string
97+
required:
98+
- failedIn
99+
- reason
100+
type: object
101+
idle:
102+
description: No scaling operation is in progress.
103+
type: object
104+
postScaling:
105+
description: |-
106+
Running the `post_scale` hook (e.g. cluster rebalance).
107+
108+
This stage additionally tracks the previous replica count to be able derive the direction
109+
of the scaling operation.
110+
properties:
111+
previousReplicas:
112+
format: uint16
113+
maximum: 65535.0
114+
minimum: 0.0
115+
type: integer
116+
required:
117+
- previousReplicas
118+
type: object
119+
preScaling:
120+
description: Running the `pre_scale` hook (e.g. data offload).
121+
type: object
122+
scaling:
123+
description: |-
124+
Waiting for the StatefulSet to converge to the new replica count.
125+
126+
This stage additionally tracks the previous replica count to be able derive the direction
127+
of the scaling operation.
128+
properties:
129+
previousReplicas:
130+
format: uint16
131+
maximum: 65535.0
132+
minimum: 0.0
133+
type: integer
134+
required:
135+
- previousReplicas
84136
type: object
85-
state:
86-
enum:
87-
- idle
88-
- preScaling
89-
- scaling
90-
- postScaling
91-
- failed
92-
type: string
93-
required:
94-
- state
95137
type: object
96138
required:
139+
- lastTransitionTime
97140
- replicas
98141
- state
99-
- lastTransitionTime
100142
type: object
101143
required:
102144
- spec

0 commit comments

Comments
 (0)