Skip to content

Commit

Permalink
update disk benchmark image (#1439)
Browse files Browse the repository at this point in the history
* update disk benchmark image

* update disk utils image - new clean image
  • Loading branch information
arikalon1 authored Jun 3, 2024
1 parent 98a9b1a commit 7eb7548
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
3 changes: 2 additions & 1 deletion playbooks/robusta_playbooks/disk_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
)

from robusta.api import (
FIO_IMAGE,
IMAGE_REGISTRY,
INSTALLATION_NAMESPACE,
ExecutionBaseEvent,
Expand Down Expand Up @@ -64,7 +65,7 @@ def disk_benchmark(event: ExecutionBaseEvent, action_params: DiskBenchmarkParams
try:
pvc.createNamespacedPersistentVolumeClaim(action_params.namespace)
pv_name = "robusta-benchmark-pv"
image = f"{IMAGE_REGISTRY}/robusta-fio-benchmark"
image = f"{IMAGE_REGISTRY}/{FIO_IMAGE}"
name = "robusta-fio-disk-benchmark"
mount_path = "/robusta/data"
spec = PodSpec(
Expand Down
3 changes: 2 additions & 1 deletion playbooks/robusta_playbooks/node_disk_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from hikaru.model.rel_1_26 import EnvVar, EnvVarSource, ObjectFieldSelector, PodList

from robusta.api import (
DISK_TOOLS_IMAGE,
IMAGE_REGISTRY,
BaseBlock,
MarkdownBlock,
Expand Down Expand Up @@ -67,7 +68,7 @@ def node_disk_analyzer(event: NodeEvent, params: DiskAnalyzerParams):
# run disk-tools on node and parse its json output
disk_info_str = RobustaPod.run_debugger_pod(
node.metadata.name,
pod_image=f"{IMAGE_REGISTRY}/disk-tools:1.4",
pod_image=f"{IMAGE_REGISTRY}/{DISK_TOOLS_IMAGE}",
env=[
EnvVar(
name="CURRENT_POD_UID",
Expand Down
22 changes: 11 additions & 11 deletions src/robusta/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
GrafanaParams,
LogEnricherParams,
NamedRegexPattern,
OOMGraphEnricherParams,
OomKillParams,
PodResourceGraphEnricherParams,
PodRunningParams,
ProcessParams,
Expand All @@ -33,8 +35,6 @@
ResourceChartItemType,
ResourceChartResourceType,
ResourceGraphEnricherParams,
OOMGraphEnricherParams,
OomKillParams,
TimedPrometheusParams,
VideoEnricherParams,
)
Expand All @@ -47,7 +47,9 @@
DEFAULT_TIMEZONE,
DISCORD_TABLE_COLUMNS_LIMIT,
DISCOVERY_PERIOD_SEC,
DISK_TOOLS_IMAGE,
ENABLE_TELEMETRY,
FIO_IMAGE,
FLOAT_PRECISION_LIMIT,
GIT_MAX_RETRIES,
GRAFANA_READ_TIMEOUT,
Expand Down Expand Up @@ -107,15 +109,15 @@
from robusta.core.playbooks.actions_registry import Action, action
from robusta.core.playbooks.common import get_event_timestamp, get_resource_events, get_resource_events_table
from robusta.core.playbooks.container_playbook_utils import create_container_graph
from robusta.core.playbooks.crash_reporter import send_crash_report
from robusta.core.playbooks.job_utils import CONTROLLER_UID, get_job_all_pods, get_job_latest_pod, get_job_selector
from robusta.core.playbooks.node_playbook_utils import create_node_graph_enrichment
from robusta.core.playbooks.pod_utils.crashloop_utils import get_crash_report_enrichments
from robusta.core.playbooks.pod_utils.imagepull_utils import (
get_image_pull_backoff_enrichment,
get_image_pull_backoff_container_statuses,
get_image_pull_backoff_enrichment,
)
from robusta.core.playbooks.pod_utils.pending_pod_utils import get_pending_pod_enrichment
from robusta.core.playbooks.crash_reporter import send_crash_report
from robusta.core.playbooks.prometheus_enrichment_utils import (
XAxisLine,
create_chart_from_prometheus_query,
Expand All @@ -139,38 +141,37 @@
CallbackChoice,
DividerBlock,
Emojis,
EmptyFileBlock,
Enrichment,
FileBlock,
EmptyFileBlock,
Filterable,
Finding,
FindingSeverity,
FindingStatus,
FindingSubject,
HeaderBlock,
JsonBlock,
KRRScanReportBlock,
KubernetesDiffBlock,
KubernetesFieldsBlock,
ListBlock,
MarkdownBlock,
PopeyeScanReportBlock,
PrometheusBlock,
ScanReportBlock,
PopeyeScanReportBlock,
KRRScanReportBlock,
ScanReportRow,
TableBlock,
VideoLink,
)

from robusta.core.reporting.base import EnrichmentType
from robusta.core.reporting.blocks import GraphBlock
from robusta.core.reporting.action_requests import (
ActionRequestBody,
ExternalActionRequest,
OutgoingActionRequest,
PartialAuth,
sign_action_request,
)
from robusta.core.reporting.base import EnrichmentType
from robusta.core.reporting.blocks import GraphBlock
from robusta.core.reporting.callbacks import ExternalActionRequestBuilder
from robusta.core.reporting.consts import (
EnrichmentAnnotation,
Expand All @@ -191,7 +192,6 @@
ScheduledJob,
SchedulingInfo,
)
from robusta.core.playbooks.node_playbook_utils import create_node_graph_enrichment
from robusta.core.sinks import SinkBase, SinkBaseParams, SinkConfigBase
from robusta.core.sinks.kafka import KafkaSink, KafkaSinkConfigWrapper, KafkaSinkParams
from robusta.core.triggers.helm_releases_triggers import HelmReleasesEvent, HelmReleasesTriggerEvent
Expand Down
3 changes: 3 additions & 0 deletions src/robusta/core/model/env_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ def load_bool(env_var, default: bool):

IMAGE_REGISTRY = os.environ.get("IMAGE_REGISTRY", "us-central1-docker.pkg.dev/genuine-flight-317411/devel")

FIO_IMAGE = os.environ.get("FIO_IMAGE", "robusta-fio-benchmark:1.0")
DISK_TOOLS_IMAGE = os.environ.get("DISK_TOOLS_IMAGE", "disk-tools:1.5")

CLUSTER_DOMAIN = os.environ.get("CLUSTER_DOMAIN", "cluster.local")

IS_OPENSHIFT = load_bool("IS_OPENSHIFT", False)
Expand Down

0 comments on commit 7eb7548

Please sign in to comment.