Skip to content

kubernetes: first helm working with monitoring #13

kubernetes: first helm working with monitoring

kubernetes: first helm working with monitoring #13

Workflow file for this run

# Kubernetes helm chart test
name: Kubernetes
on:
workflow_dispatch: # allows manual triggering
push:
branches:
- master
- example/kubernetes # FIXME remove
jobs:
kubernetes:
runs-on: ubuntu-latest
env:
COMMIT_SHA: ${{ github.sha }}
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.1
- uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: true
- name: Set up chart-testing
uses: helm/[email protected]
- name: Install repo
id: install-repo
run: |
ct install --chart-dirs examples/kubernetes/ --charts examples/kubernetes/
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
- name: Create k8s Kind Cluster
id: create_kind_cluster
if: steps.list-changed.outputs.changed == 'true'
uses: container-tools/kind-action@v1
#
# - name: Build and push Docker image
# id: docker_build
# uses: docker/build-push-action@v4
# with:
# driver-opts: network=host
# context: .
# push: true
# platforms: ${{ matrix.config.platforms }}
# tags: 127.0.0.1:5000/server-distroless-llama.cpp:${{ env.COMMIT_SHA }}
# file: .devops/server.distroless.Dockerfile
- name: Docker build
id: docker_build
if: steps.list-changed.outputs.changed == 'true'
run: |
kubectl cluster-info
kubectl get storageclass standard
# Checking env variable
if [[ "$KIND_REGISTRY" != "kind-registry:5000" ]]; then
echo "Wrong KIND_REGISTRY env variable: $KIND_REGISTRY"
exit 1
fi
docker build . -f .devops/server.distroless.Dockerfile -t $KIND_REGISTRY/server-distroless-llama.cpp:${{ env.COMMIT_SHA }}
docker push $KIND_REGISTRY/server-distroless-llama.cpp:${{ env.COMMIT_SHA }}
- name: Deploy prometheus
id: deploy_prometheus
if: steps.list-changed.outputs.changed == 'true'
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack
- name: Deploy llama.cpp server
id: deploy_llama_cpp
if: steps.list-changed.outputs.changed == 'true'
run: |
helm install llama-cpp-stack ./examples/kubernetes/helm-charts
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.1