worker: support a proxy for repository mtls configuration
Allows setting a proxy for the mtls settings for a specific repository. This is useful when consuming content from the content service in consoledot.
This commit is contained in:
parent
677e30cc68
commit
05a1e8f054
4 changed files with 21 additions and 0 deletions
|
|
@ -440,11 +440,21 @@ func main() {
|
|||
if err != nil {
|
||||
logrus.Fatalf("Repository MTL baseurl not valid: %v", err)
|
||||
}
|
||||
|
||||
var proxyURL *url.URL
|
||||
if config.RepositoryMTLSConfig.Proxy != "" {
|
||||
proxyURL, err = url.Parse(config.RepositoryMTLSConfig.Proxy)
|
||||
if err != nil {
|
||||
logrus.Fatalf("Repository Proxy url not valid: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
repositoryMTLSConfig = &RepositoryMTLSConfig{
|
||||
BaseURL: baseURL,
|
||||
CA: config.RepositoryMTLSConfig.CA,
|
||||
MTLSClientKey: config.RepositoryMTLSConfig.MTLSClientKey,
|
||||
MTLSClientCert: config.RepositoryMTLSConfig.MTLSClientCert,
|
||||
Proxy: proxyURL,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue