Documentation ¶
Index ¶
- func CertificateToPem(certificateDER []byte) []byte
- func GenerateCACert() (*KeyPair, *PemPair, error)
- func GenerateInClusterServiceName(props CertificateProps) string
- func GeneratePrivateKey() (*rsa.PrivateKey, error)
- func IsTLSPairShouldBeUpdated(tlsPair *PemPair) bool
- func PrivateKeyToPem(rsaKey *rsa.PrivateKey) []byte
- type CertificateProps
- type KeyPair
- type PemPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertificateToPem ¶ added in v1.3.0
CertificateToPem ...
func GenerateCACert ¶ added in v1.2.0
GenerateCACert creates the self-signed CA cert and private key it will be used to sign the webhook server certificate
func GenerateInClusterServiceName ¶
func GenerateInClusterServiceName(props CertificateProps) string
GenerateInClusterServiceName The generated service name should be the common name for TLS certificate
func GeneratePrivateKey ¶ added in v1.3.0
func GeneratePrivateKey() (*rsa.PrivateKey, error)
GeneratePrivateKey Generates RSA private key
func IsTLSPairShouldBeUpdated ¶ added in v1.1.0
IsTLSPairShouldBeUpdated checks if TLS pair has expited and needs to be updated
func PrivateKeyToPem ¶ added in v1.3.0
func PrivateKeyToPem(rsaKey *rsa.PrivateKey) []byte
PrivateKeyToPem Creates PEM block from private key object
Types ¶
type CertificateProps ¶ added in v1.3.0
CertificateProps Properties of TLS certificate which should be issued for webhook server
type KeyPair ¶ added in v1.2.0
type KeyPair struct { Cert *x509.Certificate Key *rsa.PrivateKey }
KeyPair ...
type PemPair ¶ added in v1.3.0
PemPair The pair of TLS certificate corresponding private key, both in PEM format
func GenerateCertPem ¶ added in v1.2.0
func GenerateCertPem(caCert *KeyPair, props CertificateProps) (*PemPair, error)
GenerateCertPem takes the results of GenerateCACert and uses it to create the PEM-encoded public certificate and private key, respectively