Skip to content

Commit

Permalink
chore(cert-manager): updated readme of cert-manager (#1393)
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Bacher <[email protected]>
  • Loading branch information
bacherfl authored May 15, 2023
1 parent 831fc46 commit 12fcca8
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion klt-cert-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
"github.com/keptn/lifecycle-toolkit/klt-cert-manager/controllers/keptnwebhookcontroller"
"github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/certificates"
certCommon "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common"
"github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/webhook"
// +kubebuilder:scaffold:imports
)
Expand All @@ -76,7 +78,20 @@ func main() {
webhookBuilder := webhook.NewWebhookBuilder().
SetNamespace(env.PodNamespace).
SetPodName(env.PodName).
SetConfigProvider(cmdConfig.NewKubeConfigProvider())
SetConfigProvider(cmdConfig.NewKubeConfigProvider()).
SetManagerProvider(
webhook.NewWebhookManagerProvider(
mgr.GetWebhookServer().CertDir, "tls.key", "tls.crt"),
).
SetCertificateWatcher(
certificates.NewCertificateWatcher(
mgr.GetAPIReader(),
mgr.GetWebhookServer().CertDir,
env.PodNamespace,
certCommon.SecretName,
setupLog,
),
)
setupLog.Info("starting webhook and manager")
if err := webhookBuilder.Run(mgr, map[string]*admission.Webhook{
Expand Down

0 comments on commit 12fcca8

Please sign in to comment.