GeezerVison is showing github.com — fix: Remove grpcurl dependency (v0.43-branch) by tchughesiv · Pull Request #4976 · feast-dev/feast
fix: Remove grpcurl dependency (v0.43-branch)
#4976
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
File filter
Filter by extension
.go
(4)
.yaml
(4)
All 2 file types selected
Deleted files
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
@@ -33,9 +33,6 @@ patches:
- path: related_image_fs_patch.yaml
target:
kind: Deployment
- path: related_image_grpc_patch.yaml
target:
kind: Deployment
# Uncomment the patches line if you enable Metrics, and/or are using webhooks and cert-manager
# [METRICS] The following patch will enable the metrics endpoint using HTTPS and the port :8443.
# More info: https://book.kubebuilder.io/reference/metrics
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
@@ -73,8 +73,6 @@ spec:
env:
- name: RELATED_IMAGE_FEATURE_SERVER
value: feast:latest
- name: RELATED_IMAGE_GRPC_CURL
value: grpc:latest
livenessProbe:
httpGet:
path: /healthz
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -3581,8 +3581,6 @@ spec:
env:
- name: RELATED_IMAGE_FEATURE_SERVER
value: docker.io/feastdev/feature-server:0.43.0
- name: RELATED_IMAGE_GRPC_CURL
value: docker.io/fullstorydev/grpcurl:v1.9.1-alpine
image: feastdev/feast-operator:0.43.0
livenessProbe:
httpGet:
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -1007,7 +1007,7 @@ var _ = Describe("FeatureStore Controller", func() {
Namespace: objMeta.Namespace,
}, deploy)
Expect(err).NotTo(HaveOccurred())
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(2 ))
Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(1 ))
// check client config
cm := &corev1.ConfigMap{}
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -50,7 +50,7 @@ func (feast *FeastServices) ApplyDefaults() error {
// Deploy the feast services
func (feast *FeastServices) Deploy() error {
if feast.noLocalServiceConfigured() {
return errors.New("At least one local service must be configured. e.g. registry / online / offline. ")
return errors.New("at least one local service must be configured. e.g. registry / online / offline")
}
openshiftTls, err := feast.checkOpenshiftTls()
if err != nil {
Expand Down
Expand Up
@@ -301,7 +301,6 @@ func (feast *FeastServices) setPod(podSpec *corev1.PodSpec) error {
if err := feast.setContainers(podSpec); err != nil {
return err
}
feast.setRegistryClientInitContainer(podSpec)
feast.mountTlsConfigs(podSpec)
feast.mountPvcConfigs(podSpec)
feast.mountEmptyDirVolumes(podSpec)
Expand Down
Expand Up
@@ -430,29 +429,6 @@ func (feast *FeastServices) setInitContainer(podSpec *corev1.PodSpec, fsYamlB64
}
}
// add grpc init container if remote registry reference (feastRef) is configured
func (feast *FeastServices) setRegistryClientInitContainer(podSpec *corev1.PodSpec) {
if !feast.Handler.FeatureStore.Status.Applied.Services.DisableInitContainers {
hostname := feast.Handler.FeatureStore.Status.ServiceHostnames.Registry
if len(hostname) > 0 && feast.IsRemoteRefRegistry() {
grpcurlFlag := "-plaintext"
hostSplit := strings.Split(hostname, ":")
if len(hostSplit) > 1 && hostSplit[1] == "443" {
grpcurlFlag = "-insecure"
}
podSpec.InitContainers = append(podSpec.InitContainers, corev1.Container{
Name: "init-registry",
Image: getGrpcCurlImage(),
Command: []string{
"sh", "-c",
"until grpcurl -H \"authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)\" " +
grpcurlFlag + " -d '' -format text " + hostname + " grpc.health.v1.Health/Check; do echo waiting for registry; sleep 2; done",
},
})
}
}
}
func (feast *FeastServices) setService(svc *corev1.Service, feastType FeastServiceType) error {
svc.Labels = feast.getFeastTypeLabels(feastType)
if feast.isOpenShiftTls(feastType) {
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -25,11 +25,8 @@ import (
)
const (
feastServerImageVar = "RELATED_IMAGE_FEATURE_SERVER"
grpcCurlImageVar = "RELATED_IMAGE_GRPC_CURL"
grpcCurlImage = "fullstorydev/grpcurl:v1.9.1-alpine"
TmpFeatureStoreYamlEnvVar = "TMP_FEATURE_STORE_YAML_BASE64"
feastServerImageVar = "RELATED_IMAGE_FEATURE_SERVER"
FeatureStoreYamlCmKey = "feature_store.yaml"
EphemeralPath = "/feast-data"
FeatureRepoDir = "/feature_repo"
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -11,7 +11,6 @@ import (
feastdevv1alpha1 "github.com/feast-dev/feast/infra/feast-operator/api/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Expand Up
@@ -178,26 +177,19 @@ func getFeatureServerImage() string {
return DefaultImage
}
func getGrpcCurlImage() string {
if img, exists := os.LookupEnv(grpcCurlImageVar); exists {
return img
}
return grpcCurlImage
}
func checkOfflineStoreFilePersistenceType(value string) error {
if slices.Contains(feastdevv1alpha1.ValidOfflineStoreFilePersistenceTypes, value) {
return nil
}
return fmt.Errorf("invalid file type %s for offline store", value)
}
func ensureRequestedStorage(resources *v1 .VolumeResourceRequirements, requestedStorage string) {
func ensureRequestedStorage(resources *corev1 .VolumeResourceRequirements, requestedStorage string) {
if resources.Requests == nil {
resources.Requests = v1 .ResourceList{}
resources.Requests = corev1 .ResourceList{}
}
if _, ok := resources.Requests[v1 .ResourceStorage]; !ok {
resources.Requests[v1 .ResourceStorage] = resource.MustParse(requestedStorage)
if _, ok := resources.Requests[corev1 .ResourceStorage]; !ok {
resources.Requests[corev1 .ResourceStorage] = resource.MustParse(requestedStorage)
}
}
Expand Down
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.