Skip to content

fix: only inject provider env vars when credentials are configured#141

Draft
khaledsulayman wants to merge 1 commit intosallyom:mainfrom
khaledsulayman:fix/issue-140-conditional-provider-env-vars
Draft

fix: only inject provider env vars when credentials are configured#141
khaledsulayman wants to merge 1 commit intosallyom:mainfrom
khaledsulayman:fix/issue-140-conditional-provider-env-vars

Conversation

@khaledsulayman
Copy link
Copy Markdown

@khaledsulayman khaledsulayman commented Apr 25, 2026

Summary

  • Fixes CrashLoopBackOff after switching model provider on redeploy #140 — CrashLoopBackOff after switching model provider on redeploy
  • Makes provider env var injection in deploymentManifest() conditional, matching the existing conditional logic in secretManifest()
  • Adds regression test for custom-endpoint-only deployments

Test plan

  • npm run build passes
  • npm run lint passes
  • npm test — all k8s-manifests tests pass (22/22), including new regression test
  • Deploy first with OpenAI key then with custom endpoint

…loses sallyom#140)

The Deployment manifest unconditionally injected secretKeyRef env vars
for all providers, but the Secret only contained keys for the selected
provider. OpenClaw's secrets reloader treated the referenced-but-empty
vars as fatal, causing CrashLoopBackOff when switching providers.

Co-Authored-By: Claude <noreply@anthropic.com>
@khaledsulayman khaledsulayman marked this pull request as draft April 25, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CrashLoopBackOff after switching model provider on redeploy

1 participant