File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ exclude = .git,
1212 .mypy_cache,
1313 src/robusta/integrations/kubernetes/autogenerated,
1414 src/robusta/integrations/kubernetes/custom_models.py
15- ignore = E501, W503, E203
15+ ignore = E501, W503, E203, E402
Original file line number Diff line number Diff line change 1+ import os
2+
3+ from robusta .runner .ssl_utils import add_custom_certificate
4+
5+ ADDITIONAL_CERTIFICATE : str = os .environ .get ("CERTIFICATE" , "" )
6+
7+ if add_custom_certificate (ADDITIONAL_CERTIFICATE ):
8+ print ("added custom certificate" )
9+
10+ # DO NOT ADD ANY CODE ABOVE THIS
11+ # ADDING IMPORTS BEFORE ADDING THE CUSTOM CERTS MIGHT INIT HTTP CLIENTS THAT DOESN'T RESPECT THE CUSTOM CERT
12+
113import signal
214
315from robusta .core .model .env_vars import (
4- ADDITIONAL_CERTIFICATE ,
516 ENABLE_TELEMETRY ,
617 ROBUSTA_TELEMETRY_ENDPOINT ,
718 SEND_ADDITIONAL_TELEMETRY ,
1324from robusta .runner .config_loader import ConfigLoader
1425from robusta .runner .log_init import init_logging , logging
1526from robusta .runner .process_setup import process_setup
16- from robusta .runner .ssl_utils import add_custom_certificate
1727from robusta .runner .telemetry_service import TelemetryLevel , TelemetryService
1828from robusta .runner .web import Web
1929from robusta .utils .server_start import ServerStart
@@ -23,8 +33,6 @@ def main():
2333 process_setup ()
2434 init_logging ()
2535 ServerStart .set ()
26- if add_custom_certificate (ADDITIONAL_CERTIFICATE ):
27- logging .info ("added custom certificate" )
2836
2937 create_monkey_patches ()
3038 registry = Registry ()
You can’t perform that action at this time.
0 commit comments