Skip to content

Commit

Permalink
add option to use custom image for the demo alert (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoiGlinik authored Sep 28, 2023
1 parent 718f240 commit aa73371
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/robusta/cli/main.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import base64
import json
import os
import random
import subprocess
import time
import traceback
import uuid
from typing import Dict, List, Optional, Union

import certifi
import typer
import yaml
from hikaru.model.rel_1_26 import Container, Job, JobSpec, ObjectMeta, PodSpec, PodTemplateSpec
from kubernetes import client, config
from pydantic import BaseModel, Extra

import certifi
import os
from robusta._version import __version__
from robusta.cli.auth import RSAKeyPair
from robusta.cli.auth import app as auth_commands
Expand All @@ -32,6 +32,7 @@
from robusta.core.sinks.robusta.robusta_sink_params import RobustaSinkConfigWrapper, RobustaSinkParams
from robusta.core.sinks.slack.slack_sink_params import SlackSinkConfigWrapper, SlackSinkParams
from robusta.integrations.prometheus.utils import AlertManagerDiscovery

ADDITIONAL_CERTIFICATE: str = os.environ.get("CERTIFICATE", "")
# TODO - separate shared classes to a separated shared repo, to remove dependencies between the cli and runner

Expand Down Expand Up @@ -413,6 +414,7 @@ def demo_alert(
help="Additional alert labels. Comma separated list. For example: env=prod,team=infra ",
),
kube_config: str = typer.Option(None, help="Kube config file path override."),
image: str = typer.Option("curlimages/curl", help="Docker image with curl support."),
):
"""
Create a demo alert on AlertManager.
Expand Down Expand Up @@ -489,7 +491,7 @@ def demo_alert(
containers=[
Container(
name="alert-curl",
image="curlimages/curl",
image=image,
command=command,
)
],
Expand Down

0 comments on commit aa73371

Please sign in to comment.