Documentation
¶
Overview ¶
Package tls manages TLS certificates and secrets for CobaltCore operators. It provides functions for ensuring cert-manager Certificate resources exist and retrieving the resulting TLS secrets.
Feature: CC-0005
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureCertificate ¶
func EnsureCertificate(ctx context.Context, c client.Client, scheme *runtime.Scheme, owner client.Object, cert *certmanagerv1.Certificate) (bool, error)
EnsureCertificate creates a cert-manager Certificate if it does not exist or updates its spec if it already exists. It returns (true, nil) when the Certificate has a Ready condition with status True, (false, nil) when it exists but is not yet ready, and (false, error) on unexpected failures (CC-0005).
func GetTLSSecret ¶
func GetTLSSecret(ctx context.Context, c client.Client, key client.ObjectKey) (certPEM []byte, keyPEM []byte, err error)
GetTLSSecret retrieves the TLS certificate and private key from the Secret identified by key. It returns an error if the Secret is not found or is missing the expected tls.crt / tls.key entries (CC-0005).
func IsCertificateReady ¶
func IsCertificateReady(cert *certmanagerv1.Certificate) bool
IsCertificateReady returns true if the Certificate has a Ready condition with status True (CC-0005).
Types ¶
This section is empty.