Fix: New tenant storage information endpoint

Parametrize tenant enpoint and publick decryption key as environment
variable and set the default value to new endpoint.
This commit is contained in:
Julius Unverfehrt 2023-06-15 16:22:26 +02:00
parent 233b546f6f
commit c4e03d4641
3 changed files with 5 additions and 5 deletions

View File

@ -93,8 +93,8 @@ class Config:
self.allowed_compression_types = ["gz"]
# config for x-tenant-endpoint to receive storage connection information per tenant
self.persistence_service_public_key = "redaction"
self.persistence_service_tenant_endpoint = "http://persistence-service-v1:8080/internal-api/tenants"
self.tenant_decryption_public_key = read_from_environment("TENANT_PUBLIC_KEY", "redaction")
self.tenant_endpoint = read_from_environment("TENANT_ENDPOINT", "http://tenant-user-management:8081/internal-api/tenants")
# Value to see if we should write a consumer token to a file
self.write_consumer_token = read_from_environment("WRITE_CONSUMER_TOKEN", "False")

View File

@ -113,8 +113,8 @@ def make_payload_processor(data_processor: Callable, config: Config = None) -> P
default_storage_info: StorageInfo = get_storage_info_from_config(config)
get_storage_info_from_tenant_id = partial(
get_storage_info_from_endpoint,
config.persistence_service_public_key,
config.persistence_service_tenant_endpoint,
config.tenant_decryption_public_key,
config.tenant_endpoint,
)
monitor = get_monitor_from_config(config)
payload_parser: QueueMessagePayloadParser = get_queue_message_payload_parser(config)

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "pyinfra"
version = "1.5.7"
version = "1.5.8"
description = ""
authors = ["Francisco Schulz <francisco.schulz@iqser.com>"]
license = "All rights reseverd"