Skip to content

Commit

Permalink
Re-use cfg-factory in delivery-client
Browse files Browse the repository at this point in the history
Especially useful for screnarios where cfg-factory needs custom
initialisation, e.g. secret replication.
  • Loading branch information
zkdev committed Nov 26, 2024
1 parent 8cb9bed commit 7e335f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ccc/delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def default_client_if_available(
routes = delivery.client.DeliveryServiceRoutes(
base_url=delivery_endpoints.base_url(),
)
return delivery.client.DeliveryServiceClient(routes=routes)
return delivery.client.DeliveryServiceClient(
routes=routes,
cfg_factory=cfg_factory,
)


def client(
Expand All @@ -69,7 +72,10 @@ def client(
base_url=delivery_endpoints.base_url(),
)

return delivery.client.DeliveryServiceClient(routes=routes)
return delivery.client.DeliveryServiceClient(
routes=routes,
cfg_factory=cfg_factory,
)


def endpoints(cfg_set=None):
Expand Down
1 change: 1 addition & 0 deletions cli/gardener_ci/_oci.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ def osinfo(
routes=delivery.client.DeliveryServiceRoutes(
base_url=delivery_cfg.base_url(),
),
cfg_factory=cfg_factory,
)
else:
delivery_client = None
Expand Down

0 comments on commit 7e335f2

Please sign in to comment.