feat: modify s3 to use urlib3#4
Conversation
…s and import verification
…orage' in Helm templates
|
|
||
| ssl_enabled = get_redis_variable("REDIS_TLS") | ||
| cert_reqs = os.environ.get("SSL_CERT_REQS", None) | ||
| health_check_interval = int(os.environ.get("REDIS_HEALTH_CHECK_INTERVAL", "0")) |
There was a problem hiding this comment.
When set to 0 (the default), it's disabled. When set to a positive integer (seconds), the redis client periodically sends a PING to the server on idle connections to detect broken connections early — at the cost of extra network traffic.
it's intentionally disabled — the socket timeouts already handle unresponsive Redis quickly enough without needing background keepalive pings.
i suppose it's nice to have as an option
| "retry_on_timeout": False, | ||
| } | ||
|
|
||
| if username: |
There was a problem hiding this comment.
if username is defined does it mean all http requests should be included within the request?
| pass | ||
|
|
||
| def __getattr__(self, name): | ||
| return getattr(self.wrapped, name) No newline at end of file |
| # errors return False (cache-miss) so MapProxy falls back to the next source. | ||
| # REDIS_POOL_TIMEOUT: max seconds to wait for a free connection from the pool. | ||
| # SSL_CERT_REQS: server-cert verification ('required'/'optional'/'none'). | ||
| ENV SOCKET_TIMEOUT_SECONDS="0.1" \ |
There was a problem hiding this comment.
This controls how long Redis operations (reads/writes) can block before timing out. Without it, a slow or unresponsive Redis would stall the tile request indefinitely
| SSL_CERT_REQS="required" | ||
|
|
||
| # Environment defaults — uWSGI tuning | ||
| ENV PROCESSES="6" \ |
| "access-control-max-age", | ||
| } | ||
|
|
||
| if os.getenv("CORS_ENABLED", "false").lower() == "true": |
There was a problem hiding this comment.
this CORS section should be handled by the nginx after the upgrade
There was a problem hiding this comment.
we decided to remove as this can be configured in mapproxy yaml
… update related documentation Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
This pull request introduces several important improvements to the build and deployment process, focusing on enhanced Redis and S3 cache resilience, support for custom patching of MapProxy cache backends, and improved Kubernetes/Helm integration. The changes include new environment defaults for Redis, mechanisms for patching MapProxy's Redis and S3 cache modules at build time, and the addition of Helm chart files for Kubernetes deployments.
Key changes:
MapProxy Cache Backend Patching & Resilience
redis.pyands3.pycache backends at build time using bind mounts in the Dockerfile. This allows for hotfixes or customizations without modifying upstream images. Patch application is controlled via thePATCH_FILESbuild argument.redis.pywith improved error handling, connection resilience, and support for environment-configured timeouts and SSL options for Redis cache operations.s3.pywith enhanced error handling and support for alternate S3 endpoints, credentials, and HTTP fallback for S3 cache operations.Kubernetes & Helm Integration
helm/Chart.yamland.helmignorefile to support Helm-based Kubernetes deployments, including dependencies onnginxandmclabelscharts. [1] [2]entrypoint.shscript to better support Kubernetes by ensuring required directories are created and providing clearer error messages if the uWSGI config is missing (as provided by a ConfigMap).These changes collectively improve the reliability, configurability, and deployability of the MapProxy service in modern containerized environments.