Documentation ¶
Index ¶
- func ParseCSR(obj *certificates.CertificateSigningRequest) (*x509.CertificateRequest, error)
- func RequestCertificate(client certificatesclient.CertificateSigningRequestInterface, csrData []byte, ...) (req *certificates.CertificateSigningRequest, err error)
- func RequestNodeCertificate(client certificatesclient.CertificateSigningRequestInterface, ...) (certData []byte, err error)
- func WaitForCertificate(client certificatesclient.CertificateSigningRequestInterface, ...) (certData []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCSR ¶
func ParseCSR(obj *certificates.CertificateSigningRequest) (*x509.CertificateRequest, error)
ParseCSR extracts the CSR from the API object and decodes it.
func RequestCertificate ¶
func RequestCertificate(client certificatesclient.CertificateSigningRequestInterface, csrData []byte, name string, usages []certificates.KeyUsage, privateKey interface{}) (req *certificates.CertificateSigningRequest, err error)
RequestCertificate will either use an existing (if this process has run before but not to completion) or create a certificate signing request using the PEM encoded CSR and send it to API server, then it will watch the object's status, once approved by API server, it will return the API server's issued certificate (pem-encoded). If there is any errors, or the watch timeouts, it will return an error.
func RequestNodeCertificate ¶
func RequestNodeCertificate(client certificatesclient.CertificateSigningRequestInterface, privateKeyData []byte, nodeName types.NodeName) (certData []byte, err error)
RequestNodeCertificate will create a certificate signing request for a node (Organization and CommonName for the CSR will be set as expected for node certificates) and send it to API server, then it will watch the object's status, once approved by API server, it will return the API server's issued certificate (pem-encoded). If there is any errors, or the watch timeouts, it will return an error. This is intended for use on nodes (kubelet and kubeadm).
func WaitForCertificate ¶
func WaitForCertificate(client certificatesclient.CertificateSigningRequestInterface, req *certificates.CertificateSigningRequest, timeout time.Duration) (certData []byte, err error)
WaitForCertificate waits for a certificate to be issued until timeout, or returns an error.
Types ¶
This section is empty.