Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 5 additions & 5 deletions .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": 729
"line_number": 734
}
],
"infra/feast-operator/api/v1/zz_generated.deepcopy.go": [
Expand All @@ -943,21 +943,21 @@
"filename": "infra/feast-operator/api/v1/zz_generated.deepcopy.go",
"hashed_secret": "f914fc9324de1bec1ad13dec94a8ea2ddb41fc87",
"is_verified": false,
"line_number": 686
"line_number": 693
},
{
"type": "Secret Keyword",
"filename": "infra/feast-operator/api/v1/zz_generated.deepcopy.go",
"hashed_secret": "44e17306b837162269a410204daaa5ecee4ec22c",
"is_verified": false,
"line_number": 1254
"line_number": 1261
},
{
"type": "Secret Keyword",
"filename": "infra/feast-operator/api/v1/zz_generated.deepcopy.go",
"hashed_secret": "c2028031c154bbe86fd69bef740855c74b927dcf",
"is_verified": false,
"line_number": 1259
"line_number": 1266
}
],
"infra/feast-operator/api/v1alpha1/featurestore_types.go": [
Expand Down Expand Up @@ -1539,5 +1539,5 @@
}
]
},
"generated_at": "2026-03-18T13:51:43Z"
"generated_at": "2026-04-04T12:08:20Z"
}
5 changes: 5 additions & 0 deletions infra/feast-operator/api/v1/featurestore_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ type FeatureStoreServices struct {
UI *ServerConfigs `json:"ui,omitempty"`
DeploymentStrategy *appsv1.DeploymentStrategy `json:"deploymentStrategy,omitempty"`
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
// PodAnnotations are annotations to be applied to the Deployment's PodTemplate metadata.
// This enables annotation-driven integrations like OpenTelemetry auto-instrumentation,
// Istio sidecar injection, Vault agent injection, etc.
// +optional
PodAnnotations map[string]string `json:"podAnnotations,omitempty"`
// Disable the 'feast repo initialization' initContainer
DisableInitContainers bool `json:"disableInitContainers,omitempty"`
// Runs feast apply on pod start to populate the registry. Defaults to true. Ignored when DisableInitContainers is true.
Expand Down
7 changes: 7 additions & 0 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 @@ -2508,6 +2508,12 @@ spec:
type: object
type: object
type: object
podAnnotations:
additionalProperties:
type: string
description: PodAnnotations are annotations to be applied to the
Deployment's PodTemplate metadata.
type: object
podDisruptionBudgets:
description: PodDisruptionBudgets configures a PodDisruptionBudget
for the FeatureStore deployment.
Expand Down Expand Up @@ -8232,6 +8238,12 @@ spec:
type: object
type: object
type: object
podAnnotations:
additionalProperties:
type: string
description: PodAnnotations are annotations to be applied
to the Deployment's PodTemplate metadata.
type: object
podDisruptionBudgets:
description: PodDisruptionBudgets configures a PodDisruptionBudget
for the FeatureStore deployment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2508,6 +2508,12 @@ spec:
type: object
type: object
type: object
podAnnotations:
additionalProperties:
type: string
description: PodAnnotations are annotations to be applied to the
Deployment's PodTemplate metadata.
type: object
podDisruptionBudgets:
description: PodDisruptionBudgets configures a PodDisruptionBudget
for the FeatureStore deployment.
Expand Down Expand Up @@ -8235,6 +8241,12 @@ spec:
type: object
type: object
type: object
podAnnotations:
additionalProperties:
type: string
description: PodAnnotations are annotations to be applied
to the Deployment's PodTemplate metadata.
type: object
podDisruptionBudgets:
description: PodDisruptionBudgets configures a PodDisruptionBudget
for the FeatureStore deployment.
Expand Down
12 changes: 12 additions & 0 deletions infra/feast-operator/dist/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2516,6 +2516,12 @@ spec:
type: object
type: object
type: object
podAnnotations:
additionalProperties:
type: string
description: PodAnnotations are annotations to be applied to the
Deployment's PodTemplate metadata.
type: object
podDisruptionBudgets:
description: PodDisruptionBudgets configures a PodDisruptionBudget
for the FeatureStore deployment.
Expand Down Expand Up @@ -8243,6 +8249,12 @@ spec:
type: object
type: object
type: object
podAnnotations:
additionalProperties:
type: string
description: PodAnnotations are annotations to be applied
to the Deployment's PodTemplate metadata.
type: object
podDisruptionBudgets:
description: PodDisruptionBudgets configures a PodDisruptionBudget
for the FeatureStore deployment.
Expand Down
3 changes: 3 additions & 0 deletions infra/feast-operator/docs/api/markdown/ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ _Appears in:_
| `ui` _[ServerConfigs](#serverconfigs)_ | Creates a UI server container |
| `deploymentStrategy` _[DeploymentStrategy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#deploymentstrategy-v1-apps)_ | |
| `securityContext` _[PodSecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#podsecuritycontext-v1-core)_ | |
| `podAnnotations` _object (keys:string, values:string)_ | PodAnnotations are annotations to be applied to the Deployment's PodTemplate metadata.
This enables annotation-driven integrations like OpenTelemetry auto-instrumentation,
Istio sidecar injection, Vault agent injection, etc. |
| `disableInitContainers` _boolean_ | Disable the 'feast repo initialization' initContainer |
| `runFeastApplyOnInit` _boolean_ | Runs feast apply on pod start to populate the registry. Defaults to true. Ignored when DisableInitContainers is true. |
| `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). |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ func (feast *FeastServices) setDeployment(deploy *appsv1.Deployment) error {
Strategy: feast.getDeploymentStrategy(),
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: deploy.GetLabels(),
Labels: deploy.GetLabels(),
Annotations: cr.Status.Applied.Services.PodAnnotations,
},
Spec: corev1.PodSpec{
ServiceAccountName: feast.initFeastSA().Name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,64 @@ var _ = Describe("Registry Service", func() {
})
})

Describe("PodAnnotations Configuration", func() {
It("should apply podAnnotations to deployment pod template", func() {
featureStore.Spec.Services.PodAnnotations = map[string]string{
"instrumentation.opentelemetry.io/inject-python": "true",
"sidecar.istio.io/inject": "true",
}
Expect(k8sClient.Update(ctx, featureStore)).To(Succeed())
Expect(feast.ApplyDefaults()).To(Succeed())
applySpecToStatus(featureStore)
feast.refreshFeatureStore(ctx, typeNamespacedName)

deployment := feast.initFeastDeploy()
Expect(deployment).NotTo(BeNil())
Expect(feast.setDeployment(deployment)).To(Succeed())

Expect(deployment.Spec.Template.Annotations).To(Equal(map[string]string{
"instrumentation.opentelemetry.io/inject-python": "true",
"sidecar.istio.io/inject": "true",
}))
})

It("should have no pod template annotations when podAnnotations is not set", func() {
Expect(feast.ApplyDefaults()).To(Succeed())
applySpecToStatus(featureStore)
feast.refreshFeatureStore(ctx, typeNamespacedName)

deployment := feast.initFeastDeploy()
Expect(deployment).NotTo(BeNil())
Expect(feast.setDeployment(deployment)).To(Succeed())

Expect(deployment.Spec.Template.Annotations).To(BeNil())
})

It("should remove pod template annotations when podAnnotations is removed", func() {
featureStore.Spec.Services.PodAnnotations = map[string]string{
"instrumentation.opentelemetry.io/inject-python": "true",
}
Expect(k8sClient.Update(ctx, featureStore)).To(Succeed())
Expect(feast.ApplyDefaults()).To(Succeed())
applySpecToStatus(featureStore)
feast.refreshFeatureStore(ctx, typeNamespacedName)

deployment := feast.initFeastDeploy()
Expect(deployment).NotTo(BeNil())
Expect(feast.setDeployment(deployment)).To(Succeed())
Expect(deployment.Spec.Template.Annotations).To(HaveKey("instrumentation.opentelemetry.io/inject-python"))

featureStore.Spec.Services.PodAnnotations = nil
Expect(k8sClient.Update(ctx, featureStore)).To(Succeed())
Expect(feast.ApplyDefaults()).To(Succeed())
applySpecToStatus(featureStore)
feast.refreshFeatureStore(ctx, typeNamespacedName)

Expect(feast.setDeployment(deployment)).To(Succeed())
Expect(deployment.Spec.Template.Annotations).To(BeNil())
})
})

Describe("NodeSelector Configuration", func() {
It("should apply NodeSelector to pod spec when configured", func() {
// Set NodeSelector for registry service
Expand Down
Loading