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:
Jacob Beacham
2017-02-10 14:02:58 -08:00
parent b88b31cff4
commit 7682aa53b1
3 changed files with 16 additions and 11 deletions

View File

@@ -58,12 +58,16 @@ func newController(csrs ...runtime.Object) (*testController, error) {
return nil, err
}
signer, err := NewCFSSLSigner(certFile, keyFile)
if err != nil {
return nil, err
}
approver := &fakeAutoApprover{make(chan *certificates.CertificateSigningRequest, 1)}
controller, err := NewCertificateController(
client,
informerFactory.Certificates().V1beta1().CertificateSigningRequests(),
certFile,
keyFile,
signer,
approver,
)
if err != nil {