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
returnnil, fmt.Errorf("missing keyData in etcd CA bundle %s/%s and no apiserver-etcd-client certificate found", clusterKey.Namespace, fmt.Sprintf("%s-etcd", clusterKey.Name))
148
+
}
140
149
141
-
// If the CA key is defined, the cluster is using a managed etcd, and so we can generate a new
142
-
// etcd client certificate for the controllers.
143
-
// Otherwise the cluster is using an external etcd; in this case the only option to connect to etcd is to re-use
144
-
// the apiserver-etcd-client certificate.
145
-
// TODO: consider if we can detect if we are using external etcd in a more explicit way (e.g. looking at the config instead of deriving from the existing certificates)
146
-
varclientCert tls.Certificate
147
-
ifkeyData!=nil {
148
-
// Get client cert from cache if possible, otherwise generate it and add it to the cache.
149
-
// Note: The caching assumes that the etcd CA is not rotated during the lifetime of a Cluster.
150
-
ifentry, ok:=m.ClientCertCache.Has(ClientCertEntry{Cluster: clusterKey, ClusterUID: cluster.UID, EncryptionAlgorithm: keyEncryptionAlgorithm}.Key()); ok {
151
-
clientCert=*entry.ClientCert
152
-
} else {
153
-
// The client cert expires after 10 years, but that's okay as the cache has a TTL of 1 day.
0 commit comments