robusta-cli 0.10.26a1__tar.gz → 0.10.27__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/PKG-INFO +2 -2
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/pyproject.toml +3 -2
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/_version.py +1 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/api/__init__.py +1 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/main.py +13 -4
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/discovery/discovery.py +3 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/exceptions.py +0 -4
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/base_params.py +7 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/cluster_status.py +0 -8
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/env_vars.py +3 -3
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/events.py +8 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/base_trigger.py +3 -3
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/internal/discovery_events.py +2 -2
- robusta_cli-0.10.27/src/robusta/core/playbooks/oom_killer_utils.py +78 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/playbook_utils.py +4 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/playbooks_event_handler_impl.py +8 -4
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/pod_utils/imagepull_utils.py +16 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/reporting/base.py +1 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/reporting/blocks.py +31 -9
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/schedule/scheduler.py +1 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/jira/jira_sink_params.py +5 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/kafka/kafka_sink.py +5 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/kafka/kafka_sink_params.py +1 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/dal/supabase_dal.py +45 -29
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/prometheus_health_checker.py +2 -3
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/robusta_sink.py +11 -11
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/rrm/account_resource_fetcher.py +6 -5
- robusta_cli-0.10.27/src/robusta/core/sinks/robusta/rrm/base_resource_manager.py +13 -0
- robusta_cli-0.10.27/src/robusta/core/sinks/robusta/rrm/prometheus_alert_resource_manager.py +202 -0
- robusta_cli-0.10.27/src/robusta/core/sinks/robusta/rrm/rrm.py +81 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/rrm/types.py +3 -48
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/sink_base.py +15 -2
- robusta_cli-0.10.27/src/robusta/core/sinks/sink_base_params.py +96 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/slack/slack_sink_params.py +32 -8
- robusta_cli-0.10.27/src/robusta/core/sinks/timing.py +67 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/webhook/webhook_sink.py +37 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/webhook/webhook_sink_params.py +1 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/triggers/custom_triggers.py +2 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/triggers/error_event_trigger.py +7 -7
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/triggers/helm_releases_triggers.py +19 -12
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/triggers/job_failed_trigger.py +5 -3
- robusta_cli-0.10.27/src/robusta/core/triggers/multi_resources_trigger.py +55 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/triggers/oom_killed_trigger_base.py +4 -4
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/triggers/pod_crash_loop_trigger.py +5 -3
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/triggers/pod_image_pull_backoff.py +4 -3
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/common/requests.py +6 -0
- robusta_cli-0.10.27/src/robusta/integrations/jira/client.py +294 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/jira/sender.py +24 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/base_triggers.py +13 -3
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/mail/sender.py +16 -7
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/mattermost/client.py +1 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/prometheus/models.py +1 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/prometheus/trigger.py +10 -13
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/prometheus/utils.py +7 -7
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/receiver.py +3 -3
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/rocketchat/sender.py +7 -2
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/slack/sender.py +26 -13
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/model/config.py +21 -26
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/patch/patch.py +20 -1
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/config_loader.py +13 -4
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/main.py +2 -5
- robusta_cli-0.10.27/src/robusta/runner/process_setup.py +18 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/web.py +2 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/common.py +0 -7
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/service_discovery.py +3 -1
- robusta_cli-0.10.26a1/src/robusta/core/sinks/robusta/rrm/base_resource_manager.py +0 -37
- robusta_cli-0.10.26a1/src/robusta/core/sinks/robusta/rrm/prometheus_alert_resource_manager.py +0 -288
- robusta_cli-0.10.26a1/src/robusta/core/sinks/robusta/rrm/rrm.py +0 -59
- robusta_cli-0.10.26a1/src/robusta/core/sinks/sink_base_params.py +0 -45
- robusta_cli-0.10.26a1/src/robusta/integrations/jira/client.py +0 -145
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/LICENSE +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/auth.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/backend_profile.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/eula.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/integrations_cmd.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/playbooks_cmd.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/self_host.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/slack_feedback_message.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/slack_verification.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/cli/utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/discovery/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/discovery/resource_names.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/discovery/top_service_resolver.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/discovery/utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/helm_release.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/jobs.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/k8s_operation_type.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/namespaces.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/nodes.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/pods.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/runner_config.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/model/services.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/persistency/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/persistency/in_memory.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/persistency/scheduled_jobs_states_dal.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/actions_registry.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/common.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/container_playbook_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/generation.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/job_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/node_playbook_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/playbooks_event_handler.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/pod_utils/crashloop_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/pod_utils/pending_pod_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/prometheus_enrichment_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/playbooks/trigger.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/reporting/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/reporting/action_requests.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/reporting/callbacks.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/reporting/consts.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/reporting/custom_rendering.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/reporting/finding_subjects.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/reporting/utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/schedule/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/schedule/model.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/datadog/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/datadog/datadog_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/datadog/datadog_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/discord/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/discord/discord_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/discord/discord_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/file/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/file/file_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/file/file_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/file/object_traverser.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/jira/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/jira/jira_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/kafka/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/mail/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/mail/mail_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/mail/mail_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/mattermost/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/mattermost/mattermost_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/mattermost/mattermost_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/msteams/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/msteams/msteams_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/msteams/msteams_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/opsgenie/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/opsgenie/opsgenie_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/opsgenie/opsgenie_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/pagerduty/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/pagerduty/pagerduty_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/pagerduty/pagerduty_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/dal/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/dal/model_conversion.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/discovery_metrics.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/robusta_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/robusta/rrm/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/rocketchat/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/rocketchat/rocketchat_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/rocketchat/rocketchat_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/sink_config.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/sink_factory.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/slack/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/slack/slack_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/telegram/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/telegram/telegram_client.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/telegram/telegram_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/telegram/telegram_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/transformer.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/victorops/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/victorops/victorops_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/victorops/victorops_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/webex/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/webex/webex_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/webex/webex_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/webhook/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/yamessenger/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/yamessenger/yamessenger_client.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/yamessenger/yamessenger_sink.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/yamessenger/yamessenger_sink_params.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/triggers/container_oom_killed_trigger.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/triggers/pod_oom_killed_trigger.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/argocd/argocd_client.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/common/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/discord/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/discord/sender.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/git/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/git/git_repo.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/grafana.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/helper.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/jira/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/api_client_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/autogenerated/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/autogenerated/events.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/autogenerated/models.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/autogenerated/triggers.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/autogenerated/v1/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/autogenerated/v1/models.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/base_event.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/custom_models.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/model_not_found_exception.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/process_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/kubernetes/templates.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/mail/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/mattermost/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/mattermost/sender.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_adaptive_card_files.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_adaptive_card_files_image.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_adaptive_card_files_text.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_elements/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_elements/msteams_action.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_elements/msteams_base.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_elements/msteams_card.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_elements/msteams_column.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_elements/msteams_container.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_elements/msteams_images.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_elements/msteams_table.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_elements/msteams_text_block.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_mark_down_fix_url.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/msteams_msg.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/msteams/sender.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/prometheus/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/resource_analysis/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/resource_analysis/cpu_analyzer.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/resource_analysis/memory_analyzer.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/resource_analysis/node_cpu_analyzer.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/resource_analysis/prometheus_analyzer.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/rocketchat/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/scheduled/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/scheduled/event.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/scheduled/models.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/scheduled/playbook_scheduler.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/scheduled/playbook_scheduler_manager.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/scheduled/playbook_scheduler_manager_impl.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/scheduled/trigger.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/slack/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/webex/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/integrations/webex/sender.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/model/alert_relabel_config.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/model/playbook_action.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/model/playbook_definition.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/log_init.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/not_found_exception.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/object_updater.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/ssl_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/telemetry.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/telemetry_service.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/runner/web_api.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/__init__.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/auth_provider.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/base64_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/cluster_provider_discovery.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/decorators.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/docs.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/documented_pydantic.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/error_codes.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/file_system_watcher.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/function_hashes.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/json_schema.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/parsing.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/rate_limiter.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/server_start.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/silence_utils.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/stack_tracer.py +0 -0
- {robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/utils/task_queue.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: robusta-cli
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.27
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Natan Yellin
|
|
6
6
|
Author-email: aantn@users.noreply.github.com
|
|
@@ -34,7 +34,7 @@ Requires-Dist: markdown2 (>=2.4.2,<3.0.0)
|
|
|
34
34
|
Requires-Dist: opsgenie-sdk (>=2.1.5,<3.0.0)
|
|
35
35
|
Requires-Dist: poetry-core (==1.1.0a7) ; extra == "all"
|
|
36
36
|
Requires-Dist: prometheus-client (>=0.12.0,<0.13.0)
|
|
37
|
-
Requires-Dist: prometrix (==0.1.
|
|
37
|
+
Requires-Dist: prometrix (==0.1.15)
|
|
38
38
|
Requires-Dist: pydantic (>=1.8.1,<2.0.0)
|
|
39
39
|
Requires-Dist: pymsteams (>=0.1.16,<0.2.0)
|
|
40
40
|
Requires-Dist: pytz (>=2021.3,<2022.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "robusta-cli"
|
|
3
|
-
version = "0.10.
|
|
3
|
+
version = "0.10.27"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["Natan Yellin <aantn@users.noreply.github.com>"]
|
|
6
6
|
packages = [
|
|
@@ -65,7 +65,7 @@ cryptography = "^36.0.0"
|
|
|
65
65
|
PyJWT = "2.4.0"
|
|
66
66
|
fpdf2 = "^2.7.1"
|
|
67
67
|
attrs = "^23.1.0"
|
|
68
|
-
prometrix = "0.1.
|
|
68
|
+
prometrix = "0.1.15"
|
|
69
69
|
hikaru-model-26 = "^1.1.1"
|
|
70
70
|
apprise = "^1.5.0"
|
|
71
71
|
rocketchat-api = "^1.30.0"
|
|
@@ -115,6 +115,7 @@ all = ["Flask", "grafana-api", "watchdog", "dulwich", "better-exceptions", "Cair
|
|
|
115
115
|
[tool.poetry.group.dev.dependencies]
|
|
116
116
|
sphinx-jinja = { git = "https://github.com/robusta-dev/sphinx-jinja.git" }
|
|
117
117
|
sphinx-reredirects = "^0.1.1"
|
|
118
|
+
freezegun = "^1.4.0"
|
|
118
119
|
|
|
119
120
|
[build-system]
|
|
120
121
|
requires = ["poetry-core>=1.0.0"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# this is updated by .github/workflows/release.yaml
|
|
2
|
-
__version__ = "0.10.
|
|
2
|
+
__version__ = "0.10.27"
|
|
@@ -11,7 +11,7 @@ from typing import Dict, List, Optional, Union
|
|
|
11
11
|
import certifi
|
|
12
12
|
import typer
|
|
13
13
|
import yaml
|
|
14
|
-
from hikaru.model.rel_1_26 import Container, Job, JobSpec, ObjectMeta, PodSpec, PodTemplateSpec
|
|
14
|
+
from hikaru.model.rel_1_26 import Container, Job, JobSpec, ObjectMeta, PodSpec, PodTemplateSpec, SecurityContext
|
|
15
15
|
from kubernetes import client, config
|
|
16
16
|
from pydantic import BaseModel, Extra
|
|
17
17
|
|
|
@@ -217,9 +217,10 @@ def gen_config(
|
|
|
217
217
|
token = json.loads(base64.b64decode(robusta_api_key))
|
|
218
218
|
account_id = token.get("account_id", account_id)
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
# Make sure the UI sink (if enabled) is the first one. See MAIN-1088.
|
|
221
|
+
sinks_config = [
|
|
221
222
|
RobustaSinkConfigWrapper(robusta_sink=RobustaSinkParams(name="robusta_ui_sink", token=robusta_api_key))
|
|
222
|
-
|
|
223
|
+
] + sinks_config
|
|
223
224
|
enable_platform_playbooks = True
|
|
224
225
|
disable_cloud_routing = False
|
|
225
226
|
|
|
@@ -288,6 +289,13 @@ def gen_config(
|
|
|
288
289
|
},
|
|
289
290
|
]
|
|
290
291
|
|
|
292
|
+
if is_small_cluster:
|
|
293
|
+
setattr(values, "kube-prometheus-stack", {})
|
|
294
|
+
kube_stack = getattr(values, "kube-prometheus-stack")
|
|
295
|
+
kube_stack["prometheus"] = {
|
|
296
|
+
"prometheusSpec": {"resources": {"requests": {"memory": "300Mi"}, "limits": {"memory": "300Mi"}}},
|
|
297
|
+
}
|
|
298
|
+
|
|
291
299
|
write_values_file(output_path, values)
|
|
292
300
|
|
|
293
301
|
if robusta_api_key:
|
|
@@ -426,7 +434,7 @@ def demo_alert(
|
|
|
426
434
|
alertmanager_url = AlertManagerDiscovery.find_alert_manager_url()
|
|
427
435
|
if not alertmanager_url:
|
|
428
436
|
typer.secho(
|
|
429
|
-
"Alertmanager service could not be auto-discovered. " "Please use the --
|
|
437
|
+
"Alertmanager service could not be auto-discovered. " "Please use the --alertmanager-url parameter",
|
|
430
438
|
fg="red",
|
|
431
439
|
)
|
|
432
440
|
return
|
|
@@ -493,6 +501,7 @@ def demo_alert(
|
|
|
493
501
|
name="alert-curl",
|
|
494
502
|
image=image,
|
|
495
503
|
command=command,
|
|
504
|
+
securityContext=SecurityContext(runAsUser=2000),
|
|
496
505
|
)
|
|
497
506
|
],
|
|
498
507
|
restartPolicy="Never",
|
|
@@ -41,6 +41,7 @@ from robusta.core.model.helm_release import HelmRelease
|
|
|
41
41
|
from robusta.core.model.jobs import JobInfo
|
|
42
42
|
from robusta.core.model.namespaces import NamespaceInfo
|
|
43
43
|
from robusta.core.model.services import ContainerInfo, ServiceConfig, ServiceInfo, VolumeInfo
|
|
44
|
+
from robusta.patch.patch import create_monkey_patches
|
|
44
45
|
from robusta.utils.cluster_provider_discovery import cluster_provider
|
|
45
46
|
from robusta.utils.stack_tracer import StackTracer
|
|
46
47
|
|
|
@@ -135,6 +136,7 @@ class Discovery:
|
|
|
135
136
|
|
|
136
137
|
@staticmethod
|
|
137
138
|
def discovery_process() -> DiscoveryResults:
|
|
139
|
+
create_monkey_patches()
|
|
138
140
|
Discovery.stacktrace_thread_active = True
|
|
139
141
|
threading.Thread(target=Discovery.stack_dump_on_signal).start()
|
|
140
142
|
pods_metadata: List[V1ObjectMeta] = []
|
|
@@ -347,7 +349,7 @@ class Discovery:
|
|
|
347
349
|
continue_ref: Optional[str] = None
|
|
348
350
|
for _ in range(DISCOVERY_MAX_BATCHES):
|
|
349
351
|
secrets = client.CoreV1Api().list_secret_for_all_namespaces(
|
|
350
|
-
label_selector=
|
|
352
|
+
label_selector="owner=helm", _continue=continue_ref
|
|
351
353
|
)
|
|
352
354
|
if not secrets.items:
|
|
353
355
|
break
|
|
@@ -194,7 +194,9 @@ class TimedPrometheusParams(PrometheusParams):
|
|
|
194
194
|
class CustomGraphEnricherParams(PrometheusParams):
|
|
195
195
|
"""
|
|
196
196
|
:var promql_query: Promql query. You can use $pod, $node and $node_internal_ip to template (see example). For more information, see https://prometheus.io/docs/prometheus/latest/querying/basics/
|
|
197
|
-
:var graph_title: A nicer name for the Prometheus query.
|
|
197
|
+
:var graph_title: A nicer name for the Prometheus query. The graph_title may include template variables like $name, $namespace, $node, $container etc...
|
|
198
|
+
|
|
199
|
+
|
|
198
200
|
:var graph_duration_minutes: Graph duration is minutes.
|
|
199
201
|
:var chart_values_format: Customize the y-axis labels with one of: Plain, Bytes, Percentage (see ChartValuesFormat)
|
|
200
202
|
|
|
@@ -306,3 +308,7 @@ class LogEnricherParams(ActionParams):
|
|
|
306
308
|
regex_replacement_style: Optional[str] = None
|
|
307
309
|
previous: bool = False
|
|
308
310
|
filter_regex: Optional[str] = None
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
class OomKillParams(ActionParams):
|
|
314
|
+
attach_logs: Optional[bool] = False
|
|
@@ -34,14 +34,12 @@ INTERNAL_PLAYBOOKS_ROOT = os.environ.get("INTERNAL_PLAYBOOKS_ROOT", "/app/src/ro
|
|
|
34
34
|
DEFAULT_TIMEZONE = pytz.timezone(os.environ.get("DEFAULT_TIMEZONE", "UTC"))
|
|
35
35
|
NUM_EVENT_THREADS = int(os.environ.get("NUM_EVENT_THREADS", 20))
|
|
36
36
|
INCOMING_EVENTS_QUEUE_MAX_SIZE = int(os.environ.get("INCOMING_EVENTS_QUEUE_MAX_SIZE", 500))
|
|
37
|
-
ALERT_BUILDER_WORKERS = int(os.environ.get("ALERT_BUILDER_WORKERS", 5))
|
|
38
|
-
ALERTS_WORKERS_POOL = load_bool("ALERTS_WORKERS_POOL", False)
|
|
39
37
|
|
|
40
38
|
FLOAT_PRECISION_LIMIT = int(os.environ.get("FLOAT_PRECISION_LIMIT", 11))
|
|
41
39
|
|
|
42
40
|
PROMETHEUS_REQUEST_TIMEOUT_SECONDS = float(os.environ.get("PROMETHEUS_REQUEST_TIMEOUT_SECONDS", 90.0))
|
|
43
41
|
PROMETHEUS_ENABLED = os.environ.get("PROMETHEUS_ENABLED", "false").lower() == "true"
|
|
44
|
-
|
|
42
|
+
MANAGED_CONFIGURATION_ENABLED = os.environ.get("MANAGED_CONFIGURATION_ENABLED", "false").lower() == "true"
|
|
45
43
|
PROMETHEUS_SSL_ENABLED = os.environ.get("PROMETHEUS_SSL_ENABLED", "false").lower() == "true"
|
|
46
44
|
|
|
47
45
|
INCOMING_REQUEST_TIME_WINDOW_SECONDS = int(os.environ.get("INCOMING_REQUEST_TIME_WINDOW_SECONDS", 3600))
|
|
@@ -101,3 +99,5 @@ RRM_PERIOD_SEC = int(os.environ.get("RRM_PERIOD_SEC", 90))
|
|
|
101
99
|
MAX_ALLOWED_RULES_PER_CRD_ALERT = int(os.environ.get("MAX_ALLOWED_RULES_PER_CRD_ALERT", 600))
|
|
102
100
|
|
|
103
101
|
IMAGE_REGISTRY = os.environ.get("IMAGE_REGISTRY", "us-central1-docker.pkg.dev/genuine-flight-317411/devel")
|
|
102
|
+
|
|
103
|
+
CLUSTER_DOMAIN = os.environ.get("CLUSTER_DOMAIN", "cluster.local")
|
|
@@ -129,6 +129,14 @@ class ExecutionBaseEvent:
|
|
|
129
129
|
if aggregation_key:
|
|
130
130
|
finding.aggregation_key = aggregation_key
|
|
131
131
|
|
|
132
|
+
def extend_description(self, text: str):
|
|
133
|
+
for sink in self.named_sinks:
|
|
134
|
+
for finding in self.sink_findings[sink]:
|
|
135
|
+
if not finding.description:
|
|
136
|
+
finding.description = text
|
|
137
|
+
else:
|
|
138
|
+
finding.description += f"\n\n{text}"
|
|
139
|
+
|
|
132
140
|
@staticmethod
|
|
133
141
|
def from_params(params: ExecutionEventBaseParams) -> Optional["ExecutionBaseEvent"]:
|
|
134
142
|
return ExecutionBaseEvent(named_sinks=params.named_sinks)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import abc
|
|
2
|
-
from typing import Dict, List, Optional, Type
|
|
2
|
+
from typing import Any, Dict, List, Optional, Type
|
|
3
3
|
|
|
4
4
|
from pydantic import BaseModel
|
|
5
5
|
|
|
@@ -23,11 +23,11 @@ class BaseTrigger(DocumentedModel):
|
|
|
23
23
|
def get_trigger_event(self) -> str:
|
|
24
24
|
pass
|
|
25
25
|
|
|
26
|
-
def should_fire(self, event: TriggerEvent, playbook_id: str):
|
|
26
|
+
def should_fire(self, event: TriggerEvent, playbook_id: str, build_context: Dict[str, Any]):
|
|
27
27
|
return True
|
|
28
28
|
|
|
29
29
|
def build_execution_event(
|
|
30
|
-
self, event: TriggerEvent, sink_findings: Dict[str, List[Finding]]
|
|
30
|
+
self, event: TriggerEvent, sink_findings: Dict[str, List[Finding]], build_context: Dict[str, Any]
|
|
31
31
|
) -> Optional[ExecutionBaseEvent]:
|
|
32
32
|
pass
|
|
33
33
|
|
|
@@ -63,7 +63,7 @@ def create_debug_event_finding(event: Event):
|
|
|
63
63
|
Create finding based on the kubernetes event
|
|
64
64
|
"""
|
|
65
65
|
k8s_obj = event.regarding
|
|
66
|
-
|
|
66
|
+
subject_type = FindingSubjectType.from_kind(k8s_obj.kind.lower()) if k8s_obj.kind else FindingSubjectType.TYPE_NONE
|
|
67
67
|
finding = Finding(
|
|
68
68
|
title=f"{event.reason} {event.type} for {k8s_obj.kind} {k8s_obj.namespace}/{k8s_obj.name}",
|
|
69
69
|
description=event.note,
|
|
@@ -73,7 +73,7 @@ def create_debug_event_finding(event: Event):
|
|
|
73
73
|
aggregation_key=f"Kubernetes {event.type} Event",
|
|
74
74
|
subject=FindingSubject(
|
|
75
75
|
k8s_obj.name,
|
|
76
|
-
|
|
76
|
+
subject_type,
|
|
77
77
|
k8s_obj.namespace,
|
|
78
78
|
),
|
|
79
79
|
creation_date=get_event_timestamp(event),
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import time
|
|
3
|
+
|
|
4
|
+
from robusta.api import (
|
|
5
|
+
ExecutionBaseEvent,
|
|
6
|
+
FileBlock,
|
|
7
|
+
LogEnricherParams,
|
|
8
|
+
MarkdownBlock,
|
|
9
|
+
PodEvent,
|
|
10
|
+
RegexReplacementStyle,
|
|
11
|
+
RobustaPod,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def start_log_enrichment(
|
|
16
|
+
event: ExecutionBaseEvent,
|
|
17
|
+
params: LogEnricherParams,
|
|
18
|
+
pod: RobustaPod,
|
|
19
|
+
):
|
|
20
|
+
if pod is None:
|
|
21
|
+
if params.warn_on_missing_label:
|
|
22
|
+
event.add_enrichment(
|
|
23
|
+
[MarkdownBlock("Cannot fetch logs because the pod is unknown. The alert has no `pod` label")],
|
|
24
|
+
)
|
|
25
|
+
return
|
|
26
|
+
|
|
27
|
+
all_statuses = pod.status.containerStatuses + pod.status.initContainerStatuses
|
|
28
|
+
if params.container_name:
|
|
29
|
+
container = params.container_name
|
|
30
|
+
elif any(status.name == event.get_subject().container for status in all_statuses):
|
|
31
|
+
# support alerts with a container label, make sure it's related to this pod.
|
|
32
|
+
container = event.get_subject().container
|
|
33
|
+
else:
|
|
34
|
+
container = ""
|
|
35
|
+
|
|
36
|
+
tries: int = 2
|
|
37
|
+
backoff_seconds: int = 2
|
|
38
|
+
regex_replacement_style = (
|
|
39
|
+
RegexReplacementStyle[params.regex_replacement_style] if params.regex_replacement_style else None
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
if not container and pod.spec.containers:
|
|
43
|
+
# TODO do we want to keep this part of code? It used to sometimes report logs for a wrong
|
|
44
|
+
# container when a container inside a pod was oomkilled. I can imagine it could cause
|
|
45
|
+
# similar problems in other cases.
|
|
46
|
+
container = pod.spec.containers[0].name
|
|
47
|
+
for _ in range(tries - 1):
|
|
48
|
+
log_data = pod.get_logs(
|
|
49
|
+
container=container,
|
|
50
|
+
regex_replacer_patterns=params.regex_replacer_patterns,
|
|
51
|
+
regex_replacement_style=regex_replacement_style,
|
|
52
|
+
filter_regex=params.filter_regex,
|
|
53
|
+
previous=params.previous,
|
|
54
|
+
)
|
|
55
|
+
if not log_data:
|
|
56
|
+
logging.info("log data is empty, retrying...")
|
|
57
|
+
time.sleep(backoff_seconds)
|
|
58
|
+
continue
|
|
59
|
+
|
|
60
|
+
log_name = pod.metadata.name
|
|
61
|
+
log_name += f"/{container}"
|
|
62
|
+
event.add_enrichment(
|
|
63
|
+
[FileBlock(filename=f"{pod.metadata.name}.log", contents=log_data.encode())],
|
|
64
|
+
)
|
|
65
|
+
break
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def logs_enricher(event: PodEvent, params: LogEnricherParams):
|
|
69
|
+
"""
|
|
70
|
+
Fetch and attach Pod logs.
|
|
71
|
+
The pod to fetch logs for is determined by the alert’s pod label from Prometheus.
|
|
72
|
+
|
|
73
|
+
By default, if the alert has no pod this enricher will silently do nothing.
|
|
74
|
+
"""
|
|
75
|
+
pod = event.get_pod()
|
|
76
|
+
|
|
77
|
+
logging.debug(f"received a logs_enricher action: {params}")
|
|
78
|
+
start_log_enrichment(event=event, params=params, pod=pod)
|
|
@@ -29,6 +29,10 @@ def replace_env_vars_values(values: Dict) -> Dict:
|
|
|
29
29
|
env_var_value = get_env_replacement(value.get_secret_value())
|
|
30
30
|
if env_var_value:
|
|
31
31
|
values[key] = SecretStr(env_var_value)
|
|
32
|
+
elif isinstance(value, dict):
|
|
33
|
+
env_var_value = replace_env_vars_values(value)
|
|
34
|
+
if env_var_value:
|
|
35
|
+
values[key] = env_var_value
|
|
32
36
|
|
|
33
37
|
return values
|
|
34
38
|
|
|
@@ -17,7 +17,6 @@ from robusta.core.playbooks.trigger import Trigger
|
|
|
17
17
|
from robusta.core.reporting import MarkdownBlock
|
|
18
18
|
from robusta.core.reporting.base import Finding
|
|
19
19
|
from robusta.core.reporting.consts import SYNC_RESPONSE_SINK
|
|
20
|
-
from robusta.core.sinks.robusta import RobustaSink
|
|
21
20
|
from robusta.core.sinks.robusta.dal.model_conversion import ModelConversion
|
|
22
21
|
from robusta.model.alert_relabel_config import AlertRelabel
|
|
23
22
|
from robusta.model.config import Registry
|
|
@@ -46,12 +45,13 @@ class PlaybooksEventHandlerImpl(PlaybooksEventHandler):
|
|
|
46
45
|
execution_response = None
|
|
47
46
|
execution_event: Optional[ExecutionBaseEvent] = None
|
|
48
47
|
sink_findings: Dict[str, List[Finding]] = defaultdict(list)
|
|
48
|
+
build_context: Dict[str, Any] = {}
|
|
49
49
|
for playbook in playbooks:
|
|
50
|
-
fired_trigger = self.__get_fired_trigger(trigger_event, playbook.triggers, playbook.get_id())
|
|
50
|
+
fired_trigger = self.__get_fired_trigger(trigger_event, playbook.triggers, playbook.get_id(), build_context)
|
|
51
51
|
if fired_trigger:
|
|
52
52
|
execution_event = None
|
|
53
53
|
try:
|
|
54
|
-
execution_event = fired_trigger.build_execution_event(trigger_event, sink_findings)
|
|
54
|
+
execution_event = fired_trigger.build_execution_event(trigger_event, sink_findings, build_context)
|
|
55
55
|
# sink_findings needs to be shared between playbooks.
|
|
56
56
|
# build_execution_event returns a different instance because it's running in a child process
|
|
57
57
|
execution_event.sink_findings = sink_findings
|
|
@@ -281,9 +281,10 @@ class PlaybooksEventHandlerImpl(PlaybooksEventHandler):
|
|
|
281
281
|
trigger_event: TriggerEvent,
|
|
282
282
|
playbook_triggers: List[Trigger],
|
|
283
283
|
playbook_id: str,
|
|
284
|
+
build_context: Dict[str, Any],
|
|
284
285
|
) -> Optional[BaseTrigger]:
|
|
285
286
|
for trigger in playbook_triggers:
|
|
286
|
-
if trigger.get().should_fire(trigger_event, playbook_id):
|
|
287
|
+
if trigger.get().should_fire(trigger_event, playbook_id, build_context):
|
|
287
288
|
return trigger.get()
|
|
288
289
|
return None
|
|
289
290
|
|
|
@@ -312,6 +313,9 @@ class PlaybooksEventHandlerImpl(PlaybooksEventHandler):
|
|
|
312
313
|
sink_info.type = sink.__class__.__name__
|
|
313
314
|
sink_info.findings_count += 1
|
|
314
315
|
|
|
316
|
+
if sink.params.stop:
|
|
317
|
+
return
|
|
318
|
+
|
|
315
319
|
except Exception: # Failure to send to one sink shouldn't fail all
|
|
316
320
|
logging.error(f"Failed to publish finding to sink {sink_name}", exc_info=True)
|
|
317
321
|
|
|
@@ -3,7 +3,7 @@ import json
|
|
|
3
3
|
import logging
|
|
4
4
|
import re
|
|
5
5
|
from enum import Flag
|
|
6
|
-
from typing import List, Optional
|
|
6
|
+
from typing import List, Optional, Tuple
|
|
7
7
|
|
|
8
8
|
from hikaru.model.rel_1_26 import ContainerStatus, Event, EventList, Pod, PodStatus
|
|
9
9
|
|
|
@@ -27,6 +27,21 @@ def get_image_pull_backoff_container_statuses(status: PodStatus) -> List[Contain
|
|
|
27
27
|
]
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
def get_pod_issue_message_and_reason(pod: Pod) -> Tuple[Optional[str], Optional[str]]:
|
|
31
|
+
# Works/should work only or KubeContainerWaiting and KubePodNotReady
|
|
32
|
+
# Note: in line with the old code in pod_issue_investigator, we only get the message for
|
|
33
|
+
# the first of possibly many misbehaving containers.
|
|
34
|
+
if pod.status.containerStatuses:
|
|
35
|
+
if pod.status.containerStatuses[0].state.waiting:
|
|
36
|
+
reason = pod.status.containerStatuses[0].state.waiting.reason
|
|
37
|
+
if reason is None:
|
|
38
|
+
reason = "unknown"
|
|
39
|
+
return (
|
|
40
|
+
pod.status.containerStatuses[0].state.waiting.message,
|
|
41
|
+
reason,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
30
45
|
def decompose_flag(flag: Flag) -> List[Flag]:
|
|
31
46
|
members, _ = enum._decompose(flag.__class__, flag._value_)
|
|
32
47
|
return members
|
|
@@ -165,7 +165,6 @@ class KubernetesDiffBlock(BaseBlock):
|
|
|
165
165
|
"""
|
|
166
166
|
A diff between two versions of a Kubernetes object
|
|
167
167
|
"""
|
|
168
|
-
|
|
169
168
|
diffs: List[DiffDetail]
|
|
170
169
|
old: Optional[str]
|
|
171
170
|
new: Optional[str]
|
|
@@ -175,6 +174,7 @@ class KubernetesDiffBlock(BaseBlock):
|
|
|
175
174
|
num_additions: Optional[int]
|
|
176
175
|
num_deletions: Optional[int]
|
|
177
176
|
num_modifications: Optional[int]
|
|
177
|
+
kind: str
|
|
178
178
|
|
|
179
179
|
# note that interesting_diffs might be a subset of the full diff between old and new
|
|
180
180
|
def __init__(
|
|
@@ -183,6 +183,7 @@ class KubernetesDiffBlock(BaseBlock):
|
|
|
183
183
|
old: Optional[HikaruDocumentBase],
|
|
184
184
|
new: Optional[HikaruDocumentBase],
|
|
185
185
|
name: str,
|
|
186
|
+
kind: str,
|
|
186
187
|
namespace: str = None,
|
|
187
188
|
):
|
|
188
189
|
"""
|
|
@@ -206,18 +207,39 @@ class KubernetesDiffBlock(BaseBlock):
|
|
|
206
207
|
num_additions=num_additions,
|
|
207
208
|
num_deletions=num_deletions,
|
|
208
209
|
num_modifications=num_modifications,
|
|
210
|
+
kind=kind,
|
|
209
211
|
)
|
|
210
212
|
|
|
211
213
|
def get_description(self):
|
|
212
|
-
if self.old
|
|
213
|
-
return "
|
|
214
|
-
elif self.new
|
|
215
|
-
return "
|
|
214
|
+
if not self.old:
|
|
215
|
+
return f"{self.kind} created"
|
|
216
|
+
elif not self.new:
|
|
217
|
+
return f"{self.kind} deleted"
|
|
216
218
|
else:
|
|
217
|
-
return (
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
return self.__updated_description()
|
|
220
|
+
|
|
221
|
+
def __updated_description(self):
|
|
222
|
+
length = 5
|
|
223
|
+
updated_fields = []
|
|
224
|
+
for diff in self.diffs:
|
|
225
|
+
if diff.path:
|
|
226
|
+
# Stripping any integer values like '0', '1', '2', etc. from the path array which denotes array
|
|
227
|
+
# indices. eg: ['spec', 'template', 'spec', 'containers', '0', 'image']
|
|
228
|
+
stripped_path = [path for path in diff.path if not path.isdigit()]
|
|
229
|
+
if stripped_path:
|
|
230
|
+
updated_fields.append(stripped_path[-1])
|
|
231
|
+
|
|
232
|
+
updated_fields_str = ""
|
|
233
|
+
if updated_fields:
|
|
234
|
+
updated_fields_str = f"\n ● Attributes: "
|
|
235
|
+
|
|
236
|
+
updated_fields_len = len(updated_fields)
|
|
237
|
+
if updated_fields_len < length:
|
|
238
|
+
updated_fields_str += f"{', '.join(updated_fields)}"
|
|
239
|
+
else:
|
|
240
|
+
updated_fields_str += f"{', '.join(updated_fields[:length])} ... (and {updated_fields_len - length} more)"
|
|
241
|
+
|
|
242
|
+
return f"{self.kind} updated{updated_fields_str}"
|
|
221
243
|
|
|
222
244
|
@staticmethod
|
|
223
245
|
def _obj_to_content(obj: Optional[HikaruDocumentBase]):
|
|
@@ -14,7 +14,7 @@ from robusta.core.schedule.model import DynamicDelayRepeat, JobStatus, Scheduled
|
|
|
14
14
|
# for a short time there are two runners running (old+new version) and they both
|
|
15
15
|
# see the new scheduled playbook. we add a delay so that only the new runner ends up
|
|
16
16
|
# running the scheduled playbook
|
|
17
|
-
INITIAL_SCHEDULE_DELAY_SEC = os.environ.get("INITIAL_SCHEDULE_DELAY_SEC", 120)
|
|
17
|
+
INITIAL_SCHEDULE_DELAY_SEC = int(os.environ.get("INITIAL_SCHEDULE_DELAY_SEC", 120))
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class Scheduler:
|
{robusta_cli-0.10.26a1 → robusta_cli-0.10.27}/src/robusta/core/sinks/jira/jira_sink_params.py
RENAMED
|
@@ -13,6 +13,11 @@ class JiraSinkParams(SinkBaseParams):
|
|
|
13
13
|
project_name: str
|
|
14
14
|
project_type_id_override: Optional[int]
|
|
15
15
|
issue_type_id_override: Optional[int]
|
|
16
|
+
sendResolved: Optional[bool]
|
|
17
|
+
reopenIssues: Optional[bool]
|
|
18
|
+
doneStatusName: Optional[str] = "Done"
|
|
19
|
+
reopenStatusName: Optional[str] = "To Do"
|
|
20
|
+
noReopenResolution: Optional[str] = ""
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
class JiraSinkConfigWrapper(SinkConfigBase):
|
|
@@ -18,7 +18,11 @@ from robusta.core.sinks.sink_base import SinkBase
|
|
|
18
18
|
class KafkaSink(SinkBase):
|
|
19
19
|
def __init__(self, sink_config: KafkaSinkConfigWrapper, registry):
|
|
20
20
|
super().__init__(sink_config.kafka_sink, registry)
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
self.producer = KafkaProducer(
|
|
23
|
+
bootstrap_servers=sink_config.kafka_sink.kafka_url,
|
|
24
|
+
**sink_config.kafka_sink.auth,
|
|
25
|
+
)
|
|
22
26
|
self.topic = sink_config.kafka_sink.topic
|
|
23
27
|
|
|
24
28
|
def write_finding(self, finding: Finding, platform_enabled: bool):
|