certs

package
v1.75.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApproveCertificateSigningRequest

func ApproveCertificateSigningRequest(ctx context.Context, client kubernetes.Interface, csr *certv1.CertificateSigningRequest, approver string) error

func Certificate

func Certificate(ctx context.Context, client kubernetes.Interface, name string) ([]byte, error)

func CertificateExistsFunc

func CertificateExistsFunc(client kubernetes.Interface, name string) wait.ConditionWithContextFunc

func CreateCertificateSigningRequests

func CreateCertificateSigningRequests(ctx context.Context, client kubernetes.Interface, csr *certv1.CertificateSigningRequest) error

func DeleteCertificateSigningRequest

func DeleteCertificateSigningRequest(ctx context.Context, client kubernetes.Interface, name string) error

DeleteCertificateSigningRequest deletes the CSR name and waits until the apiserver no longer serves it. ctx bounds both, with certificateWaitTimeout as the longest wait (plumbing#129).

func DeleteCertificateSigningRequestUID added in v1.51.0

func DeleteCertificateSigningRequestUID(ctx context.Context, client kubernetes.Interface, name string, uid types.UID) error

DeleteCertificateSigningRequestUID deletes the CSR name only if it is still the object uid: one DELETE with a UID precondition, so a CSR re-created under the same name since is never touched (plumbing#134 review). ctx bounds the request. A precondition that no longer holds is answered Conflict.

func GetCertificateSigningRequest

func GetCertificateSigningRequest(ctx context.Context, client kubernetes.Interface, name string) (*certv1.CertificateSigningRequest, error)

func NewCertificateRequest

func NewCertificateRequest(opts CertificateRequestOptions) ([]byte, error)

func NewPrivateKey

func NewPrivateKey() (*rsa.PrivateKey, error)

func WaitForCertificate

func WaitForCertificate(ctx context.Context, client kubernetes.Interface, name string) error

WaitForCertificate waits until the CSR name carries its certificate. ctx bounds the wait, with certificateWaitTimeout as the longest.

Types

type CertificateRequestOptions

type CertificateRequestOptions struct {
	Key             *rsa.PrivateKey
	Username        string
	Groups          []string
	ExtraExtensions []pkix.Extension
}

type CertificateSigningRequestOptions

type CertificateSigningRequestOptions struct {
	CSR        []byte
	Duration   time.Duration
	UserID     string
	Username   string
	SignerName string
	Usages     []string
}

Jump to

Keyboard shortcuts

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