Skip to content

Commit c7c6601

Browse files
authored
[ROB-2024] assume role support (#468)
1 parent f82111d commit c7c6601

File tree

6 files changed

+16
-7
lines changed

6 files changed

+16
-7
lines changed

poetry.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ kubernetes = "^26.1.0"
3030
prometheus-api-client = "0.5.3"
3131
numpy = ">=1.26.4,<1.27.0"
3232
alive-progress = "^3.1.2"
33-
prometrix = "0.2.2"
33+
prometrix = "0.2.3"
3434
slack-sdk = "^3.21.3"
3535
pandas = "2.2.2"
3636
requests = "2.32.0"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ packaging==24.0 ; python_version >= "3.9" and python_full_version < "3.13"
2727
pandas==2.2.2 ; python_version >= "3.9" and python_full_version < "3.13"
2828
pillow==10.3.0 ; python_version >= "3.9" and python_full_version < "3.13"
2929
prometheus-api-client==0.5.3 ; python_version >= "3.9" and python_full_version < "3.13"
30-
prometrix==0.2.2 ; python_version >= "3.9" and python_full_version < "3.13"
30+
prometrix==0.2.3 ; python_version >= "3.9" and python_full_version < "3.13"
3131
pyasn1-modules==0.3.0 ; python_version >= "3.9" and python_full_version < "3.13"
3232
pyasn1==0.5.1 ; python_version >= "3.9" and python_full_version < "3.13"
3333
pydantic==1.10.15 ; python_version >= "3.9" and python_full_version < "3.13"

robusta_krr/core/integrations/prometheus/prometheus_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def generate_prometheus_config(
6060
aws_region=region,
6161
token=token,
6262
service_name=service_name,
63+
assume_role_arn=settings.eks_assume_role,
6364
**baseconfig,
6465
)
6566
# coralogix config

robusta_krr/core/models/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class Config(pd.BaseSettings):
4646
eks_secret_key: Optional[pd.SecretStr] = pd.Field(None)
4747
eks_service_name: Optional[str] = pd.Field(None)
4848
eks_managed_prom_region: Optional[str] = pd.Field(None)
49+
eks_assume_role: Optional[str] = pd.Field(None)
4950
coralogix_token: Optional[pd.SecretStr] = pd.Field(None)
5051
openshift: bool = pd.Field(False)
5152

robusta_krr/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ def run_strategy(
183183
help="Sets the region for eks prometheus connection.",
184184
rich_help_panel="Prometheus EKS Settings",
185185
),
186+
eks_assume_role: Optional[str] = typer.Option(
187+
None,
188+
"--eks-assume-role",
189+
help="Sets the assumed role for eks prometheus connection. (for cross-account role assumption)",
190+
rich_help_panel="Prometheus EKS Settings",
191+
),
186192
coralogix_token: Optional[str] = typer.Option(
187193
None,
188194
"--coralogix-token",
@@ -343,6 +349,7 @@ def run_strategy(
343349
prometheus_label=prometheus_label,
344350
eks_managed_prom=eks_managed_prom,
345351
eks_managed_prom_region=eks_managed_prom_region,
352+
eks_assume_role=eks_assume_role,
346353
eks_managed_prom_profile_name=eks_managed_prom_profile_name,
347354
eks_access_key=eks_access_key,
348355
eks_secret_key=eks_secret_key,

0 commit comments

Comments
 (0)