const ( // CertManagerNamespace indicates the namespace where is cert-manager deployed CertManagerNamespace = "cert-manager" // CertManagerDeployment indicates the name of the cert-manager deployment CertManagerDeployment = "cert-manager" // CertManagerReleaseName indicates the release name for cert-manager chart CertManagerReleaseName = "cert-manager" // CertManagerChart name of the cert-manager chart CertManagerChart = "stable/cert-manager" // CertManagerCRDsFile files which contains the cert-manager CRDs CertManagerCRDsFile = "https://raw.githubusercontent.com/jetstack/cert-manager/release-0.6/deploy/manifests/00-crds.yaml" // CertManagerIssuerProd name of the production issuer CertManagerIssuerProd = "letsencrypt-prod" // CertManagerIssuerStaging name of the staging issuer CertManagerIssuerStaging = "letsencrypt-staging" )
const CertSecretPrefix = "tls-"
CertSecretPrefix used as prefix for all certificate object names
CleanAllCerts removes all certs and their associated secrets which hold a TLS certificated issued by cert-manager
func CleanCertManagerResources(certclient certclient.Interface, ns string, ic kube.IngressConfig) error
CleanCertManagerResources removed the cert-manager resources from the given namespaces
func CleanCerts(client kubernetes.Interface, certclient certclient.Interface, ns string, filter Certificate) error
CleanCerts removes the certs and their associated secrets which hold a TLS certificate issued by cert-manager
func CreateCertManagerResources(certclient certclient.Interface, targetNamespace string, ic kube.IngressConfig) error
CreateCertManagerResources creates the cert-manager resources such as issuer in the target namespace
CreateIssuer creates a cert-manager issuer according with the ingress configuration
WaitCertificateExists waits until the timeout for the certificate with the provided name to be available in the certificates list
WaitCertificateIssuedReady wait for a certificate issued by cert-manager until is ready or the timeout is reached
func WatchCertificatesIssuedReady(ctx context.Context, client certclient.Interface, ns string) (<-chan Certificate, error)
WatchCertificatesIssuedReady starts watching for ready certificate in the given namespace. If the namespace is empty, it will watch the entire cluster. The caller can stop watching by cancelling the context.
Certificate keeps some information related to a certificate issued by cert-manager
GetIssuedReadyCertificates returns the current ready certificates in the given namespace
ToCertificates converts a list of services into a list of certificates. The certificate name is built from the application label of the service.
String returns the certificate information in a string format