Skip to content

Commit

Permalink
fix provider_labels parsing for container provider
Browse files Browse the repository at this point in the history
  • Loading branch information
rplevka committed Apr 19, 2024
1 parent 3cccf7d commit 083511d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion broker/providers/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def run_container(self, container_host, **kwargs):
# prefix eventual label keys with 'broker.' to conform to the docker guidelines
# https://docs.docker.com/config/labels-custom-metadata/#key-format-recommendations
kwargs["provider_labels"] = {
f"broker.{label[0]}": label[1] for label in kwargs["provider_labels"].items()
f"broker.{label[0]}": label[1] for label in kwargs.get("provider_labels", {}).items()
}
# process eventual labels that were passed externally, split by "="
kwargs["provider_labels"].update(
Expand Down

0 comments on commit 083511d

Please sign in to comment.