pki

package
v1.3.1119 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const CertSecretPrefix = "tls-"

CertSecretPrefix used as prefix for all certificate object names

Variables

This section is empty.

Functions

func CleanAllCerts added in v1.3.814

func CleanAllCerts(client kubernetes.Interface, certclient certclient.Interface, ns string) error

CleanAllCerts removes all certs and their associated secrets which hold a TLS certificated issued by cert-manager

func CleanCertManagerResources added in v1.3.814

func CleanCertManagerResources(certclient certclient.Interface, ns string, ic kube.IngressConfig) error

CleanCertManagerResources removed the cert-manager resources from the given namespaces

func CleanCerts

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 added in v1.3.814

func CreateCertManagerResources(certclient certclient.Interface, targetNamespace string, ic kube.IngressConfig) error

CreateCertManagerResources creates the cert-manager resources such as issuer in the target namespace

func CreateIssuer added in v1.3.814

func CreateIssuer(certclient certclient.Interface, ns string, ic kube.IngressConfig) error

CreateIssuer creates a cert-manager issuer according with the ingress configuration

func WaitCertificateExists added in v1.3.818

func WaitCertificateExists(client certclient.Interface, name string, ns string, timeout time.Duration) error

WaitCertificateExists waits until the timeout for the certificate with the provided name to be available in the certificates list

func WaitCertificateIssuedReady

func WaitCertificateIssuedReady(client certclient.Interface, name string, ns string, timeout time.Duration) error

WaitCertificateIssuedReady wait for a certificate issued by cert-manager until is ready or the timeout is reached

func WatchCertificatesIssuedReady

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.

Types

type Certificate

type Certificate struct {
	// Name certificate name
	Name string
	//Namespace certificate namespace
	Namespace string
}

Certificate keeps some information related to a certificate issued by cert-manager

func GetIssuedReadyCertificates

func GetIssuedReadyCertificates(client certclient.Interface, ns string) ([]Certificate, error)

GetIssuedReadyCertificates returns the current ready certificates in the given namespace

func ToCertificates

func ToCertificates(services []*v1.Service) []Certificate

ToCertificates converts a list of services into a list of certificates. The certificate name is built from the application label of the service.

func (Certificate) String

func (c Certificate) String() string

String returns the certificate information in a string format

Jump to

Keyboard shortcuts

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