Skip to content

Commit 609befb

Browse files
committed
updated description
1 parent 40934f3 commit 609befb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

playbooks/robusta_playbooks/kubectl_enrichments.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
class KubectlParams(PodRunningParams):
2121
"""
2222
:var kubectl_command: The full kubectl command to run, formatted as a shell command string.
23+
:var description: A description of the command ran.
2324
:var timeout: The maximum time (in seconds) to wait for the kubectl command to complete. Default is 3600 seconds.
2425
"""
2526

2627
command: str = None # type: ignore
28+
description: str = None
2729
timeout: int = 3600
2830

2931

@@ -62,11 +64,12 @@ def kubectl_command(event: ExecutionBaseEvent, params: KubectlParams):
6264
delete_job_post_execution=True,
6365
process_name=False,
6466
)
67+
descriptiont_text = params.description if params.description else "Kubectl Command"
6568
event.add_enrichment(
6669
[
6770
MarkdownBlock(f"*{formatted_kubectl_command}*"),
6871
FileBlock(f"kubectl.txt", kubectl_response.encode()),
69-
], title="Kubectl Command"
72+
], title=descriptiont_text
7073
)
7174
except Exception:
7275
logging.exception("Error running kubectl command")

0 commit comments

Comments
 (0)