mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-26 12:38:47 +01:00
fix: ensure certificate gets updated on reload
Fixes #10707. `GetCertificate` ensures that the most current version of `a.settings.Certificate` is used. It's still a bit of a mystery to me as to why the reloading of the server does not work for this, since it should fulfill the same function. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
This commit is contained in:
@@ -469,8 +469,9 @@ func (a *ArgoCDServer) Run(ctx context.Context, listeners *Listeners) {
|
||||
|
||||
// If not matched, we assume that its TLS.
|
||||
tlsl := tcpm.Match(cmux.Any())
|
||||
tlsConfig := tls.Config{
|
||||
Certificates: []tls.Certificate{*a.settings.Certificate},
|
||||
tlsConfig := tls.Config{}
|
||||
tlsConfig.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) {
|
||||
return a.settings.Certificate, nil
|
||||
}
|
||||
if a.TLSConfigCustomizer != nil {
|
||||
a.TLSConfigCustomizer(&tlsConfig)
|
||||
|
||||
Reference in New Issue
Block a user