Skip to content

Conversation

@EItanya
Copy link
Collaborator

@EItanya EItanya commented Sep 9, 2025

  • move agentId to agentRef
  • change khook-controller -> khook
  • fix build file

… build file

Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
@EItanya EItanya changed the title feat: move agentId to agentRef, change khook-controller -> khook, fix… Cleanup post transfer Sep 9, 2025
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Copy link
Collaborator

@antweiss antweiss left a comment

Choose a reason for hiding this comment

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

Thank you for this massive improvement! Found a few small issues. LMK what you think.

// +kubebuilder:validation:Required
EventType string `json:"eventType"`

// AgentId specifies the Kagent agent to call when this event occurs
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably need to update the variable type in the comment to AgentRef too.


```bash
TMP_DIR="$(mktemp -d)" && \
git clone --depth 1 https://github.com/antweiss/khook.git "$TMP_DIR/khook" && \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to update the repo URL to https://github.com/kagent-dev/khook

README.md Outdated
One-liner (no checkout):
```bash
TMP_DIR="$(mktemp -d)" && \
git clone --depth 1 https://github.com/antweiss/khook.git "$TMP_DIR/khook" && \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please update the repo URL to https://github.com/kagent-dev/khook

kind: Hook
metadata:
name: ci-cd-monitoring
namespace: ci-cd
Copy link
Collaborator

Choose a reason for hiding this comment

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

This being an example and hooks being namespaced resources I think it actually makes more sense to stay with ns 'ci-cd' - to show how hooks can be created in any namespace.

kind: Hook
metadata:
name: dev-monitoring
namespace: development
Copy link
Collaborator

Choose a reason for hiding this comment

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

Namespace again. I think examples better show hooks in various namespaces.

kind: Hook
metadata:
name: staging-monitoring
namespace: staging
Copy link
Collaborator

Choose a reason for hiding this comment

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

Namespace

eventConfigurations:
# Monitor pod pending issues in CI/CD environments
- eventType: pod-pending
agentId: kagent/ci-cd-engineer
Copy link
Collaborator

Choose a reason for hiding this comment

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

And maybe add namespace to agentRef so the example explains how agents in other namespaces can be referenced. (I just realized this myself)

Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
@antweiss
Copy link
Collaborator

I pushed a few fixes so that the CRD reflects the agentRef change. But now I'm getting:

Failed to call agent  for event pod-restart on resource baler: failed to create session: HTTP 400: Agent ref is invalid, please check the agent ref : failed to get model: record not found	{"type": "Warning", "object": {"kind":"Hook","namespace":"default","name":"basic-pod-monitoring","uid":"ad3d5638-8899-420c-9c85-862e6d9fd054","apiVersion":"kagent.dev/v1alpha2","resourceVersion":"16000"}, "reason": "AgentCallFailure"}

Need to debug what exactly isn't working here.

@EItanya
Copy link
Collaborator Author

EItanya commented Sep 14, 2025

I pushed a few fixes so that the CRD reflects the agentRef change. But now I'm getting:

Failed to call agent  for event pod-restart on resource baler: failed to create session: HTTP 400: Agent ref is invalid, please check the agent ref : failed to get model: record not found	{"type": "Warning", "object": {"kind":"Hook","namespace":"default","name":"basic-pod-monitoring","uid":"ad3d5638-8899-420c-9c85-862e6d9fd054","apiVersion":"kagent.dev/v1alpha2","resourceVersion":"16000"}, "reason": "AgentCallFailure"}

Need to debug what exactly isn't working here.

I’ll fix this tomorrow

Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
@EItanya EItanya force-pushed the eitanya/api-changes branch from dd93621 to b1bb919 Compare September 15, 2025 14:16
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
@antweiss
Copy link
Collaborator

Working great now! Thanks a lot @EItanya

@antweiss antweiss self-requested a review September 17, 2025 08:56
Copy link
Collaborator

@antweiss antweiss left a comment

Choose a reason for hiding this comment

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

LGTM. thanks @EItanya

@antweiss antweiss merged commit 19089d3 into main Sep 17, 2025
3 checks passed
@antweiss antweiss deleted the eitanya/api-changes branch September 17, 2025 08:57
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.

3 participants