Skip to content
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

[MAIN-2918] improved a bash enricher and added an action to run it in a new pod #1697

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Avi-Robusta
Copy link
Contributor

example config

customPlaybooks:
- triggers:
  - on_prometheus_alert:
      alert_name: PodNotReady
  actions:
  - bash_enricher:
      bash_command: cat /etc/secrets/hello.txt
      custom_volume_mounts:
        - name: hello-world-secret-volume
          mountPath: "/etc/secrets"
          readOnly: true
      custom_volumes:
        - name: hello-world-secret-volume
          secret:
            secretName: hello-world-secret
Screen Shot 2025-01-20 at 11 58 05

@Avi-Robusta Avi-Robusta changed the title improved a bash enricher and added an action to run it in a new pod [MAIN-2918] improved a bash enricher and added an action to run it in a new pod Jan 20, 2025
@@ -35,7 +44,33 @@ def node_bash_enricher(event: NodeEvent, params: BashParams):

block_list: List[BaseBlock] = []
exec_result = RobustaPod.exec_in_debugger_pod(
"node-bash-pod", node.metadata.name, params.bash_command, custom_annotations=params.custom_annotations
"node-bash-pod",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please extract and reuse.

block_list: List[BaseBlock] = []
exec_result = RobustaPod.exec_in_debugger_pod(
"bash-pod",
None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix node_ name param definition on exec_in_debugger_pod to include None as valid option.

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.

2 participants