certificates

package
v1.6.1-0...-f207c0f Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

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