certificates

package
v2.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL