Skip to content
Merged
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
33 changes: 26 additions & 7 deletions .github/workflows/deploy-community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,41 @@ jobs:
echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > /tmp/kubeconfig
echo "KUBECONFIG=/tmp/kubeconfig" >> $GITHUB_ENV

- name: Cleanup Stale Resources
run: |
echo "🧹 Cleaning up stale resources from old architecture..."

# Delete old orchestrator deployment (no longer in chart)
if kubectl get deployment $DEPLOYMENT_NAME-orchestrator -n $NAMESPACE 2>/dev/null; then
echo "🗑️ Deleting stale orchestrator deployment..."
kubectl delete deployment $DEPLOYMENT_NAME-orchestrator -n $NAMESPACE --ignore-not-found=true
fi

# Delete old dispatcher deployment (no longer in chart)
if kubectl get deployment $DEPLOYMENT_NAME-dispatcher -n $NAMESPACE 2>/dev/null; then
echo "🗑️ Deleting stale dispatcher deployment..."
kubectl delete deployment $DEPLOYMENT_NAME-dispatcher -n $NAMESPACE --ignore-not-found=true
fi

# Clean up any orphan pods from old deployments
kubectl delete pods -n $NAMESPACE -l app.kubernetes.io/component=orchestrator --ignore-not-found=true 2>/dev/null || true
kubectl delete pods -n $NAMESPACE -l app.kubernetes.io/component=dispatcher --ignore-not-found=true 2>/dev/null || true

echo "✅ Stale resources cleanup complete"

- name: Check and Fix Helm Release State
run: |
echo "🔍 Checking Helm release state..."

# Check all releases including failed ones
echo "📋 All Helm releases in namespace:"
helm list -n $NAMESPACE --all

# Check if release exists (including pending/failed states)
if helm list -n $NAMESPACE --all | grep -q $DEPLOYMENT_NAME; then
RELEASE_STATUS=$(helm list -n $NAMESPACE --all -o json | jq -r ".[] | select(.name==\"$DEPLOYMENT_NAME\") | .status")
echo "📊 Current release status: $RELEASE_STATUS"

# Handle different states
case "$RELEASE_STATUS" in
"pending-install"|"pending-upgrade"|"pending-rollback")
Expand All @@ -113,7 +135,7 @@ jobs:
else
echo "📝 No existing release found, will install fresh..."
fi

echo "✅ Helm release check complete"

- name: Deploy with make
Expand Down Expand Up @@ -168,7 +190,4 @@ jobs:
echo ""
echo "📝 Recent Logs from Gateway:"
kubectl logs -n $NAMESPACE deployment/$DEPLOYMENT_NAME-gateway --tail=20 || true
echo ""
echo "📝 Recent Logs from Orchestrator:"
kubectl logs -n $NAMESPACE deployment/$DEPLOYMENT_NAME-orchestrator --tail=20 || true

3 changes: 3 additions & 0 deletions charts/peerbot/values-community.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,13 @@ ingress:

# Slack configuration
slack:
enabled: true # Enable Slack platform
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium

Good fix! This resolves the root cause where SLACK_BOT_TOKEN wasn't being rendered as an environment variable in the gateway deployment. The template at charts/peerbot/templates/gateway-deployment.yaml conditionally includes Slack env vars only when slack.enabled: true.

Note: There's a related issue in charts/peerbot/templates/service-loadbalancer.yaml:20 where the selector still uses app.kubernetes.io/component: dispatcher instead of gateway. This would prevent the LoadBalancer from routing traffic to pods. Consider filing a follow-up issue to fix this.

Agent: 🏛 Architecture • Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: buremba/peerbot#93
File: charts/peerbot/values-community.yaml#L78
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
Good fix! This resolves the root cause where SLACK_BOT_TOKEN wasn't being rendered as an environment variable in the gateway deployment. The template at `charts/peerbot/templates/gateway-deployment.yaml` conditionally includes Slack env vars only when `slack.enabled: true`.

Note: There's a related issue in `charts/peerbot/templates/service-loadbalancer.yaml:20` where the selector still uses `app.kubernetes.io/component: dispatcher` instead of `gateway`. This would prevent the LoadBalancer from routing traffic to pods. Consider filing a follow-up issue to fix this.

port: 3000
socketMode: false # HTTP mode required for web access/ingress
allowDirectMessages: true
allowPrivateChannels: true
enableStatusReactions: true
enableProgressUpdates: true

# Claude configuration
claude:
Expand Down
Loading