Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: Address comments
Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
  • Loading branch information
ntkathole committed Mar 4, 2026
commit fd641fb28ac1ae4d1407542e401374edf02756bf
2 changes: 1 addition & 1 deletion .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@
"filename": "infra/feast-operator/api/v1/featurestore_types.go",
"hashed_secret": "44e17306b837162269a410204daaa5ecee4ec22c",
"is_verified": false,
"line_number": 726
"line_number": 725
}
],
"infra/feast-operator/api/v1/zz_generated.deepcopy.go": [
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to-guides/scaling-feast.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
target:
type: Utilization
averageUtilization: 70
pdb:
podDisruptionBudgets:
maxUnavailable: 1
onlineStore:
persistence:
Expand Down Expand Up @@ -173,10 +173,10 @@ spec:
spec:
replicas: 3
services:
pdb:
podDisruptionBudgets:
maxUnavailable: 1 # at most 1 pod unavailable during disruptions
# -- OR --
# pdb:
# podDisruptionBudgets:
# minAvailable: "50%" # at least 50% of pods must remain available
# ...
```
Expand Down
4 changes: 2 additions & 2 deletions infra/feast-operator/api/v1/featurestore_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,10 @@ type FeatureStoreServices struct {
// Scaling configures horizontal scaling for the FeatureStore deployment (e.g. HPA autoscaling).
// For static replicas, use spec.replicas instead.
Scaling *ScalingConfig `json:"scaling,omitempty"`
// PDB configures a PodDisruptionBudget for the FeatureStore deployment.
// PodDisruptionBudgets configures a PodDisruptionBudget for the FeatureStore deployment.
// Only created when scaling is enabled (replicas > 1 or autoscaling).
// +optional
PDB *PDBConfig `json:"pdb,omitempty"`
PodDisruptionBudgets *PDBConfig `json:"podDisruptionBudgets,omitempty"`
// TopologySpreadConstraints defines how pods are spread across topology domains.
// When scaling is enabled and this is not set, the operator auto-injects a soft
// zone-spread constraint (whenUnsatisfiable: ScheduleAnyway).
Expand Down
4 changes: 2 additions & 2 deletions infra/feast-operator/api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2506,9 +2506,9 @@ spec:
type: object
type: object
type: object
pdb:
description: PDB configures a PodDisruptionBudget for the FeatureStore
deployment.
podDisruptionBudgets:
description: PodDisruptionBudgets configures a PodDisruptionBudget
for the FeatureStore deployment.
properties:
maxUnavailable:
anyOf:
Expand Down Expand Up @@ -8228,9 +8228,9 @@ spec:
type: object
type: object
type: object
pdb:
description: PDB configures a PodDisruptionBudget for the
FeatureStore deployment.
podDisruptionBudgets:
description: PodDisruptionBudgets configures a PodDisruptionBudget
for the FeatureStore deployment.
properties:
maxUnavailable:
anyOf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
target:
type: Utilization
averageUtilization: 70
pdb:
podDisruptionBudgets:
maxUnavailable: 1
onlineStore:
persistence:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
feastProject: my_project
replicas: 3
services:
pdb:
podDisruptionBudgets:
maxUnavailable: 1
# Uncomment to enforce strict spreading across AWS availability zones:
# topologySpreadConstraints:
Expand Down
12 changes: 6 additions & 6 deletions infra/feast-operator/dist/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2514,9 +2514,9 @@ spec:
type: object
type: object
type: object
pdb:
description: PDB configures a PodDisruptionBudget for the FeatureStore
deployment.
podDisruptionBudgets:
description: PodDisruptionBudgets configures a PodDisruptionBudget
for the FeatureStore deployment.
properties:
maxUnavailable:
anyOf:
Expand Down Expand Up @@ -8236,9 +8236,9 @@ spec:
type: object
type: object
type: object
pdb:
description: PDB configures a PodDisruptionBudget for the
FeatureStore deployment.
podDisruptionBudgets:
description: PodDisruptionBudgets configures a PodDisruptionBudget
for the FeatureStore deployment.
properties:
maxUnavailable:
anyOf:
Expand Down
2 changes: 1 addition & 1 deletion infra/feast-operator/docs/api/markdown/ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ _Appears in:_
| `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). |
| `scaling` _[ScalingConfig](#scalingconfig)_ | Scaling configures horizontal scaling for the FeatureStore deployment (e.g. HPA autoscaling).
For static replicas, use spec.replicas instead. |
| `pdb` _[PDBConfig](#pdbconfig)_ | PDB configures a PodDisruptionBudget for the FeatureStore deployment.
| `podDisruptionBudgets` _[PDBConfig](#pdbconfig)_ | PodDisruptionBudgets configures a PodDisruptionBudget for the FeatureStore deployment.
Only created when scaling is enabled (replicas > 1 or autoscaling). |
| `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.
When scaling is enabled and this is not set, the operator auto-injects a soft
Expand Down
12 changes: 6 additions & 6 deletions infra/feast-operator/internal/controller/services/scaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ func convertBehavior(behavior *autoscalingv2.HorizontalPodAutoscalerBehavior) *h
return result
}

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

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

pdb := pdbac.PodDisruptionBudget(objMeta.Name, objMeta.Namespace).
Expand Down
Loading
Loading