-
Notifications
You must be signed in to change notification settings - Fork 365
feat: enhance kagent deploy command to support .env file for environm… #1063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the kagent deploy command to support loading environment variables from a .env file instead of requiring separate --api-key or --api-key-secret flags. The .env file must contain the model provider API key along with any other environment variables needed by the agent.
Key changes:
- Replaced
--api-keyand--api-key-secretflags with a single--env-fileflag that accepts a path to a.envfile - Added validation to check for required environment variables and warn about missing optional variables
- Implemented automatic deployment restart after updates to ensure environment variable changes take effect
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| go/cli/internal/cli/agent/deploy.go | Core implementation: added .env file parsing, validation, secret creation from env vars, and deployment restart functionality |
| go/cli/cmd/kagent/main.go | Updated CLI interface: replaced API key flags with env-file flag and updated command documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0c74712 to
bb3192b
Compare
…ent variables Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
e716af6 to
3199c51
Compare
kagent-dev#1063) …ent variables Fixes kagent-dev#1048 --------- Signed-off-by: Peter Jausovec <peter.jausovec@solo.io> Signed-off-by: killjoycircuit <rutujdhawale@gmail.com>
…ent variables
Fixes #1048