Skip to content

Commit 44ad64f

Browse files
authored
Merge pull request #181 from kagent-dev/peterj/addistioversion
add istioctl version command
2 parents 119c230 + 502d423 commit 44ad64f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

python/src/kagent/tools/istio/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
ProxyConfig,
1010
ProxyStatus,
1111
RemoteClusters,
12+
Version,
1213
WaypointStatus,
1314
ZTunnelConfig,
1415
)
@@ -24,6 +25,7 @@
2425
"ProxyConfig",
2526
"ProxyStatus",
2627
"RemoteClusters",
28+
"Version",
2729
"WaypointStatus",
2830
"ZTunnelConfig",
2931
]

python/src/kagent/tools/istio/_istioctl.py

+12
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ async def _generate_manifest(
102102
return _run_istioctl_command(f"manifest generate --set profile={profile}")
103103

104104

105+
async def _version() -> str:
106+
return _run_istioctl_command("version")
107+
108+
109+
version = FunctionTool(
110+
_version,
111+
description="Returns the Istio CLI client version, control plane and the data plane versions and number of proxies running in the cluster. If Istio is not installed, it will return the Istio CLI client version.",
112+
name="version",
113+
)
114+
115+
Version, VersionConfig = create_typed_fn_tool(version, "kagent.tools.istio.Version", "Version")
116+
105117
ztunnel_config = FunctionTool(
106118
_ztunnel_config,
107119
description="Get ztunnel configuration",

0 commit comments

Comments
 (0)