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:
parent
233b546f6f
commit
c4e03d4641
@ -93,8 +93,8 @@ class Config:
|
|||||||
self.allowed_compression_types = ["gz"]
|
self.allowed_compression_types = ["gz"]
|
||||||
|
|
||||||
# config for x-tenant-endpoint to receive storage connection information per tenant
|
# config for x-tenant-endpoint to receive storage connection information per tenant
|
||||||
self.persistence_service_public_key = "redaction"
|
self.tenant_decryption_public_key = read_from_environment("TENANT_PUBLIC_KEY", "redaction")
|
||||||
self.persistence_service_tenant_endpoint = "http://persistence-service-v1:8080/internal-api/tenants"
|
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
|
# Value to see if we should write a consumer token to a file
|
||||||
self.write_consumer_token = read_from_environment("WRITE_CONSUMER_TOKEN", "False")
|
self.write_consumer_token = read_from_environment("WRITE_CONSUMER_TOKEN", "False")
|
||||||
|
|||||||
@ -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)
|
default_storage_info: StorageInfo = get_storage_info_from_config(config)
|
||||||
get_storage_info_from_tenant_id = partial(
|
get_storage_info_from_tenant_id = partial(
|
||||||
get_storage_info_from_endpoint,
|
get_storage_info_from_endpoint,
|
||||||
config.persistence_service_public_key,
|
config.tenant_decryption_public_key,
|
||||||
config.persistence_service_tenant_endpoint,
|
config.tenant_endpoint,
|
||||||
)
|
)
|
||||||
monitor = get_monitor_from_config(config)
|
monitor = get_monitor_from_config(config)
|
||||||
payload_parser: QueueMessagePayloadParser = get_queue_message_payload_parser(config)
|
payload_parser: QueueMessagePayloadParser = get_queue_message_payload_parser(config)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "pyinfra"
|
name = "pyinfra"
|
||||||
version = "1.5.7"
|
version = "1.5.8"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Francisco Schulz <francisco.schulz@iqser.com>"]
|
authors = ["Francisco Schulz <francisco.schulz@iqser.com>"]
|
||||||
license = "All rights reseverd"
|
license = "All rights reseverd"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user