Skip to content

Commit 7a3a457

Browse files
ramanv0cursoragent
andcommitted
docs: replace kubectl_apply with generate_kubectl_command
- Remove kubectl_apply (duplicate of kestrel-apply-k8s-manifest block) - Add generate_kubectl_command: AI generates kubectl commands from natural language, output pipeable to kubectl_execute - Sync with latest monorepo operator/docs changes Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent fd2dae3 commit 7a3a457

1 file changed

Lines changed: 42 additions & 9 deletions

File tree

docs/workflows/sdk.mdx

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,47 @@ Trigger.vercel_error_anomaly()
163163
Trigger.vercel_usage_anomaly()
164164
Trigger.vercel_domain_issue()
165165

166-
# Slack Requests (on-demand via /kestrel-workflow)
167-
Trigger.request_k8s_provision()
168-
Trigger.request_k8s_edit()
169-
Trigger.request_k8s_investigate()
170-
Trigger.request_cloud_provision()
171-
Trigger.request_cloud_edit()
172-
Trigger.request_cloud_investigate()
173-
Trigger.request_any()
166+
# Developer Requests (on-demand via Slack /kestrel-workflow, Kestrel Platform UI, or CLI)
167+
Trigger.request_kubernetes() # Kubernetes operations
168+
Trigger.request_cloud() # AWS / Cloud operations
169+
Trigger.request_cloudflare() # Cloudflare operations
170+
Trigger.request_pagerduty() # PagerDuty operations
171+
Trigger.request_datadog() # Datadog operations
172+
Trigger.request_argocd() # ArgoCD operations
173+
Trigger.request_github() # GitHub operations
174+
Trigger.request_gitlab() # GitLab operations
175+
Trigger.request_helm() # Helm operations
176+
Trigger.request_vercel() # Vercel operations
177+
Trigger.request_general() # General (catch-all)
178+
```
179+
180+
Each request trigger can be scoped further:
181+
182+
```python
183+
from kestrel.workflows import Trigger
184+
185+
# Kubernetes requests — only create operations from Slack
186+
Trigger.request_kubernetes().config(
187+
request_sources=["slack"],
188+
request_types=["create"],
189+
)
190+
191+
# Cloud requests — only from Platform UI and CLI
192+
Trigger.request_cloud().config(
193+
request_sources=["platform", "cli"],
194+
)
195+
```
196+
197+
### Submitting Requests Programmatically
198+
199+
```python
200+
# Submit a request (like /kestrel-workflow in Slack)
201+
result = client.workflows.request("create a configmap for my-app in production")
202+
203+
# If clarification is needed:
204+
if result.status == "awaiting_params":
205+
reply = client.workflows.request_reply(result.id, "use the prod-cluster, namespace=payments")
206+
```
174207

175208
# Custom Webhook
176209
Trigger.custom_webhook("my-event-type")
@@ -215,7 +248,7 @@ Action.kestrel_apply_yaml_fix()
215248
Action.kestrel_restart_workload().workload_name("{{incident.workload_name}}").namespace("{{incident.namespace}}")
216249
Action.kestrel_scale_workload().workload_name("{{incident.workload_name}}").namespace("{{incident.namespace}}").replicas(0)
217250
Action.kubectl_execute("get pods -n production") # Run any kubectl command
218-
Action.kubectl_apply("apiVersion: v1\nkind: Namespace\nmetadata:\n name: my-ns") # Apply a manifest
251+
Action.generate_kubectl_command("Find pods in CrashLoopBackOff in production") # AI generates a kubectl command
219252
Action.kestrel_generate_k8s_manifest().resource_type("Deployment").query("Create a deployment for nginx")
220253
Action.kestrel_generate_helm_values().chart_name("nginx-ingress")
221254
Action.kestrel_apply_k8s_manifest()

0 commit comments

Comments
 (0)