Skip to content

Commit 9d9e61f

Browse files
committed
set feast image during deploy
Signed-off-by: Tommy Hughes <tohughes@redhat.com>
1 parent 28252ed commit 9d9e61f

File tree

10 files changed

+34
-16
lines changed

10 files changed

+34
-16
lines changed

infra/feast-operator/Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ endif
5151
OPERATOR_SDK_VERSION ?= v1.38.0
5252
# Image URL to use all building/pushing image targets
5353
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)
54+
FS_IMG ?= docker.io/feastdev/feature-server:$(VERSION)
5455
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
5556
ENVTEST_K8S_VERSION = 1.30.0
5657

@@ -172,7 +173,7 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
172173
rm Dockerfile.cross
173174

174175
.PHONY: build-installer
175-
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
176+
build-installer: manifests generate related-image-fs kustomize ## Generate a consolidated YAML with CRDs and deployment.
176177
mkdir -p dist
177178
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
178179
$(KUSTOMIZE) build config/default > dist/install.yaml
@@ -192,7 +193,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
192193
$(KUSTOMIZE) build config/crd | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f -
193194

194195
.PHONY: deploy
195-
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
196+
deploy: manifests kustomize related-image-fs ## Deploy controller to the K8s cluster specified in ~/.kube/config.
196197
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
197198
$(KUSTOMIZE) build config/default | $(KUBECTL) apply -f -
198199

@@ -275,7 +276,7 @@ endif
275276
endif
276277

277278
.PHONY: bundle
278-
bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
279+
bundle: manifests kustomize related-image-fs operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
279280
$(OPERATOR_SDK) generate kustomize manifests -q
280281
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
281282
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
@@ -329,3 +330,7 @@ catalog-build: opm ## Build a catalog image.
329330
.PHONY: catalog-push
330331
catalog-push: ## Push a catalog image.
331332
$(MAKE) docker-push IMG=$(CATALOG_IMG)
333+
334+
.PHONY: related-image-fs
335+
related-image-fs:
336+
FS_IMG=$(FS_IMG) envsubst < config/default/related_image_fs_patch.tmpl > config/default/related_image_fs_patch.yaml

infra/feast-operator/bundle/manifests/feast-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ metadata:
1616
}
1717
]
1818
capabilities: Basic Install
19-
createdAt: "2025-01-20T18:02:18Z"
19+
createdAt: "2025-01-20T22:18:19Z"
2020
operators.operatorframework.io/builder: operator-sdk-v1.38.0
2121
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
2222
name: feast-operator.v0.43.0

infra/feast-operator/config/default/kustomization.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,15 @@ resources:
2828
# [METRICS] Expose the controller manager metrics service.
2929
- metrics_service.yaml
3030

31-
# Uncomment the patches line if you enable Metrics, and/or are using webhooks and cert-manager
31+
3232
patches:
33-
- path: manager_related_images_patch.yaml
33+
- path: related_image_fs_patch.yaml
3434
target:
3535
kind: Deployment
36+
- path: related_image_grpc_patch.yaml
37+
target:
38+
kind: Deployment
39+
# Uncomment the patches line if you enable Metrics, and/or are using webhooks and cert-manager
3640
# [METRICS] The following patch will enable the metrics endpoint using HTTPS and the port :8443.
3741
# More info: https://book.kubebuilder.io/reference/metrics
3842
- path: manager_metrics_patch.yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- op: replace
2+
path: "/spec/template/spec/containers/0/env/0"
3+
value:
4+
name: RELATED_IMAGE_FEATURE_SERVER
5+
value: ${FS_IMG}

infra/feast-operator/config/default/manager_related_images_patch.yaml renamed to infra/feast-operator/config/default/related_image_fs_patch.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,3 @@
33
value:
44
name: RELATED_IMAGE_FEATURE_SERVER
55
value: docker.io/feastdev/feature-server:0.43.0
6-
- op: replace
7-
path: "/spec/template/spec/containers/0/env/1"
8-
value:
9-
name: RELATED_IMAGE_GRPC_CURL
10-
value: docker.io/fullstorydev/grpcurl:v1.9.1-alpine
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- op: replace
2+
path: "/spec/template/spec/containers/0/env/1"
3+
value:
4+
name: RELATED_IMAGE_GRPC_CURL
5+
value: docker.io/fullstorydev/grpcurl:v1.9.1-alpine

infra/feast-operator/internal/controller/services/services_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ import (
2525
)
2626

2727
const (
28+
feastServerImageVar = "RELATED_IMAGE_FEATURE_SERVER"
29+
grpcCurlImageVar = "RELATED_IMAGE_GRPC_CURL"
30+
grpcCurlImage = "fullstorydev/grpcurl:v1.9.1-alpine"
31+
2832
TmpFeatureStoreYamlEnvVar = "TMP_FEATURE_STORE_YAML_BASE64"
2933
FeatureStoreYamlCmKey = "feature_store.yaml"
3034
EphemeralPath = "/feast-data"

infra/feast-operator/internal/controller/services/util.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,17 @@ func setServiceDefaultConfigs(defaultConfigs *feastdevv1alpha1.DefaultConfigs) {
172172
}
173173

174174
func getFeatureServerImage() string {
175-
if img, exists := os.LookupEnv("RELATED_IMAGE_FEATURE_SERVER"); exists {
175+
if img, exists := os.LookupEnv(feastServerImageVar); exists {
176176
return img
177177
}
178178
return DefaultImage
179179
}
180180

181181
func getGrpcCurlImage() string {
182-
if img, exists := os.LookupEnv("RELATED_IMAGE_GRPC_CURL"); exists {
182+
if img, exists := os.LookupEnv(grpcCurlImageVar); exists {
183183
return img
184184
}
185-
return "fullstorydev/grpcurl:v1.9.1-alpine"
185+
return grpcCurlImage
186186
}
187187

188188
func checkOfflineStoreFilePersistenceType(value string) error {

infra/feast-operator/test/e2e/e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var _ = Describe("controller", Ordered, func() {
7575
ExpectWithOffset(1, err).NotTo(HaveOccurred())
7676

7777
By("deploying the controller-manager")
78-
cmd = exec.Command("make", "deploy", fmt.Sprintf("IMG=%s", projectimage))
78+
cmd = exec.Command("make", "deploy", fmt.Sprintf("IMG=%s", projectimage), fmt.Sprintf("FS_IMG=%s", feastLocalImage))
7979
_, err = utils.Run(cmd)
8080
ExpectWithOffset(1, err).NotTo(HaveOccurred())
8181

infra/scripts/release/files_to_bump.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ infra/feast-helm-operator/Makefile 6
1414
infra/feast-helm-operator/config/manager/kustomization.yaml 8
1515
infra/feast-operator/Makefile 6
1616
infra/feast-operator/config/manager/kustomization.yaml 8
17-
infra/feast-operator/config/default/manager_related_images_patch.yaml 5
17+
infra/feast-operator/config/default/related_image_fs_patch.yaml 5
1818
infra/feast-operator/config/overlays/odh/params.env 1
1919
infra/feast-operator/api/feastversion/version.go 20
2020
java/pom.xml 38

0 commit comments

Comments
 (0)