Documentation
¶
Index ¶
- Constants
- func FilterCMCertificates(certs []certmanagerv1.Certificate) []certmanagerv1.Certificate
- func GenerateCMCertificateForOwner(owner client.Object, issuer *types.NamespacedName, secretName string, ...) (*certmanagerv1.Certificate, error)
- func ListCMCertificatesForOwner(ctx context.Context, c client.Client, namespace string, uid types.UID, ...) ([]certmanagerv1.Certificate, error)
- func ListCMSecretsForOwner(ctx context.Context, c client.Client, owner client.Object, ...) ([]corev1.Secret, error)
- func ReduceCMCertificates(ctx context.Context, k8sClient client.Client, ...) error
Constants ¶
const ( // ManagerUIDLabel is a label indicating the owner ID when references are not possible. ManagerUIDLabel = ossconsts.OperatorLabelPrefix + "owner-id" )
Variables ¶
This section is empty.
Functions ¶
func FilterCMCertificates ¶
func FilterCMCertificates(certs []certmanagerv1.Certificate) []certmanagerv1.Certificate
FilterCMCertificates filters out the Certificates to be kept and returns all the Certificates to be deleted. The filtered-out Certificates is decided as follows: 1. creationTimestamp (older is better)
func GenerateCMCertificateForOwner ¶
func GenerateCMCertificateForOwner( owner client.Object, issuer *types.NamespacedName, secretName string, additionalLabels client.MatchingLabels, ) ( *certmanagerv1.Certificate, error, )
GenerateCMCertificateForOwner generate a cert-manager Certificate for the given client.Object to be provisioned by the given Issuer.
func ListCMCertificatesForOwner ¶
func ListCMCertificatesForOwner( ctx context.Context, c client.Client, namespace string, uid types.UID, listOpts ...client.ListOption, ) ([]certmanagerv1.Certificate, error)
ListCMCertificatesForOwner retrieves cert-manager certificate resources owned by a resource with a given UID.
func ListCMSecretsForOwner ¶
func ListCMSecretsForOwner( ctx context.Context, c client.Client, owner client.Object, listOpts ...client.ListOption, ) ([]corev1.Secret, error)
ListCMSecretsForOwner lists Secrets with a given owner label, for cert-manager Secrets with no ownership information or a Certificate owner.
func ReduceCMCertificates ¶
func ReduceCMCertificates( ctx context.Context, k8sClient client.Client, certs []certmanagerv1.Certificate, filter cmCertificateFilterer, ) error
ReduceCMCertificates detects the best Certificate in the set and deletes all the others.
Types ¶
This section is empty.