apiext

package
v3.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureCRDs

func ConfigureCRDs(
	ctx context.Context,
	restConfig *rest.Config,
	serviceName, serviceNamespace string,
	caSecret *k8sTypesCoreV1.Secret,
	scheme *k8sRuntime.Scheme,
) error

ConfigureCRDs uses 'restConfig' to look at all CustomResourceDefinitions that are mentioned in 'scheme', and adjusts each of their .spec.conversion.webhook.clientConfig.caBundle to match the "tls.crt" field in 'caSecret'.

func LogLevelIsAtLeastDebug

func LogLevelIsAtLeastDebug() bool

func ServeHTTP

func ServeHTTP(ctx context.Context, port int) error

func ServeHTTPS

func ServeHTTPS(ctx context.Context, port int, ca *CA, scheme *k8sRuntime.Scheme) error

Types

type CA

type CA struct {
	Cert *x509.Certificate
	Key  *rsa.PrivateKey
	// contains filtered or unexported fields
}

CA is a Certificat Authority that can mint new TLS certificates.

func EnsureCA

func EnsureCA(ctx context.Context, restConfig *rest.Config, namespace string) (*CA, *k8sTypesCoreV1.Secret, error)

EnsureCA ensures that a Kubernetes Secret named "emissary-ingress-webhook-ca" exists in the given namespace (creating it if it doesn't), and returns both the Secret itself and a CA using the information from the Secret.

func (*CA) GenServerCert

func (ca *CA) GenServerCert(ctx context.Context, hostname string) (*tls.Certificate, error)

Jump to

Keyboard shortcuts

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