Skip to content

[Bug] fix: separate CRDs from application manifests #1184

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,15 @@ endif

.PHONY: install
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
## Install all CRDs using kubectl create to avoid size limitation problems like for Ray CRDs.
$(KUBECTL) create -k config/crd/ || true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reason to not split make install into two commands was that in public release, we want to keep installation simple for end users and not ask them to do make install. Public release has one command for dependency.

# Install component dependencies
kubectl apply -f "https://github.com/vllm-project/aibrix/releases/download/v0.3.0/aibrix-dependency-v0.3.0.yaml" --server-side

# Install aibrix components
kubectl apply -f "https://github.com/vllm-project/aibrix/releases/download/v0.3.0/aibrix-core-v0.3.0.yaml"

Copy link
Collaborator

Choose a reason for hiding this comment

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

Using create will have problem in future if we want to update the crd definition for ray objects. Thats why we changed to use --server-side in v0.3.0 release which does throw error for large size object.

## helm creates objects without aibrix prefix, hence deploying gateway components outside of kustomization
## This target also handles the KubeRay Operator components included in config/dependency
$(KUBECTL) apply -k config/dependency --server-side

.PHONY: uninstall
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -k config/crd
$(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -k config/dependency

.PHONY: deploy
Expand Down
1 change: 1 addition & 0 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resources:
- autoscaling
- model
- orchestration
- ray
#+kubebuilder:scaffold:crdkustomizeresource

patches:
Expand Down
4 changes: 4 additions & 0 deletions config/crd/ray/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resources:
- ray.io_rayclusters.yaml
- ray.io_rayjobs.yaml
- ray.io_rayservices.yaml
3 changes: 1 addition & 2 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ namePrefix: aibrix-

resources:
- ../namespace
- ../crd
- ../rbac
- ../manager
- ../gateway
- ../metadata
- ../gpu-optimizer
- ../dependency/kuberay-operator
- ../kuberay-operator
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need to change kuberay-operator dir? That can still be part of dependency along with envoy-gateway.

# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
- ../webhook
Expand Down
3 changes: 0 additions & 3 deletions config/dependency/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ kind: Kustomization

resources:
- envoy-gateway
- kuberay-operator/crds/ray.io_rayclusters.yaml
- kuberay-operator/crds/ray.io_rayjobs.yaml
- kuberay-operator/crds/ray.io_rayservices.yaml