resources

package
v0.39.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidCertificate

func IsValidCertificate(s *corev1.Secret, domains []string, minimumLifespan time.Duration) (bool, error)

IsValidCertificate checks whether the certificate within the given Secret is valid for a list of domains with at least the specified minimum lifespan remaining in the NotAfter field.

func MakeEndpoints

func MakeEndpoints(o *v1alpha1.Certificate, opts ...func(*corev1.Endpoints)) *corev1.Endpoints

MakeEndpoints creates an Endpoints, which we will point at ourselves. We populate the endpoints with out own Pod's IP address, which we get via the downward API.

func MakeSecret

func MakeSecret(o *v1alpha1.Certificate, cert *tls.Certificate) (*corev1.Secret, error)

MakeSecret creates a TLS-type secret from the given tls.Certificate.

func MakeService

func MakeService(o *v1alpha1.Certificate, opts ...func(*corev1.Service)) *corev1.Service

MakeService creates a Service, which we will point at ourselves. This service does not have a selector because it is created alongside the Certificate, but we will point it at our Pod running in the system namespace by directly manipulating Endpoints (see below).

func ServiceName added in v0.20.0

func ServiceName(cert *v1alpha1.Certificate) string

func WithEndpointsPort added in v0.20.0

func WithEndpointsPort(p int) func(*corev1.Endpoints)

WithEndpointsPort customizes the port exposed by MakeEndpoints

func WithServicePort added in v0.20.0

func WithServicePort(p int) func(*corev1.Service)

WithServicePort customizes the port exposed by MakeService

Types

This section is empty.

Jump to

Keyboard shortcuts

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