feat: Update operator-sdk and align Makefiles#21
feat: Update operator-sdk and align Makefiles#21VaishnaviHire merged 7 commits intollamastack:mainfrom
Conversation
Updates to operator-sdk v1.39.2 and aligns the Makefiles for better consistency. It supersedes PR llamastack#20 which updated the makefile and controller-gen target. Added a new 'pre-commit' makefile target to run pre-commit hooks on all files.
f90fb65 to
d598745
Compare
Makefile
Outdated
| KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out | ||
|
|
||
| # Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors. | ||
| .PHONY: test-e2e # Run the e2e tests against a Kind k8s instance that is spun up. |
There was a problem hiding this comment.
We are already adding a target for e2e tests as part of this PR
There was a problem hiding this comment.
I've rebased on your PR, but I kept test-e2e as the target because it looks like the operator-sdk used this target, and so it makes it easier to keep track of future updates of the operator-sdk.
Also, I simplified the structure a bit, so that hack/ollama.sh is called directly in the test-e2e makefile target, as it is run anyway always (because of the .PHONY)
@VaishnaviHire please check if this is ok for you
|
We would probably need an update in README as well |
| .PHONY: catalog-build | ||
| catalog-build: opm ## Build a catalog image. | ||
| $(OPM) index add --container-tool $(IMAGE_BUILDER) --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) | ||
| $(OPM) index add --container-tool docker --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) |
There was a problem hiding this comment.
Not sure about this one, I wonder whether it should be $(CONTAINER_TOOL). However, operator-sdk used "docker" here, but I guess this is a mistake.
@VaishnaviHire do we even need the catalog-build target as we probably never will have a own catalog entry (but be part of ODH) ?
There was a problem hiding this comment.
I've opened operator-framework/operator-sdk#6932 to address this upstream.
There was a problem hiding this comment.
Thanks I think its okay to remove olm targets. But it can be a follow-up to this PR.
fix: need latest image for overlays/rhoai
Update Dockerfile.konflux to include manifests
Updates to operator-sdk v1.39.2 and aligns the Makefiles for better consistency with operator-sdk generated Makefile. It supersedes #20, and allows for a more elegant way for installing tools locally (like its done nowadays in the operator-sdk generated Makefiles).
Also aligned versions with the versions that operator-sdk v1.39.2 is using.
Changes include:
Note: Due to the way how tools are downloaded now, it's recommended to remove
bin/to remove legacy tools.