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
Copy file name to clipboardExpand all lines: api/v1alpha2/etcdcluster_types.go
+21-3Lines changed: 21 additions & 3 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)",message="exactly one of spec.tls.peer.secretRefor spec.tls.peer.certManager must be set"
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"
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,17 +203,35 @@ 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.
206
+
// Mutually exclusive with CertManager and AutoTLS.
"cluster runs etcd --peer-auto-tls (member %q advertises %s; no peerSecret in the legacy spec): migrated as spec.tls.peer.autoTLS so members keep interoperating across replacement/scale. "+
208
+
"This is INSECURE — peer traffic is encrypted but NOT authenticated (no shared CA). Move to real mTLS (spec.tls.peer.secretRef or certManager) when you can; that is a delete-and-recreate since spec.tls is immutable.",
209
+
m.Name, m.PeerURL))
210
+
break
211
+
}
212
+
}
213
+
}
214
+
188
215
// Replicas follow the LIVE member count. A legacy spec disagreeing with
189
216
// reality (mid-scale crash, manual edits) is surfaced, not silently
190
217
// trusted — adopting with spec.replicas != len(members) would make the
0 commit comments