Skip to content
Closed
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
63 changes: 63 additions & 0 deletions .github/workflows/deploy-llama-stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy Llama Stack K8s Operator

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Install Kind
uses: helm/kind-action@v1.8.0
with:
version: v0.20.0
cluster_name: llama-stack-cluster
wait: 120s

- name: Install kubectl
uses: azure/setup-kubectl@v3
with:
version: 'latest'

- name: checkout the operator repository
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: opendatahub-io/llama-stack-k8s-operator.git
ref: main
path: llama-stack-k8s-operator

- name: make the image and load it into kind
run: |
pwd
cd llama-stack-k8s-operator
IMG=quay.io/redhat-et/llama-stack-operator:v1 make docker-build
podman save quay.io/redhat-et/llama-stack-operator:v1 -o llama-stack-operator.tar
# load the tar file into kind
kind load image-archive llama-stack-operator.tar --name llama-stack-cluster
make deploy IMG=quay.io/redhat-et/llama-stack-operator:v1

- name: Wait until the llama-stack-operator and namespace is ready
run: |
sleep 10
kubectl wait --for=condition=available --timeout=60s deployment/llama-stack-k8s-operator-controller-manager -n llama-stack-k8s-operator-system

- name: Install Llama Stack Operator and always list the pods regardless if the previous step failed
if: always()
run: |
cd ..
pwd
kubectl get po -A
kubectl get events -n llama-stack-k8s-operator-system
23 changes: 23 additions & 0 deletions kubernetes/llamastack-operator/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: llama.x-k8s.io/v1alpha1
kind: LlamaStackaDistribution
metadata:
name: llamastackdistribution-sample
namespace: <user-defined-namespace>
spec:
replicas: 1
server:
containerSpec:
image: "llamastack/distribution-ollama:latest"
port: 8321
env:
- name: INFERENCE_MODEL
value: "meta-llama/Llama-3.2-3B-Instruct"
- name: OLLAMA_URL
value: "http://ollama-server-service.default.svc.cluster.local:11434"
podOverrides:
volumes:
- name: llama-storage
emptyDir: {}
volumeMounts:
- name: llama-storage
mountPath: "/root/.llama"
Loading