mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Allow the CertificateController to use any Signer implementation.
This will allow developers to create CertificateControllers with arbitrary Signers, instead of forcing the use of CFSSLSigner.
This commit is contained in:
@@ -32,11 +32,17 @@ func startCSRController(ctx ControllerContext) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
c := ctx.ClientBuilder.ClientOrDie("certificate-controller")
|
||||
|
||||
signer, err := certcontroller.NewCFSSLSigner(ctx.Options.ClusterSigningCertFile, ctx.Options.ClusterSigningKeyFile)
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to start certificate controller: %v", err)
|
||||
return false, nil
|
||||
}
|
||||
|
||||
certController, err := certcontroller.NewCertificateController(
|
||||
c,
|
||||
ctx.NewInformerFactory.Certificates().V1beta1().CertificateSigningRequests(),
|
||||
ctx.Options.ClusterSigningCertFile,
|
||||
ctx.Options.ClusterSigningKeyFile,
|
||||
signer,
|
||||
certcontroller.NewGroupApprover(ctx.Options.ApproveAllKubeletCSRsForGroup),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user