diff --git a/src/charm_helpers.py b/src/charm_helpers.py index a63b447..f74d995 100644 --- a/src/charm_helpers.py +++ b/src/charm_helpers.py @@ -132,7 +132,7 @@ def create_env(model_name, app_name, container_name, config, state): "RUNNING_TTL_MINUTES": config["pod-running-ttl-minutes"], "SUCCEEDED_TTL_MINUTES": config["pod-successful-ttl-minutes"], "UNSUCCESSFUL_TTL_MINUTES": config["pod-unsuccessful-ttl-minutes"], - "INTERNAL_API_HOST": f"{app_name}:{INTERNAL_API_PORT}", + "INTERNAL_API_HOST": f"http://{app_name}:{INTERNAL_API_PORT}", "AIRBYTE_SERVER_HOST": f"{app_name}:{INTERNAL_API_PORT}", "CONFIG_API_HOST": f"{app_name}:{INTERNAL_API_PORT}", "CONNECTOR_BUILDER_SERVER_API_HOST": f"{app_name}:{CONNECTOR_BUILDER_SERVER_API_PORT}", @@ -147,7 +147,7 @@ def create_env(model_name, app_name, container_name, config, state): env.update( { "INTERNAL_API_HOST": f"{app_name}:{INTERNAL_API_PORT}", - "WORKLOAD_API_HOST": f"http://{app_name}:{WORKLOAD_API_PORT}", + "WORKLOAD_API_HOST": f"{app_name}:{WORKLOAD_API_PORT}", } ) diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py index d2ef249..5ffec17 100644 --- a/tests/unit/test_charm.py +++ b/tests/unit/test_charm.py @@ -369,7 +369,7 @@ def create_plan(container_name, storage_type): "DATABASE_PORT": "5432", "DATABASE_URL": "jdbc:postgresql://myhost:5432/airbyte-k8s_db", "DATABASE_USER": "jean-luc@db", - "INTERNAL_API_HOST": "airbyte-k8s:8001", + "INTERNAL_API_HOST": "http://airbyte-k8s:8001", "JOBS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION": "0.29.15.001", "JOB_KUBE_MAIN_CONTAINER_IMAGE_PULL_POLICY": "IfNotPresent", "JOB_KUBE_NAMESPACE": "airbyte-model", @@ -422,7 +422,7 @@ def create_plan(container_name, storage_type): if container_name in ["airbyte-workload-launcher", "airbyte-workers"]: want_plan["services"][container_name]["environment"].update( - {"INTERNAL_API_HOST": "airbyte-k8s:8001", "WORKLOAD_API_HOST": "http://airbyte-k8s:8007"} + {"INTERNAL_API_HOST": "airbyte-k8s:8001", "WORKLOAD_API_HOST": "airbyte-k8s:8007"} ) if storage_type == StorageType.minio: