Skip to content

Commit 5e8dd18

Browse files
committed
fix: Address comments
Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
1 parent e805f14 commit 5e8dd18

File tree

13 files changed

+102
-108
lines changed

13 files changed

+102
-108
lines changed

docs/how-to-guides/scaling-feast.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ spec:
8686
target:
8787
type: Utilization
8888
averageUtilization: 70
89-
pdb:
89+
podDisruptionBudgets:
9090
maxUnavailable: 1
9191
onlineStore:
9292
persistence:
@@ -173,10 +173,10 @@ spec:
173173
spec:
174174
replicas: 3
175175
services:
176-
pdb:
176+
podDisruptionBudgets:
177177
maxUnavailable: 1 # at most 1 pod unavailable during disruptions
178178
# -- OR --
179-
# pdb:
179+
# podDisruptionBudgets:
180180
# minAvailable: "50%" # at least 50% of pods must remain available
181181
# ...
182182
```

infra/feast-operator/api/v1/featurestore_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,10 @@ type FeatureStoreServices struct {
315315
// Scaling configures horizontal scaling for the FeatureStore deployment (e.g. HPA autoscaling).
316316
// For static replicas, use spec.replicas instead.
317317
Scaling *ScalingConfig `json:"scaling,omitempty"`
318-
// PDB configures a PodDisruptionBudget for the FeatureStore deployment.
318+
// PodDisruptionBudgets configures a PodDisruptionBudget for the FeatureStore deployment.
319319
// Only created when scaling is enabled (replicas > 1 or autoscaling).
320320
// +optional
321-
PDB *PDBConfig `json:"pdb,omitempty"`
321+
PodDisruptionBudgets *PDBConfig `json:"podDisruptionBudgets,omitempty"`
322322
// TopologySpreadConstraints defines how pods are spread across topology domains.
323323
// When scaling is enabled and this is not set, the operator auto-injects a soft
324324
// zone-spread constraint (whenUnsatisfiable: ScheduleAnyway).

infra/feast-operator/api/v1/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infra/feast-operator/config/crd/bases/feast.dev_featurestores.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2508,9 +2508,9 @@ spec:
25082508
type: object
25092509
type: object
25102510
type: object
2511-
pdb:
2512-
description: PDB configures a PodDisruptionBudget for the FeatureStore
2513-
deployment.
2511+
podDisruptionBudgets:
2512+
description: PodDisruptionBudgets configures a PodDisruptionBudget
2513+
for the FeatureStore deployment.
25142514
properties:
25152515
maxUnavailable:
25162516
anyOf:
@@ -8232,9 +8232,9 @@ spec:
82328232
type: object
82338233
type: object
82348234
type: object
8235-
pdb:
8236-
description: PDB configures a PodDisruptionBudget for the
8237-
FeatureStore deployment.
8235+
podDisruptionBudgets:
8236+
description: PodDisruptionBudgets configures a PodDisruptionBudget
8237+
for the FeatureStore deployment.
82388238
properties:
82398239
maxUnavailable:
82408240
anyOf:

infra/feast-operator/config/samples/v1_featurestore_scaling_hpa.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ spec:
5050
target:
5151
type: Utilization
5252
averageUtilization: 70
53-
pdb:
53+
podDisruptionBudgets:
5454
maxUnavailable: 1
5555
onlineStore:
5656
persistence:

infra/feast-operator/config/samples/v1_featurestore_scaling_static.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ spec:
4646
feastProject: my_project
4747
replicas: 3
4848
services:
49-
pdb:
49+
podDisruptionBudgets:
5050
maxUnavailable: 1
5151
# Uncomment to enforce strict spreading across AWS availability zones:
5252
# topologySpreadConstraints:

infra/feast-operator/dist/install.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2516,9 +2516,9 @@ spec:
25162516
type: object
25172517
type: object
25182518
type: object
2519-
pdb:
2520-
description: PDB configures a PodDisruptionBudget for the FeatureStore
2521-
deployment.
2519+
podDisruptionBudgets:
2520+
description: PodDisruptionBudgets configures a PodDisruptionBudget
2521+
for the FeatureStore deployment.
25222522
properties:
25232523
maxUnavailable:
25242524
anyOf:
@@ -8240,9 +8240,9 @@ spec:
82408240
type: object
82418241
type: object
82428242
type: object
8243-
pdb:
8244-
description: PDB configures a PodDisruptionBudget for the
8245-
FeatureStore deployment.
8243+
podDisruptionBudgets:
8244+
description: PodDisruptionBudgets configures a PodDisruptionBudget
8245+
for the FeatureStore deployment.
82468246
properties:
82478247
maxUnavailable:
82488248
anyOf:

infra/feast-operator/docs/api/markdown/ref.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ _Appears in:_
243243
| `volumes` _[Volume](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#volume-v1-core) array_ | Volumes specifies the volumes to mount in the FeatureStore deployment. A corresponding `VolumeMount` should be added to whichever feast service(s) require access to said volume(s). |
244244
| `scaling` _[ScalingConfig](#scalingconfig)_ | Scaling configures horizontal scaling for the FeatureStore deployment (e.g. HPA autoscaling).
245245
For static replicas, use spec.replicas instead. |
246-
| `pdb` _[PDBConfig](#pdbconfig)_ | PDB configures a PodDisruptionBudget for the FeatureStore deployment.
246+
| `podDisruptionBudgets` _[PDBConfig](#pdbconfig)_ | PodDisruptionBudgets configures a PodDisruptionBudget for the FeatureStore deployment.
247247
Only created when scaling is enabled (replicas > 1 or autoscaling). |
248248
| `topologySpreadConstraints` _[TopologySpreadConstraint](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#topologyspreadconstraint-v1-core) array_ | TopologySpreadConstraints defines how pods are spread across topology domains.
249249
When scaling is enabled and this is not set, the operator auto-injects a soft

infra/feast-operator/internal/controller/services/scaling.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ func convertBehavior(behavior *autoscalingv2.HorizontalPodAutoscalerBehavior) *h
181181
return result
182182
}
183183

184-
// createOrDeletePDB reconciles the PodDisruptionBudget for the FeatureStore
185-
// deployment using Server-Side Apply. If PDB is not configured or scaling is
186-
// not enabled, any existing PDB is deleted.
187-
func (feast *FeastServices) createOrDeletePDB() error {
184+
// applyOrDeletePDB reconciles the PodDisruptionBudget for the FeatureStore
185+
// deployment using Server-Side Apply. If PodDisruptionBudgets is not configured
186+
// or scaling is not enabled, any existing PDB is deleted.
187+
func (feast *FeastServices) applyOrDeletePDB() error {
188188
cr := feast.Handler.FeatureStore
189189
services := cr.Status.Applied.Services
190190

191-
if services == nil || services.PDB == nil || !isScalingEnabled(cr) {
191+
if services == nil || services.PodDisruptionBudgets == nil || !isScalingEnabled(cr) {
192192
pdb := &policyv1.PodDisruptionBudget{ObjectMeta: feast.GetObjectMeta()}
193193
pdb.SetGroupVersionKind(policyv1.SchemeGroupVersion.WithKind("PodDisruptionBudget"))
194194
return feast.Handler.DeleteOwnedFeastObj(pdb)
@@ -216,7 +216,7 @@ func (feast *FeastServices) createOrDeletePDB() error {
216216
// configuration for Server-Side Apply.
217217
func (feast *FeastServices) buildPDBApplyConfig() *pdbac.PodDisruptionBudgetApplyConfiguration {
218218
cr := feast.Handler.FeatureStore
219-
pdbConfig := cr.Status.Applied.Services.PDB
219+
pdbConfig := cr.Status.Applied.Services.PodDisruptionBudgets
220220
objMeta := feast.GetObjectMeta()
221221

222222
pdb := pdbac.PodDisruptionBudget(objMeta.Name, objMeta.Namespace).

0 commit comments

Comments
 (0)