Skip to content

Commit 9a6a3c2

Browse files
committed
fix: incorrect labels
Signed-off-by: Neko Ayaka <neko@ayaka.moe>
1 parent 9ba6174 commit 9a6a3c2

4 files changed

Lines changed: 9 additions & 11 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
8080

8181
.PHONY: build
8282
build: manifests generate fmt vet ## Build manager binary.
83-
go build -o bin/manager cmd/main.go
83+
go build -o bin/manager cmd/ollama-operator/main.go
8484

8585
.PHONY: run
8686
run: manifests generate fmt vet ## Run a controller from your host.
87-
go run ./cmd/main.go
87+
go run ./cmd/ollama-operator/main.go
8888

8989
# If you wish to build the manager image targeting other platforms you can use the --platform flag.
9090
# (i.e. docker build --platform linux/arm64). However, you must enable docker buildKit for it.

docs/pages/en/guide/getting-started/cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ go install github.com/nekomeowww/ollama-operator/cmd/kollama@latest
1515
2. Deploy a model:
1616

1717
```shell
18-
kollama deploy phi --expose --node-port 30001
18+
kollama deploy phi --expose --node-port 30101
1919
```
2020

2121
> For more information about the `deploy` command, please refer to [`kollama deploy`](/pages/en/references/cli/commands/deploy).
@@ -25,13 +25,13 @@ That's it.
2525
3. Interact with the model:
2626

2727
```shell
28-
OLLAMA_HOST=<Node ip>:30001 ollama run phi
28+
OLLAMA_HOST=<Node ip>:30101 ollama run phi
2929
```
3030

3131
or use the OpenAI API compatible endpoint:
3232

3333
```shell
34-
curl http://<Node ip>:30001/v1/chat/completions -H "Content-Type: application/json" -d '{
34+
curl http://<Node ip>:30101/v1/chat/completions -H "Content-Type: application/json" -d '{
3535
"model": "phi",
3636
"messages": [
3737
{

docs/pages/zh-CN/guide/getting-started/cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ go install github.com/nekomeowww/ollama-operator/cmd/kollama@latest
1515
2. 部署 Ollama 模型 CRD 到 Kubernetes 集群:
1616

1717
```shell
18-
kollama deploy phi --expose --node-port 30001
18+
kollama deploy phi --expose --node-port 30101
1919
```
2020

2121
> 有关 `deploy` 命令的更多信息,请参阅 [`kollama deploy`](/pages/zh-CN/references/cli/commands/deploy)
2222
2323
3. 开始与模型进行交互吧:
2424

2525
```shell
26-
OLLAMA_HOST=<节点 IP>:30001 ollama run phi
26+
OLLAMA_HOST=<节点 IP>:30101 ollama run phi
2727
```
2828

2929
或者使用 `curl` 连接到与 OpenAI API 兼容的接口:
3030

3131
```shell
32-
curl http://<节点 IP>:30001/v1/chat/completions -H "Content-Type: application/json" -d '{
32+
curl http://<节点 IP>:30101/v1/chat/completions -H "Content-Type: application/json" -d '{
3333
"model": "phi",
3434
"messages": [
3535
{

pkg/model/model.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ func EnsureDeploymentCreated(
8686
Spec: appsv1.DeploymentSpec{
8787
Replicas: lo.Ternary(replicas == nil, lo.ToPtr(int32(1)), replicas),
8888
Selector: &metav1.LabelSelector{
89-
MatchLabels: map[string]string{
90-
"app": ModelAppName(name),
91-
},
89+
MatchLabels: ModelLabels(ModelAppName(name), name, false),
9290
},
9391
Template: corev1.PodTemplateSpec{
9492
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)