-
Notifications
You must be signed in to change notification settings - Fork 372
add Kube controller #12
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
| // ONEOF: maxMessageTermination, textMentionTermination, orTermination | ||
| MaxMessageTermination *MaxMessageTermination `json:"maxMessageTermination,omitempty"` | ||
| TextMentionTermination *TextMentionTermination `json:"textMentionTermination,omitempty"` | ||
| OrTermination *OrTermination `json:"orTermination,omitempty"` |
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.
including OrTermination here creates a recursive datastructure. is that the intent?
| // AutogenModelConfigSpec defines the desired state of AutogenModelConfig. | ||
| type AutogenModelConfigSpec struct { | ||
| Model string `json:"model"` | ||
| APIKeySecret string `json:"apiKeySecret"` |
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.
should this be a ref to a secret?
| ModelConfig string `json:"modelConfig"` | ||
| } | ||
|
|
||
| type TerminationCondition struct { |
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.
Maybe "TerminationType" and add validation:
// +kubebuilder:validation:XValidation:message="There must one termination type set",rule="1 == (self.maxMessageTermination != null?1:0) + (self.textMentionTermination != null?1:0) + (self.orTermination != null?1:0)"
|
|
||
| // AutogenToolSpec defines the desired state of AutogenTool. | ||
| type AutogenToolSpec struct { | ||
| Description string `json:"description,omitempty"` |
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.
Are there additional things we need to define on the tool? https://github.com/microsoft/autogen/blob/2f1684b698e83418d47f54309b426ddfd022f3ee/python/packages/autogen-core/src/autogen_core/tools/_base.py#L77
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.
tool is a placeholder for now; we can fill it out once we have some examples of user-created tools to support
| metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
|
||
| Spec AutogenToolSpec `json:"spec,omitempty"` | ||
| Status AutogenToolStatus `json:"status,omitempty"` |
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.
What would a tool status contain? (Which agents are using it?)
| Name string `json:"name,omitempty"` | ||
| Description string `json:"description,omitempty"` | ||
| SystemMessage string `json:"systemMessage,omitempty"` | ||
| Tools []string `json:"tools,omitempty"` |
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.
This would match the built-in tools name? (ie. k8s.apply_manifest, istio.generate_resource, etc.)
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.
yes or it could also refer to the name of a user-provided tool (defined as a crd)
EItanya
left a comment
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.
Any reason we're not starting our controllers off with krt? It will handle a lot of the boiler plate in terms of finding the dependents etc @yuval-k
|
|
||
| type SelectorTeamConfig struct { | ||
| SelectorPrompt string `json:"selectorPrompt"` | ||
| ModelConfig string `json:"modelConfig"` |
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.
Is this a reference to a ModelSpec? I think this may be overcomplicated for the first go. Agreed that eventually it might be nice to have this defined in one spot, but in 99% of cases defining it inline here is probably easier for the user. What do you think?
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.
Also, will this be the model config used for the whole run, or just for the selector itself?
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.
its a reference to model config
i dont see why users would want to redefine this in every single team cr when the config will be the same when they are using a single llm / api key
| ModelConfig string `json:"modelConfig"` | ||
| } | ||
|
|
||
| // +kubebuilder:validation:XValidation:message="There must one termination type set",rule="1 == (self.maxMessageTermination != null?1:0) + (self.textMentionTermination != null?1:0) + (self.orTermination != null?1:0)" |
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.
I think this API may be a tad overcomplicated, we don't need to fix it now but it may be worth simplifying it in the future. Realistically we can just list the termination conditions, and then have a join_condition or something like that which defaults to or, but can set to and.
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.
it's modeled directly off of autogen. we can always change in the future but i think to keep it simple not overthink / redefine their api with new abstractions
How many dependencies are we talking about? |
add page for agents
Implements all 16 review comments from inFocus7's code review to improve code quality, test consistency, and validation reliability for the TLS configuration feature. Changes: 1. Fix CEL validation syntax (comment kagent-dev#16 - CRITICAL) - Replace != "" with size(field) > 0 for non-empty checks - Replace == "" with size(field) == 0 for empty checks - Fixes validation syntax errors that blocked CRD deployment 2. Remove task tracking comments (comments #1, kagent-dev#13, kagent-dev#14, kagent-dev#15) - Remove "(Task X.Y)" references from test docstrings - Remove obsolete implementation notes about env vars vs agent config - Remove test_openai_client_tls_parameters_override_environment (obsolete) 3. Fix copyright headers (comment #3) - Replace incorrect "Google LLC" copyright with Kagent project copyright - Apply consistent headers across test_ssl.py, test_tls_e2e.py, test_tls_integration.py 4. Migrate Go tests to testify (comments kagent-dev#5, kagent-dev#6) - Add testify/assert and testify/require imports - Replace manual error checks with testify assertions - Add envVarToMapHelper() for O(n) environment variable validation 5. Add golden tests for TLS scenarios (comment kagent-dev#12) - Create tls-with-custom-ca.yaml input - Create tls-with-disabled-verify.yaml input - Create tls-with-system-cas-disabled.yaml input - Generate golden outputs to catch TLS mounting regressions 6. Improve Python test quality (comments #2, kagent-dev#4, kagent-dev#9) - Remove redundant test case from test_ssl.py - Add test_e2e_openai_client_fails_without_custom_ca (negative test) - Simplify E2E_TEST_SUMMARY.md (72% reduction, remove task references) 7. Use OpenAI SDK's DefaultAsyncHttpxClient (comments kagent-dev#7, kagent-dev#8) - Replace custom httpx.AsyncClient with DefaultAsyncHttpxClient - Preserves OpenAI SDK defaults for timeout, pooling, and redirects - Add tests to verify SDK defaults are maintained 8. Fix documentation links (comment kagent-dev#10) - Update broken troubleshooting links to https://kagent.dev/docs 9. Document future enhancement (comment kagent-dev#11) - Created GitHub issue kagent-dev#1091 for automatic agent redeployment on secret changes Test results: - All Go tests pass (11 golden tests including 3 new TLS scenarios) - All Python tests pass (15 tests including 2 new tests) - CRD validation working correctly with proper error messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Implements all 16 review comments from inFocus7's code review to improve code quality, test consistency, and validation reliability for the TLS configuration feature. Changes: 1. Fix CEL validation syntax (comment kagent-dev#16 - CRITICAL) - Replace != "" with size(field) > 0 for non-empty checks - Replace == "" with size(field) == 0 for empty checks - Fixes validation syntax errors that blocked CRD deployment 2. Remove task tracking comments (comments #1, kagent-dev#13, kagent-dev#14, kagent-dev#15) - Remove "(Task X.Y)" references from test docstrings - Remove obsolete implementation notes about env vars vs agent config - Remove test_openai_client_tls_parameters_override_environment (obsolete) 3. Fix copyright headers (comment #3) - Replace incorrect "Google LLC" copyright with Kagent project copyright - Apply consistent headers across test_ssl.py, test_tls_e2e.py, test_tls_integration.py 4. Migrate Go tests to testify (comments kagent-dev#5, kagent-dev#6) - Add testify/assert and testify/require imports - Replace manual error checks with testify assertions - Add envVarToMapHelper() for O(n) environment variable validation 5. Add golden tests for TLS scenarios (comment kagent-dev#12) - Create tls-with-custom-ca.yaml input - Create tls-with-disabled-verify.yaml input - Create tls-with-system-cas-disabled.yaml input - Generate golden outputs to catch TLS mounting regressions 6. Improve Python test quality (comments #2, kagent-dev#4, kagent-dev#9) - Remove redundant test case from test_ssl.py - Add test_e2e_openai_client_fails_without_custom_ca (negative test) - Simplify E2E_TEST_SUMMARY.md (72% reduction, remove task references) 7. Use OpenAI SDK's DefaultAsyncHttpxClient (comments kagent-dev#7, kagent-dev#8) - Replace custom httpx.AsyncClient with DefaultAsyncHttpxClient - Preserves OpenAI SDK defaults for timeout, pooling, and redirects - Add tests to verify SDK defaults are maintained 8. Fix documentation links (comment kagent-dev#10) - Update broken troubleshooting links to https://kagent.dev/docs 9. Document future enhancement (comment kagent-dev#11) - Created GitHub issue kagent-dev#1091 for automatic agent redeployment on secret changes Test results: - All Go tests pass (11 golden tests including 3 new TLS scenarios) - All Python tests pass (15 tests including 2 new tests) - CRD validation working correctly with proper error messages
initializes the kube controller component of kagent