GeezerVison is showing github.com — feat: Allow to set registry server rest/grpc mode in operator by ntkathole · Pull Request #5364 · feast-dev/feast
feat: Allow to set registry server rest/grpc mode in operator
#5364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement . We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Uh oh!
There was an error while loading. Please reload this page.
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e67fc0d
feat: Allow to set registry server rest/grpc mode in operator
ntkathole May 16, 2025
ef5d3c4
Apply suggestions from code review
ntkathole May 21, 2025
7bcb688
chore: rename RestAPIEnabled to RestAPI
ntkathole May 21, 2025
0cedd49
test: Added test to verify registry with REST API enabled
ntkathole May 21, 2025
38dc1f8
test: Extend test to assert rest-api container args
ntkathole May 21, 2025
f70ba9b
feat: Added both grpc and rest flags
ntkathole Jun 10, 2025
06f559c
feat: Support seperate ports and service for rest-api
ntkathole Jun 10, 2025
b991093
feat: Added check for remote registry of referenced FeatureStore
ntkathole Jun 10, 2025
4e06343
Apply suggestions from code review
ntkathole Jun 11, 2025
e28a578
fix: Created GetFeastRestServiceName method
ntkathole Jun 11, 2025
63af9da
fix: Refactor createRestService to reuse setService
ntkathole Jun 11, 2025
dc176ba
fix: Handle service and port on grpc disable
ntkathole Jun 11, 2025
9785b9d
feat: Added isRegistryRestEnabled and isRegistryGrpcEnabled methods
ntkathole Jun 12, 2025
f231f0d
fix: Fixed rest server port
ntkathole Jun 12, 2025
68480ab
fix: Changes as per comments
ntkathole Jun 13, 2025
d73e524
fix: Handle tls mount for rest server
ntkathole Jun 13, 2025
6ace5ec
test: Added tests for field validations
ntkathole Jun 13, 2025
8c649c2
test: Added tests for svc probe, container port and registry validations
ntkathole Jun 13, 2025
File filter
Filter by extension
.go
(14)
.md
(1)
.py
(1)
.yaml
(2)
All 4 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Hide whitespace
Diff view
Hide whitespace
There are no files selected for viewing
Original file line number
Diff line number
Diff line change
Expand Up
@@ -392,8 +392,8 @@ var ValidOnlineStoreDBStorePersistenceTypes = []string{
// LocalRegistryConfig configures the registry service
type LocalRegistryConfig struct {
// Creates a registry server container
Server *ServerConfigs `json:"server,omitempty"`
Persistence *RegistryPersistence `json:"persistence,omitempty"`
Server *RegistryServerConfigs `json:"server,omitempty"`
Persistence *RegistryPersistence `json:"persistence,omitempty"`
}
// RegistryPersistence configures the persistence settings for the registry service
Expand Down
Expand Up
@@ -502,6 +502,18 @@ type ServerConfigs struct {
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}
// RegistryServerConfigs creates a registry server for the feast service, with specified container configurations.
// +kubebuilder:validation:XValidation:rule="self.restAPI == true || self.grpc == true || !has(self.grpc)", message="At least one of restAPI or grpc must be true"
Comment thread
ntkathole marked this conversation as resolved.
Resolved
Uh oh!
There was an error while loading. Please reload this page.
type RegistryServerConfigs struct {
ServerConfigs `json:",inline"`
// Enable REST API registry server.
RestAPI *bool `json:"restAPI,omitempty"`
// Enable gRPC registry server. Defaults to true if unset.
GRPC *bool `json:"grpc,omitempty"`
}
// CronJobContainerConfigs k8s container settings for the CronJob
type CronJobContainerConfigs struct {
ContainerConfigs `json:",inline"`
Expand Down
Expand Up
@@ -613,6 +625,7 @@ type ServiceHostnames struct {
OfflineStore string `json:"offlineStore,omitempty"`
OnlineStore string `json:"onlineStore,omitempty"`
Registry string `json:"registry,omitempty"`
RegistryRest string `json:"registryRest,omitempty"`
UI string `json:"ui,omitempty"`
}
Expand Down
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Original file line number
Diff line number
Diff line change
Expand Up
@@ -1924,6 +1924,10 @@ spec:
x-kubernetes-map-type: atomic
type: object
type: array
grpc:
description: Enable gRPC registry server. Defaults
to true if unset.
type: boolean
image:
type: string
imagePullPolicy:
Expand Down
Expand Up
@@ -1987,6 +1991,9 @@ spec:
of compute resources required.
type: object
type: object
restAPI:
description: Enable REST API registry server.
type: boolean
tls:
description: TlsConfigs configures server TLS for
a feast service.
Expand Down
Expand Up
@@ -2071,6 +2078,9 @@ spec:
type: object
type: array
type: object
x-kubernetes-validations:
- message: At least one of restAPI or grpc must be true
rule: self.restAPI == true || self.grpc == true || !has(self.grpc)
type: object
remote:
description: RemoteRegistryConfig points to a remote feast
Expand Down
Expand Up
@@ -5902,6 +5912,10 @@ spec:
x-kubernetes-map-type: atomic
type: object
type: array
grpc:
description: Enable gRPC registry server. Defaults
to true if unset.
type: boolean
image:
type: string
imagePullPolicy:
Expand Down
Expand Up
@@ -5965,6 +5979,9 @@ spec:
amount of compute resources required.
type: object
type: object
restAPI:
description: Enable REST API registry server.
type: boolean
tls:
description: TlsConfigs configures server TLS
for a feast service.
Expand Down
Expand Up
@@ -6053,6 +6070,11 @@ spec:
type: object
type: array
type: object
x-kubernetes-validations:
- message: At least one of restAPI or grpc must be
true
rule: self.restAPI == true || self.grpc == true
|| !has(self.grpc)
type: object
remote:
description: RemoteRegistryConfig points to a remote feast
Expand Down
Expand Up
@@ -8051,6 +8073,8 @@ spec:
type: string
registry:
type: string
registryRest:
type: string
ui:
type: string
type: object
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -1932,6 +1932,10 @@ spec:
x-kubernetes-map-type: atomic
type: object
type: array
grpc:
description: Enable gRPC registry server. Defaults
to true if unset.
type: boolean
image:
type: string
imagePullPolicy:
Expand Down
Expand Up
@@ -1995,6 +1999,9 @@ spec:
of compute resources required.
type: object
type: object
restAPI:
description: Enable REST API registry server.
type: boolean
tls:
description: TlsConfigs configures server TLS for
a feast service.
Expand Down
Expand Up
@@ -2079,6 +2086,9 @@ spec:
type: object
type: array
type: object
x-kubernetes-validations:
- message: At least one of restAPI or grpc must be true
rule: self.restAPI == true || self.grpc == true || !has(self.grpc)
type: object
remote:
description: RemoteRegistryConfig points to a remote feast
Expand Down
Expand Up
@@ -5910,6 +5920,10 @@ spec:
x-kubernetes-map-type: atomic
type: object
type: array
grpc:
description: Enable gRPC registry server. Defaults
to true if unset.
type: boolean
image:
type: string
imagePullPolicy:
Expand Down
Expand Up
@@ -5973,6 +5987,9 @@ spec:
amount of compute resources required.
type: object
type: object
restAPI:
description: Enable REST API registry server.
type: boolean
tls:
description: TlsConfigs configures server TLS
for a feast service.
Expand Down
Expand Up
@@ -6061,6 +6078,11 @@ spec:
type: object
type: array
type: object
x-kubernetes-validations:
- message: At least one of restAPI or grpc must be
true
rule: self.restAPI == true || self.grpc == true
|| !has(self.grpc)
type: object
remote:
description: RemoteRegistryConfig points to a remote feast
Expand Down
Expand Up
@@ -8059,6 +8081,8 @@ spec:
type: string
registry:
type: string
registryRest:
type: string
ui:
type: string
type: object
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -36,6 +36,7 @@ ContainerConfigs k8s container settings for the server
_Appears in:_
- [CronJobContainerConfigs](#cronjobcontainerconfigs)
- [RegistryServerConfigs](#registryserverconfigs)
- [ServerConfigs](#serverconfigs)
| Field | Description |
Expand Down
Expand Up
@@ -76,6 +77,7 @@ DefaultCtrConfigs k8s container settings that are applied by default
_Appears in:_
- [ContainerConfigs](#containerconfigs)
- [CronJobContainerConfigs](#cronjobcontainerconfigs)
- [RegistryServerConfigs](#registryserverconfigs)
- [ServerConfigs](#serverconfigs)
| Field | Description |
Expand Down
Expand Up
@@ -405,7 +407,7 @@ _Appears in:_
| Field | Description |
| --- | --- |
| `server` _[ServerConfigs ](#serverconfigs )_ | Creates a registry server container |
| `server` _[RegistryServerConfigs ](#registryserverconfigs )_ | Creates a registry server container |
| `persistence` _[RegistryPersistence](#registrypersistence)_ | |
Expand Down
Expand Up
@@ -555,6 +557,7 @@ OptionalCtrConfigs k8s container settings that are optional
_Appears in:_
- [ContainerConfigs](#containerconfigs)
- [CronJobContainerConfigs](#cronjobcontainerconfigs)
- [RegistryServerConfigs](#registryserverconfigs)
- [ServerConfigs](#serverconfigs)
| Field | Description |
Expand Down
Expand Up
@@ -669,6 +672,33 @@ _Appears in:_
| `store` _[RegistryDBStorePersistence](#registrydbstorepersistence)_ | |
#### RegistryServerConfigs
RegistryServerConfigs creates a registry server for the feast service, with specified container configurations.
_Appears in:_
- [LocalRegistryConfig](#localregistryconfig)
| Field | Description |
| --- | --- |
| `image` _string_ | |
| `env` _[EnvVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#envvar-v1-core)_ | |
| `envFrom` _[EnvFromSource](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#envfromsource-v1-core)_ | |
| `imagePullPolicy` _[PullPolicy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#pullpolicy-v1-core)_ | |
| `resources` _[ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core)_ | |
| `tls` _[TlsConfigs](#tlsconfigs)_ | |
| `logLevel` _string_ | LogLevel sets the logging level for the server
Allowed values: "debug", "info", "warning", "error", "critical". |
| `volumeMounts` _[VolumeMount](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#volumemount-v1-core) array_ | VolumeMounts defines the list of volumes that should be mounted into the feast container.
This allows attaching persistent storage, config files, secrets, or other resources
required by the Feast components. Ensure that each volume mount has a corresponding
volume definition in the Volumes field. |
| `restAPI` _boolean_ | Enable REST API registry server. |
| `grpc` _boolean_ | Enable gRPC registry server. Defaults to true if unset. |
#### RemoteRegistryConfig
Expand Down
Expand Up
@@ -709,9 +739,9 @@ ServerConfigs creates a server for the feast service, with specified container c
_Appears in:_
- [FeatureStoreServices](#featurestoreservices)
- [LocalRegistryConfig](#localregistryconfig)
- [OfflineStore](#offlinestore)
- [OnlineStore](#onlinestore)
- [RegistryServerConfigs](#registryserverconfigs)
| Field | Description |
| --- | --- |
Expand Down
Expand Up
@@ -743,6 +773,7 @@ _Appears in:_
| `offlineStore` _string_ | |
| `onlineStore` _string_ | |
| `registry` _string_ | |
| `registryRest` _string_ | |
| `ui` _string_ | |
Expand All
@@ -753,6 +784,7 @@ _Appears in:_
TlsConfigs configures server TLS for a feast service. in an openshift cluster, this is configured by default using service serving certificates.
_Appears in:_
- [RegistryServerConfigs](#registryserverconfigs)
- [ServerConfigs](#serverconfigs)
| Field | Description |
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -61,8 +61,10 @@ var _ = Describe("FeatureStore Controller - Feast service LogLevel", func() {
Services: &feastdevv1alpha1.FeatureStoreServices{
Registry: &feastdevv1alpha1.Registry{
Local: &feastdevv1alpha1.LocalRegistryConfig{
Server: &feastdevv1alpha1.ServerConfigs{
LogLevel: strPtr("error"),
Server: &feastdevv1alpha1.RegistryServerConfigs{
ServerConfigs: feastdevv1alpha1.ServerConfigs{
LogLevel: strPtr("error"),
},
},
},
},
Expand Down
Expand Up
@@ -196,7 +198,9 @@ var _ = Describe("FeatureStore Controller - Feast service LogLevel", func() {
resource.Spec.Services = &feastdevv1alpha1.FeatureStoreServices{
Registry: &feastdevv1alpha1.Registry{
Local: &feastdevv1alpha1.LocalRegistryConfig{
Server: &feastdevv1alpha1.ServerConfigs{},
Server: &feastdevv1alpha1.RegistryServerConfigs{
ServerConfigs: feastdevv1alpha1.ServerConfigs{},
},
},
},
OfflineStore: &feastdevv1alpha1.OfflineStore{},
Expand Down
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.