robusta-cli 0.10.30a0__tar.gz → 0.10.31__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.30a0 → robusta_cli-0.10.31}/PKG-INFO +1 -1
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/pyproject.toml +1 -1
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/_version.py +1 -1
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/discovery/discovery.py +94 -6
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/discovery/resource_names.py +5 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/services.py +1 -1
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/pod_utils/imagepull_utils.py +1 -1
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/robusta_sink.py +1 -1
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/git/git_repo.py +1 -1
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/autogenerated/events.py +26 -30
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/autogenerated/v1/models.py +2 -2
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/custom_models.py +106 -8
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/process_utils.py +1 -1
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/webex/sender.py +4 -4
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/LICENSE +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/api/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/auth.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/backend_profile.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/eula.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/integrations_cmd.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/main.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/playbooks_cmd.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/self_host.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/slack_feedback_message.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/slack_verification.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/cli/utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/discovery/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/discovery/top_service_resolver.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/discovery/utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/exceptions.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/base_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/cluster_status.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/env_vars.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/events.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/helm_release.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/jobs.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/k8s_operation_type.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/namespaces.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/nodes.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/pods.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/model/runner_config.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/persistency/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/persistency/in_memory.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/persistency/scheduled_jobs_states_dal.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/actions_registry.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/base_trigger.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/common.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/container_playbook_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/crash_reporter.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/generation.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/internal/discovery_events.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/job_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/node_playbook_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/oom_killer_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/playbook_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/playbooks_event_handler.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/playbooks_event_handler_impl.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/pod_utils/crashloop_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/pod_utils/pending_pod_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/prometheus_enrichment_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/trigger.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/pubsub/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/pubsub/event_emitter.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/pubsub/event_subscriber.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/pubsub/events_pubsub.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/reporting/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/reporting/action_requests.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/reporting/base.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/reporting/blocks.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/reporting/callbacks.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/reporting/consts.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/reporting/custom_rendering.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/reporting/finding_subjects.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/reporting/utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/schedule/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/schedule/model.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/schedule/scheduler.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/common/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/common/html_tools.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/datadog/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/datadog/datadog_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/datadog/datadog_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/discord/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/discord/discord_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/discord/discord_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/file/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/file/file_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/file/file_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/file/object_traverser.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/google_chat/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/google_chat/google_chat.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/google_chat/google_chat_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/jira/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/jira/jira_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/jira/jira_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/kafka/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/kafka/kafka_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/kafka/kafka_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/mail/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/mail/mail_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/mail/mail_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/mattermost/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/mattermost/mattermost_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/mattermost/mattermost_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/msteams/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/msteams/msteams_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/msteams/msteams_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/opsgenie/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/opsgenie/opsgenie_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/opsgenie/opsgenie_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/pagerduty/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/pagerduty/pagerduty_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/pagerduty/pagerduty_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/pushover/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/pushover/pushover_client.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/pushover/pushover_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/pushover/pushover_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/dal/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/dal/model_conversion.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/dal/supabase_dal.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/discovery_metrics.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/prometheus_health_checker.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/robusta_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/rrm/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/rrm/account_resource_fetcher.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/rrm/base_resource_manager.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/rrm/prometheus_alert_resource_manager.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/rrm/rrm.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/rrm/types.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/rocketchat/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/rocketchat/rocketchat_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/rocketchat/rocketchat_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/servicenow/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/servicenow/servicenow_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/servicenow/servicenow_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/sink_base.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/sink_base_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/sink_config.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/sink_factory.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/slack/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/slack/slack_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/slack/slack_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/telegram/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/telegram/telegram_client.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/telegram/telegram_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/telegram/telegram_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/timing.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/transformer.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/victorops/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/victorops/victorops_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/victorops/victorops_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/webex/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/webex/webex_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/webex/webex_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/webhook/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/webhook/webhook_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/webhook/webhook_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/yamessenger/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/yamessenger/yamessenger_client.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/yamessenger/yamessenger_sink.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/yamessenger/yamessenger_sink_params.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/triggers/container_oom_killed_trigger.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/triggers/custom_triggers.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/triggers/error_event_trigger.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/triggers/helm_releases_triggers.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/triggers/job_failed_trigger.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/triggers/multi_resources_trigger.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/triggers/oom_killed_trigger_base.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/triggers/pod_crash_loop_trigger.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/triggers/pod_image_pull_backoff.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/triggers/pod_oom_killed_trigger.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/argocd/argocd_client.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/common/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/common/requests.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/discord/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/discord/sender.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/git/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/git/well_known_hosts.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/google_chat/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/google_chat/sender.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/grafana.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/helper.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/jira/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/jira/client.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/jira/sender.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/api_client_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/autogenerated/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/autogenerated/models.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/autogenerated/triggers.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/autogenerated/v1/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/base_event.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/base_triggers.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/model_not_found_exception.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/templates.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/mail/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/mail/sender.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/mattermost/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/mattermost/client.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/mattermost/sender.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_adaptive_card_files.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_adaptive_card_files_image.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_adaptive_card_files_text.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_elements/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_elements/msteams_action.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_elements/msteams_base.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_elements/msteams_card.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_elements/msteams_column.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_elements/msteams_container.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_elements/msteams_images.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_elements/msteams_table.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_elements/msteams_text_block.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_mark_down_fix_url.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/msteams_msg.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/msteams/sender.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/openshift/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/openshift/token.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/prometheus/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/prometheus/models.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/prometheus/trigger.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/prometheus/utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/receiver.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/resource_analysis/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/resource_analysis/cpu_analyzer.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/resource_analysis/memory_analyzer.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/resource_analysis/node_cpu_analyzer.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/resource_analysis/prometheus_analyzer.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/rocketchat/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/rocketchat/sender.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/scheduled/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/scheduled/event.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/scheduled/models.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/scheduled/playbook_scheduler.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/scheduled/playbook_scheduler_manager.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/scheduled/playbook_scheduler_manager_impl.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/scheduled/trigger.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/servicenow/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/servicenow/sender.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/slack/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/slack/sender.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/webex/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/model/alert_relabel_config.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/model/config.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/model/playbook_action.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/model/playbook_definition.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/patch/patch.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/config_loader.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/log_init.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/main.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/not_found_exception.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/object_updater.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/process_setup.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/ssl_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/telemetry.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/telemetry_service.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/web.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/runner/web_api.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/__init__.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/auth_provider.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/base64_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/cluster_provider_discovery.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/common.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/decorators.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/docs.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/documented_pydantic.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/error_codes.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/file_system_watcher.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/function_hashes.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/json_schema.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/parsing.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/rate_limiter.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/server_start.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/service_discovery.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/silence_utils.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/stack_tracer.py +0 -0
- {robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/utils/task_queue.py +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# this is updated by .github/workflows/release.yaml
|
|
2
|
-
__version__ = "0.10.
|
|
2
|
+
__version__ = "0.10.31"
|
|
@@ -7,7 +7,17 @@ from concurrent.futures.process import ProcessPoolExecutor
|
|
|
7
7
|
from typing import Dict, List, Optional, Union
|
|
8
8
|
|
|
9
9
|
import prometheus_client
|
|
10
|
-
from hikaru.model.rel_1_26 import
|
|
10
|
+
from hikaru.model.rel_1_26 import (
|
|
11
|
+
Container,
|
|
12
|
+
DaemonSet,
|
|
13
|
+
Deployment,
|
|
14
|
+
Job,
|
|
15
|
+
ObjectMeta,
|
|
16
|
+
Pod,
|
|
17
|
+
ReplicaSet,
|
|
18
|
+
StatefulSet,
|
|
19
|
+
Volume,
|
|
20
|
+
)
|
|
11
21
|
from kubernetes import client
|
|
12
22
|
from kubernetes.client import (
|
|
13
23
|
V1Container,
|
|
@@ -21,6 +31,7 @@ from kubernetes.client import (
|
|
|
21
31
|
V1ObjectMeta,
|
|
22
32
|
V1Pod,
|
|
23
33
|
V1PodList,
|
|
34
|
+
V1PodTemplateSpec,
|
|
24
35
|
V1ReplicaSetList,
|
|
25
36
|
V1StatefulSet,
|
|
26
37
|
V1StatefulSetList,
|
|
@@ -36,11 +47,13 @@ from robusta.core.model.env_vars import (
|
|
|
36
47
|
DISCOVERY_MAX_BATCHES,
|
|
37
48
|
DISCOVERY_POD_OWNED_PODS,
|
|
38
49
|
DISCOVERY_PROCESS_TIMEOUT_SEC,
|
|
50
|
+
IS_OPENSHIFT,
|
|
39
51
|
)
|
|
40
52
|
from robusta.core.model.helm_release import HelmRelease
|
|
41
53
|
from robusta.core.model.jobs import JobInfo
|
|
42
54
|
from robusta.core.model.namespaces import NamespaceInfo
|
|
43
55
|
from robusta.core.model.services import ContainerInfo, ServiceConfig, ServiceInfo, VolumeInfo
|
|
56
|
+
from robusta.integrations.kubernetes.custom_models import DeploymentConfig, DictToK8sObj
|
|
44
57
|
from robusta.patch.patch import create_monkey_patches
|
|
45
58
|
from robusta.utils.cluster_provider_discovery import cluster_provider
|
|
46
59
|
from robusta.utils.stack_tracer import StackTracer
|
|
@@ -93,6 +106,35 @@ class Discovery:
|
|
|
93
106
|
except Exception:
|
|
94
107
|
logging.error("error getting stack trace", exc_info=True)
|
|
95
108
|
|
|
109
|
+
@staticmethod
|
|
110
|
+
def __create_service_info_from_hikaru(
|
|
111
|
+
meta: ObjectMeta,
|
|
112
|
+
kind: str,
|
|
113
|
+
containers: List[Container],
|
|
114
|
+
volumes: List[Volume],
|
|
115
|
+
total_pods: int,
|
|
116
|
+
ready_pods: int,
|
|
117
|
+
is_helm_release: bool = False,
|
|
118
|
+
) -> ServiceInfo:
|
|
119
|
+
container_info = (
|
|
120
|
+
[ContainerInfo.get_container_info_hikaru(container) for container in containers] if containers else []
|
|
121
|
+
)
|
|
122
|
+
volumes_info = [VolumeInfo.get_volume_info(volume) for volume in volumes] if volumes else []
|
|
123
|
+
config = ServiceConfig(labels=meta.labels or {}, containers=container_info, volumes=volumes_info)
|
|
124
|
+
version = getattr(meta, "resource_version", None) or getattr(meta, "resourceVersion", None)
|
|
125
|
+
resource_version = int(version) if version else 0
|
|
126
|
+
|
|
127
|
+
return ServiceInfo(
|
|
128
|
+
resource_version=resource_version,
|
|
129
|
+
name=meta.name,
|
|
130
|
+
namespace=meta.namespace,
|
|
131
|
+
service_type=kind,
|
|
132
|
+
service_config=config,
|
|
133
|
+
ready_pods=ready_pods,
|
|
134
|
+
total_pods=total_pods,
|
|
135
|
+
is_helm_release=is_helm_release,
|
|
136
|
+
)
|
|
137
|
+
|
|
96
138
|
@staticmethod
|
|
97
139
|
def __create_service_info(
|
|
98
140
|
meta: V1ObjectMeta,
|
|
@@ -121,12 +163,12 @@ class Discovery:
|
|
|
121
163
|
)
|
|
122
164
|
|
|
123
165
|
@staticmethod
|
|
124
|
-
def
|
|
125
|
-
return Discovery.
|
|
166
|
+
def create_service_info_from_hikaru(obj: Union[Deployment, DaemonSet, StatefulSet, Pod, ReplicaSet]) -> ServiceInfo:
|
|
167
|
+
return Discovery.__create_service_info_from_hikaru(
|
|
126
168
|
obj.metadata,
|
|
127
169
|
obj.kind,
|
|
128
|
-
|
|
129
|
-
|
|
170
|
+
extract_containers_k8(obj),
|
|
171
|
+
extract_volumes_k8(obj),
|
|
130
172
|
extract_total_pods(obj),
|
|
131
173
|
extract_ready_pods(obj),
|
|
132
174
|
is_helm_release=is_release_managed_by_helm(
|
|
@@ -142,11 +184,56 @@ class Discovery:
|
|
|
142
184
|
pods_metadata: List[V1ObjectMeta] = []
|
|
143
185
|
node_requests = defaultdict(list) # map between node name, to request of pods running on it
|
|
144
186
|
active_services: List[ServiceInfo] = []
|
|
187
|
+
|
|
145
188
|
# discover micro services
|
|
146
189
|
try:
|
|
190
|
+
continue_ref: Optional[str] = None
|
|
191
|
+
if IS_OPENSHIFT:
|
|
192
|
+
for _ in range(DISCOVERY_MAX_BATCHES):
|
|
193
|
+
try:
|
|
194
|
+
deployconfigs_res = client.CustomObjectsApi().list_cluster_custom_object(
|
|
195
|
+
group=DeploymentConfig.group,
|
|
196
|
+
version=DeploymentConfig.version,
|
|
197
|
+
plural=DeploymentConfig.plural,
|
|
198
|
+
limit=DISCOVERY_BATCH_SIZE,
|
|
199
|
+
_continue=continue_ref,
|
|
200
|
+
)
|
|
201
|
+
except Exception:
|
|
202
|
+
logging.exception(msg="Failed to list Deployment configs from api.")
|
|
203
|
+
break
|
|
204
|
+
|
|
205
|
+
for dc in deployconfigs_res.get("items", []):
|
|
206
|
+
try:
|
|
207
|
+
meta = DictToK8sObj(dc.get("metadata"), V1ObjectMeta)
|
|
208
|
+
spec = dc.get("spec", {})
|
|
209
|
+
template = DictToK8sObj(spec.get("template"), V1PodTemplateSpec)
|
|
210
|
+
|
|
211
|
+
active_services.extend(
|
|
212
|
+
[
|
|
213
|
+
Discovery.__create_service_info(
|
|
214
|
+
meta=meta,
|
|
215
|
+
kind="DeploymentConfig",
|
|
216
|
+
containers=template.spec.containers,
|
|
217
|
+
volumes=template.spec.volumes,
|
|
218
|
+
total_pods=spec.get("replicas", 1),
|
|
219
|
+
ready_pods=dc.get("status", {}).get("readyReplicas", 0),
|
|
220
|
+
is_helm_release=is_release_managed_by_helm(
|
|
221
|
+
annotations=meta.annotations, labels=meta.labels
|
|
222
|
+
),
|
|
223
|
+
)
|
|
224
|
+
]
|
|
225
|
+
)
|
|
226
|
+
except Exception:
|
|
227
|
+
logging.exception(msg=f"Failed to parse Deployment config/n {dc}")
|
|
228
|
+
continue
|
|
229
|
+
|
|
230
|
+
continue_ref = deployconfigs_res.get("metadata", {}).get("continue")
|
|
231
|
+
if not continue_ref:
|
|
232
|
+
break
|
|
233
|
+
|
|
147
234
|
# discover deployments
|
|
148
235
|
# using k8s api `continue` to load in batches
|
|
149
|
-
continue_ref
|
|
236
|
+
continue_ref = None
|
|
150
237
|
for _ in range(DISCOVERY_MAX_BATCHES):
|
|
151
238
|
deployments: V1DeploymentList = client.AppsV1Api().list_deployment_for_all_namespaces(
|
|
152
239
|
limit=DISCOVERY_BATCH_SIZE, _continue=continue_ref
|
|
@@ -608,6 +695,7 @@ def extract_total_pods(resource) -> int:
|
|
|
608
695
|
return 0 if not resource.status.desiredNumberScheduled else resource.status.desiredNumberScheduled
|
|
609
696
|
elif isinstance(resource, Pod):
|
|
610
697
|
return 1
|
|
698
|
+
|
|
611
699
|
if isinstance(resource, V1Deployment) or isinstance(resource, V1StatefulSet):
|
|
612
700
|
# resource.spec.replicas can be 0, default value is 1
|
|
613
701
|
return resource.spec.replicas if resource.spec.replicas is not None else 1
|
|
@@ -3,6 +3,7 @@ from typing import Callable, List, Optional
|
|
|
3
3
|
from kubernetes import client
|
|
4
4
|
from pydantic import BaseModel
|
|
5
5
|
|
|
6
|
+
from robusta.integrations.kubernetes.custom_models import DeploymentConfig
|
|
6
7
|
from robusta.utils.error_codes import ActionException, ErrorCodes
|
|
7
8
|
|
|
8
9
|
|
|
@@ -54,6 +55,10 @@ LISTERS = { # TODO add ingress and cronjobs once upgrading the k8s client versi
|
|
|
54
55
|
list_all=client.NetworkingV1Api().list_ingress_for_all_namespaces,
|
|
55
56
|
list_namespaced=client.NetworkingV1Api().list_namespaced_ingress,
|
|
56
57
|
),
|
|
58
|
+
"deploymentconfig": ResourceLister(
|
|
59
|
+
list_all=DeploymentConfig.list_for_all_namespaces,
|
|
60
|
+
list_namespaced=DeploymentConfig.list_namespaced,
|
|
61
|
+
),
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
|
|
@@ -41,7 +41,7 @@ class ContainerInfo(BaseModel):
|
|
|
41
41
|
return ContainerInfo(name=container.name, image=container.image, env=env, resources=resources, ports=ports)
|
|
42
42
|
|
|
43
43
|
@staticmethod
|
|
44
|
-
def
|
|
44
|
+
def get_container_info_hikaru(container: Container) -> "ContainerInfo":
|
|
45
45
|
env = (
|
|
46
46
|
[EnvVar(name=env.name, value=env.value) for env in container.env if env.name and env.value]
|
|
47
47
|
if container.env
|
|
@@ -126,7 +126,7 @@ class ImagePullBackoffInvestigator:
|
|
|
126
126
|
configs = [
|
|
127
127
|
# Containerd
|
|
128
128
|
{
|
|
129
|
-
"err_template": 'failed to pull and unpack image ".*?": failed to resolve reference ".*?":
|
|
129
|
+
"err_template": r'failed to pull and unpack image ".*?": failed to resolve reference ".*?": .*?(no such host|not found)',
|
|
130
130
|
"reason": ImagePullBackoffReason.RepoDoesntExist,
|
|
131
131
|
},
|
|
132
132
|
{
|
{robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/sinks/robusta/robusta_sink.py
RENAMED
|
@@ -199,7 +199,7 @@ class RobustaSink(SinkBase, EventHandler):
|
|
|
199
199
|
):
|
|
200
200
|
try:
|
|
201
201
|
if isinstance(new_resource, (Deployment, DaemonSet, StatefulSet, ReplicaSet, Pod)):
|
|
202
|
-
self.__publish_single_service(Discovery.
|
|
202
|
+
self.__publish_single_service(Discovery.create_service_info_from_hikaru(new_resource), operation)
|
|
203
203
|
elif isinstance(new_resource, Node):
|
|
204
204
|
self.__update_node(new_resource, operation)
|
|
205
205
|
# if the jobs cache isn't initalized you will have exceptions in __update_job
|
|
@@ -40,7 +40,7 @@ class GitRepoManager:
|
|
|
40
40
|
key = key.strip()
|
|
41
41
|
if key:
|
|
42
42
|
logging.debug(f"Adding a key to known_hosts: {key}")
|
|
43
|
-
f.write(key)
|
|
43
|
+
f.write(key + "\n")
|
|
44
44
|
|
|
45
45
|
if GIT_REPOS_VERIFIED_HOSTS:
|
|
46
46
|
os.system(f"ssh-keyscan -H {GIT_REPOS_VERIFIED_HOSTS} >> {SSH_ROOT_DIR}/known_hosts")
|
|
@@ -2,40 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
4
|
import traceback
|
|
5
|
-
from abc import abstractmethod
|
|
6
5
|
from dataclasses import dataclass
|
|
7
|
-
from
|
|
8
|
-
|
|
6
|
+
from abc import abstractmethod
|
|
9
7
|
from hikaru.model.rel_1_26 import (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
ConfigMap,
|
|
8
|
+
Pod,
|
|
9
|
+
ReplicaSet,
|
|
13
10
|
DaemonSet,
|
|
14
11
|
Deployment,
|
|
12
|
+
StatefulSet,
|
|
13
|
+
Service,
|
|
15
14
|
Event,
|
|
16
15
|
HorizontalPodAutoscaler,
|
|
17
|
-
|
|
16
|
+
Node,
|
|
17
|
+
ClusterRole,
|
|
18
|
+
ClusterRoleBinding,
|
|
18
19
|
Job,
|
|
19
20
|
Namespace,
|
|
20
|
-
|
|
21
|
-
Node,
|
|
21
|
+
ServiceAccount,
|
|
22
22
|
PersistentVolume,
|
|
23
23
|
PersistentVolumeClaim,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ServiceAccount,
|
|
28
|
-
StatefulSet,
|
|
24
|
+
NetworkPolicy,
|
|
25
|
+
ConfigMap,
|
|
26
|
+
Ingress,
|
|
29
27
|
)
|
|
28
|
+
from hikaru.utils import Response
|
|
29
|
+
from pydantic import BaseModel
|
|
30
|
+
from typing import Union, Optional, List
|
|
31
|
+
from ..base_event import K8sBaseChangeEvent
|
|
32
|
+
from ....core.model.events import ExecutionBaseEvent, ExecutionEventBaseParams
|
|
33
|
+
from ....core.reporting.base import FindingSubject
|
|
34
|
+
from ....core.reporting.consts import FindingSubjectType, FindingSource
|
|
35
|
+
from ....core.reporting.finding_subjects import KubeObjFindingSubject
|
|
36
|
+
from robusta.integrations.kubernetes.custom_models import RobustaPod, RobustaDeployment, RobustaJob, DeploymentConfig
|
|
30
37
|
from hikaru.model.rel_1_26.v1 import ClusterRole as v1ClusterRole
|
|
31
38
|
from hikaru.model.rel_1_26.v1 import ClusterRoleBinding as v1ClusterRoleBinding
|
|
32
39
|
from hikaru.model.rel_1_26.v1 import ConfigMap as v1ConfigMap
|
|
33
40
|
from hikaru.model.rel_1_26.v1 import DaemonSet as v1DaemonSet
|
|
34
41
|
from hikaru.model.rel_1_26.v1 import Deployment as v1Deployment
|
|
35
42
|
from hikaru.model.rel_1_26.v1 import Event as v1Event
|
|
36
|
-
from hikaru.model.rel_1_26.v1 import
|
|
37
|
-
HorizontalPodAutoscaler as v1HorizontalPodAutoscaler,
|
|
38
|
-
)
|
|
43
|
+
from hikaru.model.rel_1_26.v1 import HorizontalPodAutoscaler as v1HorizontalPodAutoscaler
|
|
39
44
|
from hikaru.model.rel_1_26.v1 import Ingress as v1Ingress
|
|
40
45
|
from hikaru.model.rel_1_26.v1 import Job as v1Job
|
|
41
46
|
from hikaru.model.rel_1_26.v1 import Namespace as v1Namespace
|
|
@@ -48,20 +53,7 @@ from hikaru.model.rel_1_26.v1 import ReplicaSet as v1ReplicaSet
|
|
|
48
53
|
from hikaru.model.rel_1_26.v1 import Service as v1Service
|
|
49
54
|
from hikaru.model.rel_1_26.v1 import ServiceAccount as v1ServiceAccount
|
|
50
55
|
from hikaru.model.rel_1_26.v1 import StatefulSet as v1StatefulSet
|
|
51
|
-
from hikaru.utils import Response
|
|
52
|
-
from pydantic import BaseModel
|
|
53
|
-
|
|
54
|
-
from robusta.integrations.kubernetes.custom_models import (
|
|
55
|
-
RobustaDeployment,
|
|
56
|
-
RobustaJob,
|
|
57
|
-
RobustaPod,
|
|
58
|
-
)
|
|
59
56
|
|
|
60
|
-
from ....core.model.events import ExecutionBaseEvent, ExecutionEventBaseParams
|
|
61
|
-
from ....core.reporting.base import FindingSubject
|
|
62
|
-
from ....core.reporting.consts import FindingSource, FindingSubjectType
|
|
63
|
-
from ....core.reporting.finding_subjects import KubeObjFindingSubject
|
|
64
|
-
from ..base_event import K8sBaseChangeEvent
|
|
65
57
|
|
|
66
58
|
LOADERS_MAPPINGS = {
|
|
67
59
|
"pod": (True, RobustaPod.readNamespacedPod),
|
|
@@ -83,6 +75,7 @@ LOADERS_MAPPINGS = {
|
|
|
83
75
|
"networkpolicy": (True, NetworkPolicy.readNamespacedNetworkPolicy),
|
|
84
76
|
"configmap": (True, ConfigMap.readNamespacedConfigMap),
|
|
85
77
|
"ingress": (True, Ingress.readNamespacedIngress),
|
|
78
|
+
"deploymentconfig": (True, DeploymentConfig.readNamespaced),
|
|
86
79
|
}
|
|
87
80
|
|
|
88
81
|
|
|
@@ -128,6 +121,7 @@ class KubernetesResourceEvent(ExecutionBaseEvent):
|
|
|
128
121
|
NetworkPolicy,
|
|
129
122
|
ConfigMap,
|
|
130
123
|
Ingress,
|
|
124
|
+
DeploymentConfig,
|
|
131
125
|
]
|
|
132
126
|
] = None
|
|
133
127
|
|
|
@@ -153,6 +147,7 @@ class KubernetesResourceEvent(ExecutionBaseEvent):
|
|
|
153
147
|
NetworkPolicy,
|
|
154
148
|
ConfigMap,
|
|
155
149
|
Ingress,
|
|
150
|
+
DeploymentConfig,
|
|
156
151
|
],
|
|
157
152
|
named_sinks: List[str],
|
|
158
153
|
):
|
|
@@ -182,6 +177,7 @@ class KubernetesResourceEvent(ExecutionBaseEvent):
|
|
|
182
177
|
NetworkPolicy,
|
|
183
178
|
ConfigMap,
|
|
184
179
|
Ingress,
|
|
180
|
+
DeploymentConfig,
|
|
185
181
|
]
|
|
186
182
|
]:
|
|
187
183
|
return self.obj
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# This file was autogenerated. Do not edit.
|
|
2
2
|
|
|
3
3
|
from hikaru.model.rel_1_26.v1 import *
|
|
4
|
-
from robusta.integrations.kubernetes.custom_models import RobustaPod,RobustaDeployment,RobustaJob
|
|
5
4
|
|
|
5
|
+
from robusta.integrations.kubernetes.custom_models import DeploymentConfig, RobustaDeployment, RobustaJob, RobustaPod
|
|
6
6
|
|
|
7
7
|
KIND_TO_MODEL_CLASS = {
|
|
8
8
|
"Pod": RobustaPod,
|
|
@@ -23,5 +23,5 @@ KIND_TO_MODEL_CLASS = {
|
|
|
23
23
|
"PersistentVolumeClaim": PersistentVolumeClaim,
|
|
24
24
|
"NetworkPolicy": NetworkPolicy,
|
|
25
25
|
"ConfigMap": ConfigMap,
|
|
26
|
-
"Ingress": Ingress
|
|
26
|
+
"Ingress": Ingress,
|
|
27
27
|
}
|
{robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/integrations/kubernetes/custom_models.py
RENAMED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import json
|
|
2
1
|
import logging
|
|
3
2
|
import re
|
|
4
3
|
import time
|
|
4
|
+
from dataclasses import dataclass
|
|
5
5
|
from enum import Enum, auto
|
|
6
|
-
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Type, TypeVar
|
|
6
|
+
from typing import TYPE_CHECKING, ClassVar, Dict, List, Optional, Tuple, Type, TypeVar, Union
|
|
7
7
|
|
|
8
8
|
import hikaru
|
|
9
9
|
import yaml
|
|
10
|
+
from hikaru.crd import HikaruCRDDocumentMixin, register_crd_class
|
|
10
11
|
from hikaru.model.rel_1_26 import * # * import is necessary for hikaru subclasses to work
|
|
12
|
+
from kubernetes import client
|
|
11
13
|
from kubernetes.client import ApiException
|
|
12
14
|
from pydantic import BaseModel
|
|
13
15
|
|
|
@@ -33,7 +35,7 @@ T = TypeVar("T")
|
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
# TODO: import these from the python-tools project
|
|
36
|
-
PYTHON_DEBUGGER_IMAGE = f"{IMAGE_REGISTRY}/debug-toolkit:
|
|
38
|
+
PYTHON_DEBUGGER_IMAGE = f"{IMAGE_REGISTRY}/debug-toolkit:v6.0"
|
|
37
39
|
JAVA_DEBUGGER_IMAGE = f"{IMAGE_REGISTRY}/java-toolkit-11:jattach"
|
|
38
40
|
|
|
39
41
|
|
|
@@ -57,13 +59,18 @@ def _get_match_expression_filter(expression: LabelSelectorRequirement) -> str:
|
|
|
57
59
|
return f"{expression.key} {expression.operator} ({values})"
|
|
58
60
|
|
|
59
61
|
|
|
60
|
-
def build_selector_query(selector: LabelSelector) -> str:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
def build_selector_query(selector: Union[LabelSelector, Dict]) -> str:
|
|
63
|
+
if isinstance(selector, LabelSelector):
|
|
64
|
+
label_filters = [f"{label[0]}={label[1]}" for label in selector.matchLabels.items()]
|
|
65
|
+
label_filters.extend([_get_match_expression_filter(expression) for expression in selector.matchExpressions])
|
|
66
|
+
return ",".join(label_filters)
|
|
67
|
+
else:
|
|
68
|
+
return ",".join([f"{k}={v}" for k, v in selector.items()])
|
|
64
69
|
|
|
65
70
|
|
|
66
|
-
def list_pods_using_selector(
|
|
71
|
+
def list_pods_using_selector(
|
|
72
|
+
namespace: str, selector: Union[LabelSelector, Dict], field_selector: str = None
|
|
73
|
+
) -> List[Pod]:
|
|
67
74
|
labels_selector = build_selector_query(selector)
|
|
68
75
|
return PodList.listNamespacedPod(
|
|
69
76
|
namespace=namespace,
|
|
@@ -530,6 +537,97 @@ class RobustaJob(Job):
|
|
|
530
537
|
return cls.run_simple_job_spec(spec, name=image, timeout=timeout)
|
|
531
538
|
|
|
532
539
|
|
|
540
|
+
@dataclass
|
|
541
|
+
class DeploymentTriggerPolicy(HikaruBase):
|
|
542
|
+
imageChangeParams: Optional[Dict]
|
|
543
|
+
type: Optional[str]
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
@dataclass
|
|
547
|
+
class DeploymentConfigStatus(HikaruBase):
|
|
548
|
+
conditions: Optional[List[DeploymentCondition]]
|
|
549
|
+
details: Optional[Dict]
|
|
550
|
+
updatedReplicas: Optional[int]
|
|
551
|
+
readyReplicas: Optional[int]
|
|
552
|
+
availableReplicas: int = 0
|
|
553
|
+
latestVersion: int = 0
|
|
554
|
+
observedGeneration: int = 0
|
|
555
|
+
replicas: int = 0
|
|
556
|
+
unavailableReplicas: int = 0
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
@dataclass
|
|
560
|
+
class DeploymentConfigSpec(HikaruBase):
|
|
561
|
+
selector: Optional[Dict[str, str]]
|
|
562
|
+
strategy: Optional[Dict]
|
|
563
|
+
template: Optional[PodTemplateSpec]
|
|
564
|
+
test: Optional[bool]
|
|
565
|
+
triggers: Optional[List[DeploymentTriggerPolicy]] = None
|
|
566
|
+
minReadySeconds: Optional[int] = 0
|
|
567
|
+
paused: Optional[bool] = None
|
|
568
|
+
replicas: Optional[int] = None
|
|
569
|
+
revisionHistoryLimit: Optional[int] = None
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
# https://docs.openshift.com/container-platform/3.11/rest_api/apps_openshift_io/deploymentconfig-apps-openshift-io-v1.html
|
|
573
|
+
@dataclass
|
|
574
|
+
class DeploymentConfig(HikaruDocumentBase, HikaruCRDDocumentMixin):
|
|
575
|
+
plural: ClassVar[str] = "deploymentconfigs"
|
|
576
|
+
group: ClassVar[str] = "apps.openshift.io"
|
|
577
|
+
version: ClassVar[str] = "v1"
|
|
578
|
+
|
|
579
|
+
metadata: ObjectMeta
|
|
580
|
+
spec: Optional[DeploymentConfigSpec] = None
|
|
581
|
+
status: Optional[DeploymentConfigStatus] = None
|
|
582
|
+
apiVersion: str = f"{group}/{version}"
|
|
583
|
+
kind: str = "DeploymentConfig"
|
|
584
|
+
|
|
585
|
+
@classmethod
|
|
586
|
+
def readNamespaced(self, name: str, namespace: str):
|
|
587
|
+
obj = DeploymentConfig(metadata=ObjectMeta(name=name, namespace=namespace)).read()
|
|
588
|
+
return type("", (object,), {"obj": obj})()
|
|
589
|
+
|
|
590
|
+
@classmethod
|
|
591
|
+
def list_namespaced(self, namespace: str):
|
|
592
|
+
deployconfigs_res = client.CustomObjectsApi().list_namespaced_custom_object(
|
|
593
|
+
group=DeploymentConfig.group,
|
|
594
|
+
version=DeploymentConfig.version,
|
|
595
|
+
namespace=namespace,
|
|
596
|
+
plural=DeploymentConfig.plural,
|
|
597
|
+
)
|
|
598
|
+
dc_list = type("", (object,), {"items": [
|
|
599
|
+
DeploymentConfig(metadata=ObjectMeta(**dc.get("metadata", {})), spec=DeploymentConfigSpec(**dc.get("spec", {})))
|
|
600
|
+
for dc in
|
|
601
|
+
deployconfigs_res.get("items", [])
|
|
602
|
+
]})()
|
|
603
|
+
|
|
604
|
+
return dc_list
|
|
605
|
+
|
|
606
|
+
@classmethod
|
|
607
|
+
def list_for_all_namespaces(self):
|
|
608
|
+
deployconfigs_res = client.CustomObjectsApi().list_cluster_custom_object(
|
|
609
|
+
group=DeploymentConfig.group,
|
|
610
|
+
version=DeploymentConfig.version,
|
|
611
|
+
plural=DeploymentConfig.plural,
|
|
612
|
+
)
|
|
613
|
+
dc_list = type("", (object,), {"items": [
|
|
614
|
+
DeploymentConfig(metadata=ObjectMeta(**dc.get("metadata", {})), spec=DeploymentConfigSpec(**dc.get("spec", {})))
|
|
615
|
+
for dc in
|
|
616
|
+
deployconfigs_res.get("items", [])
|
|
617
|
+
]})()
|
|
618
|
+
|
|
619
|
+
return dc_list
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
def DictToK8sObj(obj: Dict, class_name):
|
|
623
|
+
# Accessing Kubernetes python client private method directly which is not ideal.
|
|
624
|
+
# The reason is missing functionality to deserialize a dict to a model.
|
|
625
|
+
# This is helpful in the case of CRD's and sub models.
|
|
626
|
+
# This could potentially break on a client upgrade.
|
|
627
|
+
return client.ApiClient()._ApiClient__deserialize(obj, class_name)
|
|
628
|
+
|
|
629
|
+
|
|
533
630
|
hikaru.register_version_kind_class(RobustaPod, Pod.apiVersion, Pod.kind)
|
|
534
631
|
hikaru.register_version_kind_class(RobustaDeployment, Deployment.apiVersion, Deployment.kind)
|
|
535
632
|
hikaru.register_version_kind_class(RobustaJob, Job.apiVersion, Job.kind)
|
|
633
|
+
register_crd_class(DeploymentConfig, DeploymentConfig.plural, is_namespaced=True)
|
|
@@ -75,7 +75,7 @@ class WebexSender:
|
|
|
75
75
|
{
|
|
76
76
|
"type": "Column",
|
|
77
77
|
"width": "stretch",
|
|
78
|
-
"items": [{"type": "TextBlock", "text": header, "wrap":
|
|
78
|
+
"items": [{"type": "TextBlock", "text": header, "wrap": True}],
|
|
79
79
|
}
|
|
80
80
|
)
|
|
81
81
|
# seperating each row to add below headers of column
|
|
@@ -87,7 +87,7 @@ class WebexSender:
|
|
|
87
87
|
{
|
|
88
88
|
"type": "Column",
|
|
89
89
|
"width": "stretch",
|
|
90
|
-
"items": [{"type": "TextBlock", "text": text, "wrap":
|
|
90
|
+
"items": [{"type": "TextBlock", "text": text, "wrap": True}],
|
|
91
91
|
}
|
|
92
92
|
)
|
|
93
93
|
container["items"].append(row_json)
|
|
@@ -98,8 +98,8 @@ class WebexSender:
|
|
|
98
98
|
message_content_container = {
|
|
99
99
|
"type": "Container",
|
|
100
100
|
"items": [
|
|
101
|
-
{"type": "TextBlock", "text": message_content, "wrap":
|
|
102
|
-
{"type": "TextBlock", "text": description, "wrap":
|
|
101
|
+
{"type": "TextBlock", "text": message_content, "wrap": True},
|
|
102
|
+
{"type": "TextBlock", "text": description, "wrap": True},
|
|
103
103
|
],
|
|
104
104
|
}
|
|
105
105
|
return message_content_container
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/discovery/top_service_resolver.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robusta_cli-0.10.30a0 → robusta_cli-0.10.31}/src/robusta/core/playbooks/actions_registry.py
RENAMED
|
File without changes
|
|
File without changes
|