Documentation
¶
Index ¶
- func GenerateCACert() (*KeyPair, *TlsPemPair, error)
- func GenerateInClusterServiceName(props TlsCertificateProps) string
- func IsTLSPairShouldBeUpdated(tlsPair *TlsPemPair) bool
- func TLSCertificateToPem(certificateDER []byte) []byte
- func TLSGeneratePrivateKey() (*rsa.PrivateKey, error)
- func TLSPrivateKeyToPem(rsaKey *rsa.PrivateKey) []byte
- type KeyPair
- type TlsCertificateProps
- type TlsPemPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCACert ¶ added in v1.2.0
func GenerateCACert() (*KeyPair, *TlsPemPair, error)
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 TlsCertificateProps) string
GenerateInClusterServiceName The generated service name should be the common name for TLS certificate
func IsTLSPairShouldBeUpdated ¶ added in v1.1.0
func IsTLSPairShouldBeUpdated(tlsPair *TlsPemPair) bool
IsTLSPairShouldBeUpdated checks if TLS pair has expited and needs to be updated
func TLSCertificateToPem ¶ added in v1.2.0
func TLSGeneratePrivateKey ¶ added in v1.1.0
func TLSGeneratePrivateKey() (*rsa.PrivateKey, error)
TLSGeneratePrivateKey Generates RSA private key
func TLSPrivateKeyToPem ¶ added in v1.1.0
func TLSPrivateKeyToPem(rsaKey *rsa.PrivateKey) []byte
TLSPrivateKeyToPem Creates PEM block from private key object
Types ¶
type KeyPair ¶ added in v1.2.0
type KeyPair struct { Cert *x509.Certificate Key *rsa.PrivateKey }
type TlsCertificateProps ¶
TlsCertificateProps Properties of TLS certificate which should be issued for webhook server
type TlsPemPair ¶
TlsPemPair The pair of TLS certificate corresponding private key, both in PEM format
func GenerateCertPem ¶ added in v1.2.0
func GenerateCertPem(caCert *KeyPair, props TlsCertificateProps, fqdncn bool) (*TlsPemPair, error)
GenerateCertPem takes the results of GenerateCACert and uses it to create the PEM-encoded public certificate and private key, respectively