From: chaitanyabodlapati (@chaitanyabodlapati) <noreply+chaitanyabodlapati@github.com>
To: patroni/patroni <noreply+patroni-patroni@github.com>
Subject: Re: [patroni/patroni] PR #3608: Add opt-in TLS verification flags for etcd/etcd3 DCS backends
Date: Tue, 29 Sep 2026 21:55:09 +0000
Message-ID: <gh-patroni-patroni-3608-c5899754182@github.com> (raw)
In-Reply-To: <gh-patroni-patroni-3608@github.com>
References: <gh-patroni-patroni-3608@github.com>
Thanks for the detailed guidance and the reference implementation — I've applied it.
1. `_configure_tls` reworked per your version-aware approach: on urllib3 1.x it installs the `EtcdHTTPSConnectionPool` (SAN-only via the legacy matcher, CN fallback left to urllib3); on 2.x it builds a custom context only to enable CN fallback, loading system trust when no CA is configured.
2. TLS is now configured from `_load_machines_cache` after endpoint discovery instead of in `__init__`, so SRV-discovered HTTPS endpoints are handled via the advertised client URL scheme.
3. Added the three options to the etcd/etcd3 validators and environment parsing, documented them in both `yaml_configuration.rst` and `ENVIRONMENT.rst`, and extended the `typings/urllib3` stubs so pyright passes.
4. Tests cover both the urllib3 1.x and 2.x code paths.
Please take another look when you have a chance.