Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldmitry committed Nov 8, 2024
1 parent 0b3197e commit 9ed4d5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cosl/coordinated_workers/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def __init__(
is_coherent: Custom coherency checker for a minimal deployment.
is_recommended: Custom coherency checker for a recommended deployment.
tracing_receivers: A dictionary of receivers and their corresponding endpoints to which the worker's workload can push traces to.
If not provided, endpoints acquired from "tracing" relation would be used.
If not provided, endpoints acquired from "tracing" relation would be used if any.
resources_limit_options: A dictionary containing resources limit option names. The dictionary should include
"cpu_limit" and "memory_limit" keys with values as option names, as defined in the config.yaml.
If no dictionary is provided, the default option names "cpu_limit" and "memory_limit" would be used.
Expand Down Expand Up @@ -257,6 +257,7 @@ def __init__(
self._container_name = container_name
self._resources_limit_options = resources_limit_options or {}
self.remote_write_endpoints_getter = remote_write_endpoints
self._tracing_receivers = tracing_receivers

self.nginx = Nginx(
self._charm,
Expand Down Expand Up @@ -304,7 +305,6 @@ def __init__(
relation_name=self._endpoints["tracing"],
protocols=["otlp_http", "jaeger_thrift_http"],
)
self._tracing_receivers = tracing_receivers or self._tracing_receivers_urls()

# Resources patch
self.resources_patch = (
Expand Down Expand Up @@ -671,7 +671,7 @@ def update_cluster(self):
privkey_secret_id=(
self.cluster.grant_privkey(VAULT_SECRET_LABEL) if self.tls_available else None
),
tracing_receivers=self._tracing_receivers,
tracing_receivers=self._tracing_receivers or self._tracing_receivers_urls(),
remote_write_endpoints=(
self.remote_write_endpoints_getter()
if self.remote_write_endpoints_getter
Expand Down

0 comments on commit 9ed4d5c

Please sign in to comment.