GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Add feast apply init container to automate registry population on pod start by ntkathole · Pull Request #6106 · feast-dev/feast

feat: Add feast apply init container to automate registry population on pod start #6106

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.

Sign up for GitHub

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

Merged
ntkathole merged 4 commits into feast-dev:master from ntkathole:applyondeploy
Mar 15, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

feat: Add feast apply init container to automate registry population on pod start #6106

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4 commits
Select commit Hold shift + click to select a range
2089f9d
feat: Add feast apply init container to automate registry population …
ntkathole Mar 14, 2026
265e9dc
fix: Replicas is not required
ntkathole Mar 14, 2026
61c77a5
fix: Fixed race condition in _apply_object
ntkathole Mar 15, 2026
c9be7aa
fix: Improve error messaging
ntkathole Mar 15, 2026
File filter
Filter by extension

Clear filters
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
Diff view

There are no files selected for viewing

18 changes: 9 additions & 9 deletions 18 .secrets.baseline
Show comments
View file
Open in desktop

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

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

4 changes: 3 additions & 1 deletion 4 infra/feast-operator/api/v1/featurestore_types.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ type FeatureStoreSpec struct {
// Mutually exclusive with services.scaling.autoscaling.
// +kubebuilder:default=1
// +kubebuilder:validation:Minimum=1
Replicas *int32 `json:"replicas"`
Replicas *int32 `json:"replicas,omitempty"`
}

// FeastProjectDir defines how to create the feast project directory.
Expand Down Expand Up @@ -310,6 +310,8 @@ type FeatureStoreServices struct {
SecurityContext *corev1.PodSecurityContext `json:"securityContext,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.
RunFeastApplyOnInit *bool `json:"runFeastApplyOnInit,omitempty"`
// 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).
Volumes []corev1.Volume `json:"volumes,omitempty"`
// Scaling configures horizontal scaling for the FeatureStore deployment (e.g. HPA autoscaling).
Expand Down
5 changes: 5 additions & 0 deletions 5 infra/feast-operator/api/v1/zz_generated.deepcopy.go
Show comments
View file
Open in desktop

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

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

2 changes: 2 additions & 0 deletions 2 infra/feast-operator/api/v1alpha1/featurestore_types.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ type FeatureStoreServices struct {
SecurityContext *corev1.PodSecurityContext `json:"securityContext,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.
RunFeastApplyOnInit *bool `json:"runFeastApplyOnInit,omitempty"`
// 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).
Volumes []corev1.Volume `json:"volumes,omitempty"`
}
Expand Down
5 changes: 5 additions & 0 deletions 5 infra/feast-operator/api/v1alpha1/zz_generated.deepcopy.go
Show comments
View file
Open in desktop

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

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

20 changes: 18 additions & 2 deletions 20 infra/feast-operator/config/crd/bases/feast.dev_featurestores.yaml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -3129,6 +3129,10 @@ spec:
x-kubernetes-validations:
- message: One selection required.
rule: '[has(self.local), has(self.remote)].exists_one(c, c)'
runFeastApplyOnInit:
description: Runs feast apply on pod start to populate the registry.
Defaults to true. Ignored when DisableInitContainers is true.
type: boolean
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.

scaling:
description: Scaling configures horizontal scaling for the FeatureStore
deployment (e.g. HPA autoscaling).
Expand Down Expand Up @@ -5695,7 +5699,6 @@ spec:
type: object
required:
- feastProject
- replicas
type: object
x-kubernetes-validations:
- message: replicas > 1 and services.scaling.autoscaling are mutually
Expand Down Expand Up @@ -8871,6 +8874,11 @@ spec:
- message: One selection required.
rule: '[has(self.local), has(self.remote)].exists_one(c,
c)'
runFeastApplyOnInit:
description: Runs feast apply on pod start to populate the
registry. Defaults to true. Ignored when DisableInitContainers
is true.
type: boolean
scaling:
description: Scaling configures horizontal scaling for the
FeatureStore deployment (e.g. HPA autoscaling).
Expand Down Expand Up @@ -11458,7 +11466,6 @@ spec:
type: object
required:
- feastProject
- replicas
type: object
x-kubernetes-validations:
- message: replicas > 1 and services.scaling.autoscaling are mutually
Expand Down Expand Up @@ -13920,6 +13927,10 @@ spec:
x-kubernetes-validations:
- message: One selection required.
rule: '[has(self.local), has(self.remote)].exists_one(c, c)'
runFeastApplyOnInit:
description: Runs feast apply on pod start to populate the registry.
Defaults to true. Ignored when DisableInitContainers is true.
type: boolean
securityContext:
description: PodSecurityContext holds pod-level security attributes
and common container settings.
Expand Down Expand Up @@ -18163,6 +18174,11 @@ spec:
- message: One selection required.
rule: '[has(self.local), has(self.remote)].exists_one(c,
c)'
runFeastApplyOnInit:
description: Runs feast apply on pod start to populate the
registry. Defaults to true. Ignored when DisableInitContainers
is true.
type: boolean
securityContext:
description: PodSecurityContext holds pod-level security attributes
and common container settings.
Expand Down
20 changes: 18 additions & 2 deletions 20 infra/feast-operator/dist/install.yaml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -3137,6 +3137,10 @@ spec:
x-kubernetes-validations:
- message: One selection required.
rule: '[has(self.local), has(self.remote)].exists_one(c, c)'
runFeastApplyOnInit:
description: Runs feast apply on pod start to populate the registry.
Defaults to true. Ignored when DisableInitContainers is true.
type: boolean
scaling:
description: Scaling configures horizontal scaling for the FeatureStore
deployment (e.g. HPA autoscaling).
Expand Down Expand Up @@ -5703,7 +5707,6 @@ spec:
type: object
required:
- feastProject
- replicas
type: object
x-kubernetes-validations:
- message: replicas > 1 and services.scaling.autoscaling are mutually
Expand Down Expand Up @@ -8879,6 +8882,11 @@ spec:
- message: One selection required.
rule: '[has(self.local), has(self.remote)].exists_one(c,
c)'
runFeastApplyOnInit:
description: Runs feast apply on pod start to populate the
registry. Defaults to true. Ignored when DisableInitContainers
is true.
type: boolean
scaling:
description: Scaling configures horizontal scaling for the
FeatureStore deployment (e.g. HPA autoscaling).
Expand Down Expand Up @@ -11466,7 +11474,6 @@ spec:
type: object
required:
- feastProject
- replicas
type: object
x-kubernetes-validations:
- message: replicas > 1 and services.scaling.autoscaling are mutually
Expand Down Expand Up @@ -13928,6 +13935,10 @@ spec:
x-kubernetes-validations:
- message: One selection required.
rule: '[has(self.local), has(self.remote)].exists_one(c, c)'
runFeastApplyOnInit:
description: Runs feast apply on pod start to populate the registry.
Defaults to true. Ignored when DisableInitContainers is true.
type: boolean
securityContext:
description: PodSecurityContext holds pod-level security attributes
and common container settings.
Expand Down Expand Up @@ -18171,6 +18182,11 @@ spec:
- message: One selection required.
rule: '[has(self.local), has(self.remote)].exists_one(c,
c)'
runFeastApplyOnInit:
description: Runs feast apply on pod start to populate the
registry. Defaults to true. Ignored when DisableInitContainers
is true.
type: boolean
securityContext:
description: PodSecurityContext holds pod-level security attributes
and common container settings.
Expand Down
1 change: 1 addition & 0 deletions 1 infra/feast-operator/docs/api/markdown/ref.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ _Appears in:_
| `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)_ | |
| `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). |
| `scaling` _[ScalingConfig](#scalingconfig)_ | Scaling configures horizontal scaling for the FeatureStore deployment (e.g. HPA autoscaling).
For static replicas, use spec.replicas instead. |
Expand Down
6 changes: 5 additions & 1 deletion 6 infra/feast-operator/internal/controller/featurestore_controller.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,15 @@ func (r *FeatureStoreReconciler) deployFeast(ctx context.Context, cr *feastdevv1
} else {
isDeployAvailable := services.IsDeploymentAvailable(deployment.Status.Conditions)
if !isDeployAvailable {
msg := feastdevv1.DeploymentNotAvailableMessage
if podMsg := feast.GetPodContainerFailureMessage(deployment); podMsg != "" {
msg = msg + ": " + podMsg
}
condition = metav1.Condition{
Type: feastdevv1.ReadyType,
Status: metav1.ConditionUnknown,
Reason: feastdevv1.DeploymentNotAvailableReason,
Message: feastdevv1.DeploymentNotAvailableMessage,
Message: msg,
}

result = errResult
Expand Down
2 changes: 2 additions & 0 deletions 2 infra/feast-operator/internal/controller/featurestore_controller_cronjob_test.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ var _ = Describe("FeatureStore Controller - Feast CronJob", func() {
Expect(resource.Status).NotTo(BeNil())
Expect(resource.Status.CronJob).To(Equal(objMeta.Name))
Expect(resource.Status.Applied.CronJob.Schedule).NotTo(BeEmpty())
Expect(resource.Status.Applied.Services.RunFeastApplyOnInit).NotTo(BeNil())
Expect(*resource.Status.Applied.Services.RunFeastApplyOnInit).To(BeTrue())

Expect(resource.Status.Conditions).NotTo(BeEmpty())
cond := apimeta.FindStatusCondition(resource.Status.Conditions, feastdevv1.CronJobReadyType)
Expand Down
2 changes: 1 addition & 1 deletion 2 infra/feast-operator/internal/controller/featurestore_controller_objectstore_test.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ var _ = Describe("FeatureStore Controller-Ephemeral services", func() {
Expect(err).NotTo(HaveOccurred())
Expect(deploy.Spec.Replicas).To(Equal(int32Ptr(1)))
Expect(controllerutil.HasControllerReference(deploy)).To(BeTrue())
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(1))
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(2))
Expect(deploy.Spec.Template.Spec.Containers).To(HaveLen(2))
Expect(services.GetRegistryContainer(*deploy)).NotTo(BeNil())
Expect(services.GetOnlineContainer(*deploy)).NotTo(BeNil())
Expand Down
2 changes: 1 addition & 1 deletion 2 infra/feast-operator/internal/controller/featurestore_controller_oidc_auth_test.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ var _ = Describe("FeatureStore Controller-OIDC authorization", func() {
Expect(err).NotTo(HaveOccurred())
Expect(deploy.Spec.Replicas).To(Equal(int32Ptr(1)))
Expect(controllerutil.HasControllerReference(deploy)).To(BeTrue())
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(1))
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(2))
Expect(deploy.Spec.Template.Spec.Containers).To(HaveLen(4))
Expect(deploy.Spec.Template.Spec.Volumes).To(HaveLen(1))
Expect(services.GetOfflineContainer(*deploy).VolumeMounts).To(HaveLen(1))
Expand Down
16 changes: 12 additions & 4 deletions 16 infra/feast-operator/internal/controller/featurestore_controller_test.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ var _ = Describe("FeatureStore Controller", func() {
Expect(deploy.Spec.Replicas).To(Equal(int32Ptr(1)))
Expect(controllerutil.HasControllerReference(deploy)).To(BeTrue())
Expect(deploy.Spec.Template.Spec.ServiceAccountName).To(Equal(deploy.Name))
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(1))
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(2))
Expect(deploy.Spec.Template.Spec.InitContainers[0].Args[0]).To(ContainSubstring("feast init"))
Expect(deploy.Spec.Template.Spec.InitContainers[1].Name).To(Equal("feast-apply"))
Expect(deploy.Spec.Template.Spec.InitContainers[1].Command).To(Equal([]string{"feast", "apply"}))
Expect(deploy.Spec.Template.Spec.Containers).To(HaveLen(1))

deploy.Spec.Replicas = int32Ptr(3)
Expand Down Expand Up @@ -264,7 +266,7 @@ var _ = Describe("FeatureStore Controller", func() {
}, deploy)
Expect(err).NotTo(HaveOccurred())
Expect(deploy.Spec.Replicas).To(Equal(int32Ptr(1)))
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(1))
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(2))
Expect(deploy.Spec.Template.Spec.InitContainers[0].Args[0]).To(ContainSubstring("git -c http.sslVerify=false clone"))
Expect(deploy.Spec.Template.Spec.InitContainers[0].Args[0]).To(ContainSubstring("git checkout " + ref))
Expect(deploy.Spec.Template.Spec.InitContainers[0].Args[0]).To(ContainSubstring(featureRepoPath))
Expand Down Expand Up @@ -294,7 +296,7 @@ var _ = Describe("FeatureStore Controller", func() {
Namespace: objMeta.Namespace,
}, deploy)
Expect(err).NotTo(HaveOccurred())
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(1))
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(2))
Expect(deploy.Spec.Template.Spec.InitContainers[0].Args[0]).To(ContainSubstring("feast init -t spark"))
})

Expand Down Expand Up @@ -737,6 +739,12 @@ var _ = Describe("FeatureStore Controller", func() {
}, deploy)
Expect(err).NotTo(HaveOccurred())
Expect(deploy.Spec.Template.Spec.ServiceAccountName).To(Equal(deploy.Name))
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(2))
Expect(deploy.Spec.Template.Spec.InitContainers[1].Name).To(Equal("feast-apply"))
Expect(deploy.Spec.Template.Spec.InitContainers[1].Env).To(ContainElements(
corev1.EnvVar{Name: testEnvVarName, Value: testEnvVarValue},
))
Expect(deploy.Spec.Template.Spec.InitContainers[1].EnvFrom).NotTo(BeEmpty())
Expect(deploy.Spec.Template.Spec.Containers).To(HaveLen(4))
registryContainer := services.GetRegistryContainer(*deploy)
Expect(registryContainer.Env).To(HaveLen(1))
Expand Down Expand Up @@ -1145,7 +1153,7 @@ var _ = Describe("FeatureStore Controller", func() {
Namespace: objMeta.Namespace,
}, deploy)
Expect(err).NotTo(HaveOccurred())
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(1))
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(2))

// check client config
cm := &corev1.ConfigMap{}
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.