Skip to content

Commit

Permalink
webhook server use TLS 1.2 as minimum version
Browse files Browse the repository at this point in the history
  • Loading branch information
kishorj committed Dec 2, 2021
1 parent f25c48f commit 12fc830
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func main() {
setupLog.Error(err, "unable to start manager")
os.Exit(1)
}
config.ConfigureWebhookServerCert(controllerCFG.RuntimeConfig, mgr)
config.ConfigureWebhookServer(controllerCFG.RuntimeConfig, mgr)
clientSet, err := kubernetes.NewForConfig(mgr.GetConfig())
if err != nil {
setupLog.Error(err, "unable to obtain clientSet")
Expand Down
5 changes: 3 additions & 2 deletions pkg/config/runtime_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ func BuildRuntimeOptions(rtCfg RuntimeConfig, scheme *runtime.Scheme) ctrl.Optio
}
}

// ConfigureWebhookServerCert set up the server cert for the webhook server.
func ConfigureWebhookServerCert(rtCfg RuntimeConfig, mgr ctrl.Manager) {
// ConfigureWebhookServer set up the server cert for the webhook server.
func ConfigureWebhookServer(rtCfg RuntimeConfig, mgr ctrl.Manager) {
mgr.GetWebhookServer().CertName = rtCfg.WebhookCertName
mgr.GetWebhookServer().KeyName = rtCfg.WebhookKeyName
mgr.GetWebhookServer().TLSMinVersion = "1.2"
}

0 comments on commit 12fc830

Please sign in to comment.