Skip to content

feat: Update operator-sdk and align Makefiles#21

Merged
VaishnaviHire merged 7 commits intollamastack:mainfrom
rhuss:feature/update-operator-sdk
May 12, 2025
Merged

feat: Update operator-sdk and align Makefiles#21
VaishnaviHire merged 7 commits intollamastack:mainfrom
rhuss:feature/update-operator-sdk

Conversation

@rhuss
Copy link
Collaborator

@rhuss rhuss commented May 9, 2025

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:

  • Update operator-sdk to v1.39.2
  • Align Makefile with latest operator-sdk scaffold
  • Improve tool dependency management
  • Add pre-commit makefile target
  • Update dependencies in go.mod
  • Refactor install procedures for tools

Note: Due to the way how tools are downloaded now, it's recommended to remove bin/ to remove legacy tools.

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.
@rhuss rhuss force-pushed the feature/update-operator-sdk branch from f90fb65 to d598745 Compare May 9, 2025 13:05
@rhuss rhuss requested review from VaishnaviHire and leseb May 9, 2025 13:07
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are already adding a target for e2e tests as part of this PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@VaishnaviHire
Copy link
Collaborator

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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opened operator-framework/operator-sdk#6932 to address this upstream.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I think its okay to remove olm targets. But it can be a follow-up to this PR.

@VaishnaviHire VaishnaviHire merged commit 2bd603e into llamastack:main May 12, 2025
2 checks passed
VaishnaviHire pushed a commit to VaishnaviHire/llama-stack-k8s-operator that referenced this pull request Jul 18, 2025
fix: need latest image for overlays/rhoai
VaishnaviHire added a commit to VaishnaviHire/llama-stack-k8s-operator that referenced this pull request Sep 4, 2025
Update Dockerfile.konflux to include manifests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants