-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: PVC configuration and impl #4750
Conversation
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
@tchughesiv @tmihalac I also splitted the controller tests in multiple files to simplify them |
infra/feast-operator/config/samples/v1alpha1_featurestore_ephemeral_persistence.yaml
Outdated
Show resolved
Hide resolved
err := feast.setPVC(pvc, pvcCreate, feastType) | ||
if err != nil { | ||
return err | ||
} | ||
if op, err := controllerutil.CreateOrUpdate(feast.Context, feast.Client, pvc, controllerutil.MutateFn(func() error { | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err := feast.setPVC(pvc, pvcCreate, feastType) | |
if err != nil { | |
return err | |
} | |
if op, err := controllerutil.CreateOrUpdate(feast.Context, feast.Client, pvc, controllerutil.MutateFn(func() error { | |
return nil | |
if op, err := controllerutil.CreateOrUpdate(feast.Context, feast.Client, pvc, controllerutil.MutateFn(func() error { | |
return feast.setPVC(pvc, pvcCreate, feastType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the PVC object mods need to happen within the CreateOrUpdate func ()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this moved because of the immutable nature of the PVC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if so, we could be explicit with PVC creation and use feast.Client.Create()
here instead? it could be used alongside if !apierrors.IsAlreadyExists(err) {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried the Create option but creation was not an issue. Deletion seems to fail, at least in the tests (just restored them to see the failure)
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
type RegistryFilePersistence struct { | ||
Path string `json:"path,omitempty"` | ||
Path string `json:"path,omitempty"` | ||
PvcConfig *PvcConfig `json:"pvc,omitempty"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OnlineStoreFilePersistence
and RegistryFilePersistence
are identical. Any reason we shouldn't make a single FilePersistence
struct instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registry also supports the s3_additional_kwargs
options (which will go under the Registry.Persistence.File
section). Will we add it to a new PR dedicated to object store settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, so this is in prep for future work... got it, thanks
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@lokeshrangineni @redhatHameed can you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks lgtm
some minor comments.
infra/feast-operator/internal/controller/services/repo_config.go
Outdated
Show resolved
Hide resolved
infra/feast-operator/config/samples/v1alpha1_featurestore_objectstore_persistence.yaml
Outdated
Show resolved
Hide resolved
infra/feast-operator/config/samples/v1alpha1_featurestore_pvc_persistence.yaml
Show resolved
Hide resolved
206f3a7
to
6644853
Compare
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
infra/feast-operator/internal/controller/featurestore_controller_pvc_test.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
What this PR does / why we need it:
Adds durable persistence configuration to Feast services deployed with the operator.
PVC configuration allows to either create a new PVC or use an existing one:
Which issue(s) this PR fixes:
Relates to #4561