Skip to content

Commit ab39cdb

Browse files
committed
feat(redis): Add retrieve_online_documents_v2 support with Redis vector sets
Signed-off-by: Abhishek Shinde <norizzabhii@gmail.com>
2 parents b660dc9 + 7d1ef73 commit ab39cdb

20 files changed

Lines changed: 962 additions & 76 deletions

.secrets.baseline

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@
957957
"filename": "infra/feast-operator/api/v1/featurestore_types.go",
958958
"hashed_secret": "44e17306b837162269a410204daaa5ecee4ec22c",
959959
"is_verified": false,
960-
"line_number": 895
960+
"line_number": 906
961961
}
962962
],
963963
"infra/feast-operator/api/v1/zz_generated.deepcopy.go": [
@@ -966,21 +966,21 @@
966966
"filename": "infra/feast-operator/api/v1/zz_generated.deepcopy.go",
967967
"hashed_secret": "f914fc9324de1bec1ad13dec94a8ea2ddb41fc87",
968968
"is_verified": false,
969-
"line_number": 810
969+
"line_number": 817
970970
},
971971
{
972972
"type": "Secret Keyword",
973973
"filename": "infra/feast-operator/api/v1/zz_generated.deepcopy.go",
974974
"hashed_secret": "44e17306b837162269a410204daaa5ecee4ec22c",
975975
"is_verified": false,
976-
"line_number": 871
976+
"line_number": 878
977977
},
978978
{
979979
"type": "Secret Keyword",
980980
"filename": "infra/feast-operator/api/v1/zz_generated.deepcopy.go",
981981
"hashed_secret": "c2028031c154bbe86fd69bef740855c74b927dcf",
982982
"is_verified": false,
983-
"line_number": 1521
983+
"line_number": 1528
984984
}
985985
],
986986
"infra/feast-operator/api/v1alpha1/featurestore_types.go": [
@@ -1555,5 +1555,5 @@
15551555
}
15561556
]
15571557
},
1558-
"generated_at": "2026-05-29T12:38:16Z"
1558+
"generated_at": "2026-06-09T15:21:51Z"
15591559
}

docs/how-to-guides/feast-operator/03-serving-and-observability.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,78 @@ services:
144144
subPath: ca.crt
145145
```
146146

147+
### Dynamic Resource Allocation (DRA)
148+
149+
Kubernetes [Dynamic Resource Allocation](https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/)
150+
lets pods request hardware resources (GPUs, FPGAs, etc.) through a claim-based model.
151+
The FeatureStore CR exposes a pod-level `resourceClaims` field that defines which
152+
`ResourceClaim` objects must be allocated before the pod starts. Individual service
153+
containers then reference those claims by name to consume the allocated resources.
154+
155+
**Step 1 — Create a `ResourceClaim`** (or use an existing one):
156+
157+
```yaml
158+
apiVersion: resource.k8s.io/v1
159+
kind: ResourceClaim
160+
metadata:
161+
name: my-gpu-claim
162+
spec:
163+
devices:
164+
requests:
165+
- name: gpu
166+
exactly:
167+
deviceClassName: gpu.example.com
168+
```
169+
170+
**Step 2 — Reference the claim in the FeatureStore CR:**
171+
172+
```yaml
173+
services:
174+
# Pod-level: define claims available to any container in the pod
175+
resourceClaims:
176+
- name: gpu
177+
resourceClaimName: my-gpu-claim
178+
179+
# Container-level: the online store consumes the GPU claim
180+
onlineStore:
181+
server:
182+
resources:
183+
claims:
184+
- name: gpu
185+
```
186+
187+
Multiple claims can be defined at the pod level and selectively consumed by different
188+
service containers:
189+
190+
```yaml
191+
services:
192+
resourceClaims:
193+
- name: gpu-claim
194+
resourceClaimName: my-gpu
195+
- name: fpga-claim
196+
resourceClaimName: my-fpga
197+
198+
onlineStore:
199+
server:
200+
resources:
201+
claims:
202+
- name: gpu-claim # online store uses GPU
203+
204+
offlineStore:
205+
server:
206+
resources:
207+
claims:
208+
- name: fpga-claim # offline store uses FPGA
209+
210+
registry:
211+
local:
212+
server: {} # registry uses neither
213+
```
214+
215+
> **Note**: DRA requires a DRA driver to be installed on the cluster and the appropriate
216+
> `DeviceClass` and `ResourceSlice` objects to be available. On OpenShift, this is
217+
> configured at the cluster level for GPU and accelerator resources.
218+
147219
---
148220

149221
## TLS

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,17 @@ type FeatureStoreServices struct {
400400
// pod anti-affinity rule to prefer spreading pods across nodes.
401401
// +optional
402402
Affinity *corev1.Affinity `json:"affinity,omitempty"`
403+
// ResourceClaims defines which ResourceClaims must be allocated
404+
// and reserved before the Pod is allowed to start. The resources
405+
// will be made available to those containers which consume them
406+
// by name.
407+
//
408+
// +patchMergeKey=name
409+
// +patchStrategy=merge,retainKeys
410+
// +listType=map
411+
// +listMapKey=name
412+
// +optional
413+
ResourceClaims []corev1.PodResourceClaim `json:"resourceClaims,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"`
403414
}
404415

405416
// ScalingConfig configures horizontal scaling for the FeatureStore deployment.

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

Lines changed: 7 additions & 0 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: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3353,6 +3353,37 @@ spec:
33533353
x-kubernetes-validations:
33543354
- message: One selection required.
33553355
rule: '[has(self.local), has(self.remote)].exists_one(c, c)'
3356+
resourceClaims:
3357+
description: |-
3358+
ResourceClaims defines which ResourceClaims must be allocated
3359+
and reserved before the Pod is allowed to start.
3360+
items:
3361+
description: |-
3362+
PodResourceClaim references exactly one ResourceClaim, either directly
3363+
or by naming a ResourceClaimTemplate which is...
3364+
properties:
3365+
name:
3366+
description: |-
3367+
Name uniquely identifies this resource claim inside the pod.
3368+
This must be a DNS_LABEL.
3369+
type: string
3370+
resourceClaimName:
3371+
description: |-
3372+
ResourceClaimName is the name of a ResourceClaim object in the same
3373+
namespace as this pod.
3374+
type: string
3375+
resourceClaimTemplateName:
3376+
description: |-
3377+
ResourceClaimTemplateName is the name of a ResourceClaimTemplate
3378+
object in the same namespace as this pod.
3379+
type: string
3380+
required:
3381+
- name
3382+
type: object
3383+
type: array
3384+
x-kubernetes-list-map-keys:
3385+
- name
3386+
x-kubernetes-list-type: map
33563387
runFeastApplyOnInit:
33573388
description: Runs feast apply on pod start to populate the registry.
33583389
Defaults to true. Ignored when DisableInitContainers is true.
@@ -9372,6 +9403,37 @@ spec:
93729403
- message: One selection required.
93739404
rule: '[has(self.local), has(self.remote)].exists_one(c,
93749405
c)'
9406+
resourceClaims:
9407+
description: |-
9408+
ResourceClaims defines which ResourceClaims must be allocated
9409+
and reserved before the Pod is allowed to start.
9410+
items:
9411+
description: |-
9412+
PodResourceClaim references exactly one ResourceClaim, either directly
9413+
or by naming a ResourceClaimTemplate which is...
9414+
properties:
9415+
name:
9416+
description: |-
9417+
Name uniquely identifies this resource claim inside the pod.
9418+
This must be a DNS_LABEL.
9419+
type: string
9420+
resourceClaimName:
9421+
description: |-
9422+
ResourceClaimName is the name of a ResourceClaim object in the same
9423+
namespace as this pod.
9424+
type: string
9425+
resourceClaimTemplateName:
9426+
description: |-
9427+
ResourceClaimTemplateName is the name of a ResourceClaimTemplate
9428+
object in the same namespace as this pod.
9429+
type: string
9430+
required:
9431+
- name
9432+
type: object
9433+
type: array
9434+
x-kubernetes-list-map-keys:
9435+
- name
9436+
x-kubernetes-list-type: map
93759437
runFeastApplyOnInit:
93769438
description: Runs feast apply on pod start to populate the
93779439
registry. Defaults to true. Ignored when DisableInitContainers

infra/feast-operator/dist/install.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3361,6 +3361,37 @@ spec:
33613361
x-kubernetes-validations:
33623362
- message: One selection required.
33633363
rule: '[has(self.local), has(self.remote)].exists_one(c, c)'
3364+
resourceClaims:
3365+
description: |-
3366+
ResourceClaims defines which ResourceClaims must be allocated
3367+
and reserved before the Pod is allowed to start.
3368+
items:
3369+
description: |-
3370+
PodResourceClaim references exactly one ResourceClaim, either directly
3371+
or by naming a ResourceClaimTemplate which is...
3372+
properties:
3373+
name:
3374+
description: |-
3375+
Name uniquely identifies this resource claim inside the pod.
3376+
This must be a DNS_LABEL.
3377+
type: string
3378+
resourceClaimName:
3379+
description: |-
3380+
ResourceClaimName is the name of a ResourceClaim object in the same
3381+
namespace as this pod.
3382+
type: string
3383+
resourceClaimTemplateName:
3384+
description: |-
3385+
ResourceClaimTemplateName is the name of a ResourceClaimTemplate
3386+
object in the same namespace as this pod.
3387+
type: string
3388+
required:
3389+
- name
3390+
type: object
3391+
type: array
3392+
x-kubernetes-list-map-keys:
3393+
- name
3394+
x-kubernetes-list-type: map
33643395
runFeastApplyOnInit:
33653396
description: Runs feast apply on pod start to populate the registry.
33663397
Defaults to true. Ignored when DisableInitContainers is true.
@@ -9380,6 +9411,37 @@ spec:
93809411
- message: One selection required.
93819412
rule: '[has(self.local), has(self.remote)].exists_one(c,
93829413
c)'
9414+
resourceClaims:
9415+
description: |-
9416+
ResourceClaims defines which ResourceClaims must be allocated
9417+
and reserved before the Pod is allowed to start.
9418+
items:
9419+
description: |-
9420+
PodResourceClaim references exactly one ResourceClaim, either directly
9421+
or by naming a ResourceClaimTemplate which is...
9422+
properties:
9423+
name:
9424+
description: |-
9425+
Name uniquely identifies this resource claim inside the pod.
9426+
This must be a DNS_LABEL.
9427+
type: string
9428+
resourceClaimName:
9429+
description: |-
9430+
ResourceClaimName is the name of a ResourceClaim object in the same
9431+
namespace as this pod.
9432+
type: string
9433+
resourceClaimTemplateName:
9434+
description: |-
9435+
ResourceClaimTemplateName is the name of a ResourceClaimTemplate
9436+
object in the same namespace as this pod.
9437+
type: string
9438+
required:
9439+
- name
9440+
type: object
9441+
type: array
9442+
x-kubernetes-list-map-keys:
9443+
- name
9444+
x-kubernetes-list-type: map
93839445
runFeastApplyOnInit:
93849446
description: Runs feast apply on pod start to populate the
93859447
registry. Defaults to true. Ignored when DisableInitContainers

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ Set to an empty array to disable auto-injection. |
269269
| `affinity` _[Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#affinity-v1-core)_ | Affinity defines the pod scheduling constraints for the FeatureStore deployment.
270270
When scaling is enabled and this is not set, the operator auto-injects a soft
271271
pod anti-affinity rule to prefer spreading pods across nodes. |
272+
| `resourceClaims` _[PodResourceClaim](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#podresourceclaim-v1-core) array_ | ResourceClaims defines which ResourceClaims must be allocated
273+
and reserved before the Pod is allowed to start. The resources
274+
will be made available to those containers which consume them
275+
by name. |
272276

273277

274278
#### FeatureStoreSpec

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ func (feast *FeastServices) setPod(podSpec *corev1.PodSpec) error {
445445
feast.applyNodeSelector(podSpec)
446446
feast.applyTopologySpread(podSpec)
447447
feast.applyAffinity(podSpec)
448+
feast.applyResourceClaims(podSpec)
448449

449450
return nil
450451
}
@@ -1055,6 +1056,13 @@ func (feast *FeastServices) applyAffinity(podSpec *corev1.PodSpec) {
10551056
}
10561057
}
10571058

1059+
func (feast *FeastServices) applyResourceClaims(podSpec *corev1.PodSpec) {
1060+
services := feast.Handler.FeatureStore.Status.Applied.Services
1061+
if services != nil && len(services.ResourceClaims) > 0 {
1062+
podSpec.ResourceClaims = services.ResourceClaims
1063+
}
1064+
}
1065+
10581066
// mergeNodeSelectors merges existing and operator node selectors
10591067
// Existing selectors are preserved, operator selectors can override existing keys
10601068
func (feast *FeastServices) mergeNodeSelectors(existing, operator map[string]string) map[string]string {

0 commit comments

Comments
 (0)