Skip to content

Commit

Permalink
release: v0.5.3
Browse files Browse the repository at this point in the history
Signed-off-by: Neko Ayaka <neko@ayaka.moe>
  • Loading branch information
nekomeowww committed Apr 22, 2024
1 parent cbf7f90 commit fb5e132
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .krew.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: ollama
name: kollama
spec:
version: {{ .TagName }}
homepage: https://github.com/nekomeowww/ollama-operator
Expand Down Expand Up @@ -39,6 +39,6 @@ spec:
shortDescription: Interact with the Ollama Operator
description: |
Usage:
kubectl ollama deploy llama2
kubectl kollama deploy llama2
This plugin will help you to interact with the Ollama Operator to deploy any LLM (Llama Language Model) to your Kubernetes cluster.
Read more documentation at: https://github.com/nekomeowww/ollama-operator
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: ghcr.io/nekomeowww/ollama-operator
newTag: 0.5.2
newTag: 0.5.3
2 changes: 1 addition & 1 deletion dist/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ spec:
- --leader-elect
command:
- /manager
image: ghcr.io/nekomeowww/ollama-operator:0.5.2
image: ghcr.io/nekomeowww/ollama-operator:0.5.3
livenessProbe:
httpGet:
path: /healthz
Expand Down
46 changes: 23 additions & 23 deletions internal/cli/kollama/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,29 @@ var (
ErrOllamaModelNotSupported = fmt.Errorf("%s is not supported on the cluster, did you install the Ollama Operator?", modelSchemaGroupVersionResource.String())
)

func isKubectlPlugin() (bool, error) {
exec, err := os.Executable()
if err != nil {
return false, err
}

basename := filepath.Base(exec)
if strings.HasPrefix(basename, "kubectl-") {
return true, nil
}

return false, nil
}

func command() string {
is, _ := isKubectlPlugin()
if is {
return "kubectl kollama"
}

return "kollama"
}

func IsOllamaOperatorCRDSupported(discoveryClient discovery.DiscoveryInterface, resourceName string) (bool, error) {
groupVersion := schemaGroupVersion.String()

Expand Down Expand Up @@ -234,26 +257,3 @@ func exposeOllamaModel(

return svc, nil
}

func isKubectlPlugin() (bool, error) {
exec, err := os.Executable()
if err != nil {
return false, err
}

basename := filepath.Base(exec)
if strings.HasPrefix(basename, "kubectl-") {
return true, nil
}

return false, nil
}

func command() string {
is, _ := isKubectlPlugin()
if is {
return "kubectl ollama"
}

return "kollama"
}

0 comments on commit fb5e132

Please sign in to comment.