Skip to content
Open
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
13 changes: 13 additions & 0 deletions .github/workflows/gevals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
contains(github.event.comment.body, '/run-gevals'))
outputs:
should-run: ${{ steps.check.outputs.should-run }}
kiali-run: ${{ steps.check.outputs.kiali-run }}
pr-number: ${{ steps.check.outputs.pr-number }}
pr-ref: ${{ steps.check.outputs.pr-ref }}
steps:
Expand All @@ -77,6 +78,12 @@ jobs:
echo "should-run=true" >> $GITHUB_OUTPUT
echo "pr-ref=${{ github.ref }}" >> $GITHUB_OUTPUT
fi
TASK_FILTER="${{ github.event.inputs.task-filter || '' }}"
if [[ "$TASK_FILTER" =~ kiali ]]; then
echo "kiali-run=true" >> $GITHUB_OUTPUT
else
echo "kiali-run=false" >> $GITHUB_OUTPUT
fi

# Run gevals evaluation with Kind cluster
run-evaluation:
Expand All @@ -98,8 +105,14 @@ jobs:
- name: Setup Kind cluster
run: make kind-create-cluster KIND_CLUSTER_NAME=${{ env.KIND_CLUSTER_NAME }}

- name: Install Istio/Kiali and bookinfo demo
if: needs.check-trigger.outputs.kiali-run == 'true'
run: make setup-kiali

- name: Start MCP server
run: make run-server
env:
TOOLSETS: ${{ needs.check-trigger.outputs.kiali-run == 'true' && 'kiali' || '' }}

- name: Run gevals evaluation
id: gevals
Expand Down
6 changes: 5 additions & 1 deletion build/gevals.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ MCP_HEALTH_INTERVAL ?= 2
.PHONY: run-server
run-server: build ## Start MCP server in background and wait for health check
@echo "Starting MCP server on port $(MCP_PORT)..."
@./$(BINARY_NAME) --port $(MCP_PORT) & echo $$! > .mcp-server.pid
@if [ -n "$(TOOLSETS)" ]; then \
./$(BINARY_NAME) --port $(MCP_PORT) --toolsets $(TOOLSETS) & echo $$! > .mcp-server.pid; \
else \
./$(BINARY_NAME) --port $(MCP_PORT) & echo $$! > .mcp-server.pid; \
fi
@echo "MCP server started with PID $$(cat .mcp-server.pid)"
@echo "Waiting for MCP server to be ready..."
@elapsed=0; \
Expand Down
48 changes: 48 additions & 0 deletions build/kiali.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Kind cluster management

KIND_CLUSTER_NAME ?= kubernetes-mcp-server

# Detect container engine (docker or podman)
CONTAINER_ENGINE ?= $(shell command -v docker 2>/dev/null || command -v podman 2>/dev/null)

##@ Istio

ISTIOCTL = _output/bin/istioctl

$(ISTIOCTL):
@mkdir -p _output/bin
@echo "Downloading istioctl..."
@set -e; \
TMPDIR=$$(mktemp -d); \
cd $$TMPDIR; \
curl -sL https://istio.io/downloadIstio | sh -; \
ISTIODIR=$$(ls -d istio-* | head -n1); \
cp $$ISTIODIR/bin/istioctl $(PWD)/$(ISTIOCTL); \
cd - >/dev/null; \
rm -rf $$TMPDIR; \
echo "istioctl installed at $(ISTIOCTL)"

.PHONY: istioctl
istioctl: $(ISTIOCTL) ## Ensure istioctl is installed to _output/bin/

.PHONY: install-istio
install-istio: istioctl ## Install Istio (demo profile) and enable sidecar injection in default ns
./$(ISTIOCTL) install --set profile=demo -y
kubectl label namespace default istio-injection=enabled --overwrite

.PHONY: install-istio-addons
install-istio-addons: install-istio ## Install Istio addons
kubectl apply -f dev/config/istio/prometheus.yaml -n istio-system
kubectl apply -f dev/config/istio/kiali.yaml -n istio-system
kubectl wait --namespace istio-system --for=condition=available deployment/kiali --timeout=300s
kubectl wait --namespace istio-system --for=condition=available deployment/prometheus --timeout=300s

.PHONY: install-bookinfo-demo
install-bookinfo-demo: ## Install Bookinfo demo
kubectl create ns bookinfo
kubectl label namespace bookinfo istio-discovery=enabled istio.io/rev=default istio-injection=enabled
kubectl apply -f dev/config/istio/bookinfo.yaml -n bookinfo
kubectl wait --for=condition=Ready pod --all -n bookinfo --timeout=300s

.PHONY: setup-kiali
setup-kiali: install-istio-addons install-bookinfo-demo ## Setup Kiali
Loading