Skip to content

Commit 573646b

Browse files
committed
Fix role error
Signed-off-by: kerthcet <[email protected]>
1 parent 5cacbdf commit 573646b

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ include Makefile-deps.mk
22

33
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
44
ENVTEST_K8S_VERSION = 1.32.0
5-
ENVTEST_LWS_VERSION = v0.5.1
65

76
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
87
ifeq (,$(shell go env GOBIN))
@@ -84,9 +83,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
8483
rbac:roleName=manager-role output:rbac:artifacts:config=config/rbac \
8584
crd:generateEmbeddedObjectMeta=true output:crd:artifacts:config=config/crd/bases \
8685
webhook output:webhook:artifacts:config=config/webhook \
87-
paths="./cmd/..."
88-
paths="./api/..."
89-
paths="./pkg/..."
86+
paths="./api/...;./pkg/...;./cmd/..."
9087

9188
.PHONY: generate
9289
generate: controller-gen code-generator ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -136,7 +133,7 @@ test-integration: manifests fmt vet envtest ginkgo ## Run integration tests.
136133

137134
.PHONY: test-e2e
138135
test-e2e: kustomize manifests fmt vet envtest ginkgo kind-image-build
139-
E2E_KIND_NODE_VERSION=$(E2E_KIND_NODE_VERSION) KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) KIND=$(KIND) KUBECTL=$(KUBECTL) KUSTOMIZE=$(KUSTOMIZE) GINKGO=$(GINKGO) USE_EXISTING_CLUSTER=$(USE_EXISTING_CLUSTER) IMAGE_TAG=$(IMG) ENVTEST_LWS_VERSION=$(ENVTEST_LWS_VERSION) ./hack/e2e-test.sh
136+
E2E_KIND_NODE_VERSION=$(E2E_KIND_NODE_VERSION) KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) KIND=$(KIND) KUBECTL=$(KUBECTL) KUSTOMIZE=$(KUSTOMIZE) GINKGO=$(GINKGO) USE_EXISTING_CLUSTER=$(USE_EXISTING_CLUSTER) IMAGE_TAG=$(IMG) ./hack/e2e-test.sh
140137

141138
test-deploy-with-helm: kind-image-build
142139
E2E_KIND_NODE_VERSION=$(E2E_KIND_NODE_VERSION) KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) KIND=$(KIND) KUBECTL=$(KUBECTL) USE_EXISTING_CLUSTER=$(USE_EXISTING_CLUSTER) IMAGE_TAG=$(IMG) TAG=$(GIT_TAG) ./hack/test-deploy-with-helm.sh

api/core/v1alpha1/model_types.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ type ModelHub struct {
7171
// URIProtocol represents the protocol of the URI.
7272
type URIProtocol string
7373

74-
// Add roles for operating leaderWorkerSet.
75-
//
76-
// +kubebuilder:rbac:groups=leaderworkerset.x-k8s.io,resources=leaderworkersets,verbs=get;list;watch;create;update;patch;delete
77-
// +kubebuilder:rbac:groups=leaderworkerset.x-k8s.io,resources=leaderworkersets/status,verbs=get;update;patch
78-
7974
// ModelSource represents the source of the model.
8075
// Only one model source will be used.
8176
type ModelSource struct {

config/crd/bases/inference.llmaz.io_playgrounds.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ spec:
897897
description: |-
898898
InferenceFlavors represents a list of flavor names with fungibility supported
899899
to serve the model.
900-
- If not set, always apply with the 0-index model by default.
900+
- If not set, will employ the model configured flavors by default.
901901
- If set, will lookup the flavor names following the model orders.
902902
items:
903903
type: string

config/crd/bases/inference.llmaz.io_services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec:
5252
description: |-
5353
InferenceFlavors represents a list of flavor names with fungibility supported
5454
to serve the model.
55-
- If not set, always apply with the 0-index model by default.
55+
- If not set, will employ the model configured flavors by default.
5656
- If set, will lookup the flavor names following the model orders.
5757
items:
5858
type: string

config/manager/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ kind: Kustomization
55
images:
66
- name: controller
77
newName: inftyai/llmaz
8-
newTag: v0.1.3
8+
newTag: main

config/rbac/role.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ kind: ClusterRole
44
metadata:
55
name: manager-role
66
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- configmaps
11+
verbs:
12+
- get
13+
- list
714
- apiGroups:
815
- ""
916
resources:

hack/e2e-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function deploy {
4040
$KUSTOMIZE build $CWD/test/e2e/config | $KUBECTL apply --server-side -f -
4141
}
4242
function deploy_lws {
43-
$KUBECTL apply --server-side -f https://github.com/kubernetes-sigs/lws/releases/download/$ENVTEST_LWS_VERSION/manifests.yaml
43+
$KUBECTL apply --server-side -f $CWD/test/config/lws/
4444
}
4545
trap cleanup EXIT
4646
startup

pkg/controller/inference/service_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ func NewServiceReconciler(client client.Client, scheme *runtime.Scheme, record r
6969
//+kubebuilder:rbac:groups=inference.llmaz.io,resources=services/finalizers,verbs=update
7070
//+kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete
7171
//+kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list
72+
//+kubebuilder:rbac:groups=leaderworkerset.x-k8s.io,resources=leaderworkersets,verbs=get;list;watch;create;update;patch;delete
73+
//+kubebuilder:rbac:groups=leaderworkerset.x-k8s.io,resources=leaderworkersets/status,verbs=get;update;patch
7274

7375
// Reconcile is part of the main kubernetes reconciliation loop which aims to
7476
// move the current state of the cluster closer to the desired state.

0 commit comments

Comments
 (0)