Documentation ¶
Index ¶
- Constants
- func NewPrivateKey() (*rsa.PrivateKey, error)
- func NewSignedServerCert(cfg cert.Config, caKey *rsa.PrivateKey, caCert *x509.Certificate, ...) (*x509.Certificate, error)
- type Provider
- func (cp *Provider) CACert() ([]byte, error)
- func (cp *Provider) CAKey() ([]byte, error)
- func (cp *Provider) Generate() error
- func (cp *Provider) ServerCert() ([]byte, error)
- func (cp *Provider) ServerKey() ([]byte, error)
- func (cp *Provider) SyncSecret(ctx context.Context, name, namespace string) error
- func (cp *Provider) TLSConfig() (*tls.Config, error)
- func (cp *Provider) WriteFile(path, certName, keyName string) error
Constants ¶
View Source
const (
Organization = "spark-operator"
)
Variables ¶
This section is empty.
Functions ¶
func NewPrivateKey ¶
func NewPrivateKey() (*rsa.PrivateKey, error)
func NewSignedServerCert ¶
func NewSignedServerCert(cfg cert.Config, caKey *rsa.PrivateKey, caCert *x509.Certificate, serverKey *rsa.PrivateKey) (*x509.Certificate, error)
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is a container of a X509 certificate file and a corresponding key file for the webhook server, and a CA certificate file for the API server to verify the server certificate.
func NewProvider ¶
NewProvider creates a new Provider instance.
func (*Provider) ServerCert ¶
ServerCert returns the PEM-encoded server cert.
func (*Provider) SyncSecret ¶
SyncSecret syncs the secret containing the certificates to the given name and namespace.
Click to show internal directories.
Click to hide internal directories.