Documentation ¶
Index ¶
- func DecodeCertBytes(cert string) ([]byte, error)
- func EncodeCertBytes(cert []byte) string
- type CertManager
- func (c *CertManager) CACertBytes() []byte
- func (c *CertManager) CAKeyBytes() []byte
- func (c *CertManager) GenerateCA() error
- func (c *CertManager) GenerateCertificate(profile string, certReq *csr.CertificateRequest, signingConf *config.Signing) (certBytes []byte, keyBytes []byte, err error)
- func (c *CertManager) GetOrCreateCASecret(ctx context.Context, caSecretName string, createCA bool) (*corev1.Secret, bool, error)
- func (c *CertManager) LoadCAFromK8s(secret *corev1.Secret) error
- func (c *CertManager) StoreCAInK8s(ctx context.Context) (*corev1.Secret, error)
- type Parameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeCertBytes ¶ added in v0.11.0
DecodeCertBytes returns a decoded format of the certificate bytes.
func EncodeCertBytes ¶ added in v0.11.0
EncodeCertBytes returns an encoded format of the certificate bytes.
Types ¶
type CertManager ¶
type CertManager struct {
// contains filtered or unexported fields
}
func NewCertManager ¶
func NewCertManager(client k8sCertManagerImplementation, p Parameters) *CertManager
func (*CertManager) CACertBytes ¶
func (c *CertManager) CACertBytes() []byte
CACertBytes return the CA public certificate bytes, or nil when it is not set.
func (*CertManager) CAKeyBytes ¶ added in v0.11.0
func (c *CertManager) CAKeyBytes() []byte
CAKeyBytes return the CA private certificate bytes, or nil when it is not set.
func (*CertManager) GenerateCA ¶
func (c *CertManager) GenerateCA() error
func (*CertManager) GenerateCertificate ¶
func (c *CertManager) GenerateCertificate(profile string, certReq *csr.CertificateRequest, signingConf *config.Signing) (certBytes []byte, keyBytes []byte, err error)
func (*CertManager) GetOrCreateCASecret ¶ added in v0.10.0
func (c *CertManager) GetOrCreateCASecret(ctx context.Context, caSecretName string, createCA bool) (*corev1.Secret, bool, error)
GetOrCreateCASecret Returns a pointer to the secret data for the Cilium CA and true when it was created, false otherwise. If the Cilium CA does not already exist this function will generate a new one when createCA is true.
func (*CertManager) LoadCAFromK8s ¶
func (c *CertManager) LoadCAFromK8s(secret *corev1.Secret) error
func (*CertManager) StoreCAInK8s ¶
type Parameters ¶
type Parameters struct {
Namespace string
}
Click to show internal directories.
Click to hide internal directories.