Skip to content

Commit b16fb40

Browse files
authored
feat: Operator - make server container creation explicit in the CR (#5024)
add server option Signed-off-by: Tommy Hughes <[email protected]>
1 parent 5a17b68 commit b16fb40

29 files changed

+1929
-1883
lines changed

examples/operator-quickstart/feast.yaml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,27 @@ spec:
2525
persistence:
2626
file:
2727
type: duckdb
28-
envFrom:
29-
- secretRef:
30-
name: postgres-secret
3128
onlineStore:
3229
persistence:
3330
store:
3431
type: redis
3532
secretRef:
3633
name: feast-data-stores
37-
envFrom:
38-
- secretRef:
39-
name: postgres-secret
4034
registry:
4135
local:
4236
persistence:
4337
store:
4438
type: sql
4539
secretRef:
4640
name: feast-data-stores
47-
envFrom:
48-
- secretRef:
49-
name: postgres-secret
50-
env:
51-
- name: MPLCONFIGDIR
52-
value: /tmp
53-
resources:
54-
requests:
55-
cpu: 150m
56-
memory: 128Mi
41+
server:
42+
envFrom:
43+
- secretRef:
44+
name: postgres-secret
45+
env:
46+
- name: MPLCONFIGDIR
47+
value: /tmp
48+
resources:
49+
requests:
50+
cpu: 150m
51+
memory: 128Mi

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

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ type FeatureStoreSpec struct {
7373

7474
// FeatureStoreServices defines the desired feast services. An ephemeral registry is deployed by default.
7575
type FeatureStoreServices struct {
76-
OfflineStore *OfflineStore `json:"offlineStore,omitempty"`
77-
OnlineStore *OnlineStore `json:"onlineStore,omitempty"`
78-
Registry *Registry `json:"registry,omitempty"`
76+
OfflineStore *OfflineStore `json:"offlineStore,omitempty"`
77+
OnlineStore *OnlineStore `json:"onlineStore,omitempty"`
78+
Registry *Registry `json:"registry,omitempty"`
79+
// Creates a UI server container
7980
UI *ServerConfigs `json:"ui,omitempty"`
8081
DeploymentStrategy *appsv1.DeploymentStrategy `json:"deploymentStrategy,omitempty"`
8182
// Disable the 'feast repo initialization' initContainer
@@ -84,8 +85,9 @@ type FeatureStoreServices struct {
8485

8586
// OfflineStore configures the deployed offline store service
8687
type OfflineStore struct {
87-
ServerConfigs `json:",inline"`
88-
Persistence *OfflineStorePersistence `json:"persistence,omitempty"`
88+
// Creates a remote offline server container
89+
Server *ServerConfigs `json:"server,omitempty"`
90+
Persistence *OfflineStorePersistence `json:"persistence,omitempty"`
8991
}
9092

9193
// OfflineStorePersistence configures the persistence settings for the offline store service
@@ -132,8 +134,9 @@ var ValidOfflineStoreDBStorePersistenceTypes = []string{
132134

133135
// OnlineStore configures the deployed online store service
134136
type OnlineStore struct {
135-
ServerConfigs `json:",inline"`
136-
Persistence *OnlineStorePersistence `json:"persistence,omitempty"`
137+
// Creates a feature server container
138+
Server *ServerConfigs `json:"server,omitempty"`
139+
Persistence *OnlineStorePersistence `json:"persistence,omitempty"`
137140
}
138141

139142
// OnlineStorePersistence configures the persistence settings for the online store service
@@ -183,8 +186,9 @@ var ValidOnlineStoreDBStorePersistenceTypes = []string{
183186

184187
// LocalRegistryConfig configures the deployed registry service
185188
type LocalRegistryConfig struct {
186-
ServerConfigs `json:",inline"`
187-
Persistence *RegistryPersistence `json:"persistence,omitempty"`
189+
// Creates a registry server container
190+
Server *ServerConfigs `json:"server,omitempty"`
191+
Persistence *RegistryPersistence `json:"persistence,omitempty"`
188192
}
189193

190194
// RegistryPersistence configures the persistence settings for the registry service
@@ -277,14 +281,14 @@ type FeatureStoreRef struct {
277281
Namespace string `json:"namespace,omitempty"`
278282
}
279283

280-
// ServerConfigs server-related configurations for a feast service
284+
// ServerConfigs creates a server for the feast service, with specified container configurations.
281285
type ServerConfigs struct {
282286
ContainerConfigs `json:",inline"`
283287
TLS *TlsConfigs `json:"tls,omitempty"`
284288
// LogLevel sets the logging level for the server
285289
// Allowed values: "debug", "info", "warning", "error", "critical".
286290
// +kubebuilder:validation:Enum=debug;info;warning;error;critical
287-
LogLevel string `json:"logLevel,omitempty"`
291+
LogLevel *string `json:"logLevel,omitempty"`
288292
}
289293

290294
// ContainerConfigs k8s container settings for the server

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

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

0 commit comments

Comments
 (0)