You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(main): make peer-auto-tls a reserved annotation, not typed spec
Address review feedback (PR #330): an unauthenticated peer plane must not
be a discoverable, CEL-blessed option for new clusters.
- Drop spec.tls.peer.autoTLS (and the PeerAutoTLS type); revert the PeerTLS
CEL rule to the two-way has(secretRef) != has(certManager) union.
- Carry legacy --peer-auto-tls forward on a cluster-level reserved annotation
etcd-operator.cozystack.io/peer-auto-tls instead. deriveMemberTLS reads it
(superseded by an explicit peer secretRef/certManager) and propagates it to
every member it builds; clusterPeerScheme treats it as https.
- etcd-migrate stamps the annotation and raises it as a SecurityWarning,
rendered with a loud marker in the plan AND re-surfaced in the post-apply
summary so an unauthenticated peer plane can't be adopted unnoticed.
- Document the mode, carry-forward and off-ramp in docs/migration.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: api/v1alpha2/etcdcluster_types.go
+3-21Lines changed: 3 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -194,7 +194,7 @@ type ClientCertManagerTLS struct {
194
194
// PeerTLS configures TLS for the etcd peer API. When PeerTLS is set, peer
195
195
// is always mTLS.
196
196
//
197
-
// +kubebuilder:validation:XValidation:rule="[has(self.secretRef), has(self.certManager), has(self.autoTLS)].filter(x, x).size() == 1",message="exactly one of spec.tls.peer.secretRef, spec.tls.peer.certManager or spec.tls.peer.autoTLS must be set"
197
+
// +kubebuilder:validation:XValidation:rule="has(self.secretRef) != has(self.certManager)",message="exactly one of spec.tls.peer.secretRefor spec.tls.peer.certManager must be set"
198
198
typePeerTLSstruct {
199
199
// SecretRef points at a Secret in the cluster's namespace holding
200
200
// the peer cert+key in the standard kubernetes.io/tls shape:
@@ -203,35 +203,17 @@ type PeerTLS struct {
203
203
// connections — and --peer-trusted-ca-file is always populated).
204
204
// The peer cert MUST carry both serverAuth and clientAuth in EKU.
205
205
//
206
-
// Mutually exclusive with CertManager and AutoTLS.
0 commit comments