crds

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LookaheadInterval = 90 * 24 * time.Hour
)

Variables

This section is empty.

Functions

func CheckCerts

func CheckCerts(c CertInfo, dnsName string, at time.Time) error

CheckCerts verifies that certificates exist in a given fs location and if they're valid.

func ValidCert

func ValidCert(caCert, cert, key []byte, dnsName string, at time.Time) (bool, error)

Types

type CertInfo

type CertInfo struct {
	CertDir  string
	CertName string
	KeyName  string
	CAName   string
}

type KeyPairArtifacts

type KeyPairArtifacts struct {
	Cert    *x509.Certificate
	Key     *rsa.PrivateKey
	CertPEM []byte
	KeyPEM  []byte
}

type Reconciler

type Reconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme

	SvcName         string
	SvcNamespace    string
	SecretName      string
	SecretNamespace string
	CrdResources    []string

	CAName          string
	CAOrganization  string
	RequeueInterval time.Duration
	// contains filtered or unexported fields
}

func New

func New(k8sClient client.Client, scheme *runtime.Scheme, logger logr.Logger,
	interval time.Duration, svcName, svcNamespace, secretName, secretNamespace string, resources []string) *Reconciler

func (*Reconciler) CreateCACert

func (r *Reconciler) CreateCACert(begin, end time.Time) (*KeyPairArtifacts, error)

func (*Reconciler) CreateCertPEM

func (r *Reconciler) CreateCertPEM(ca *KeyPairArtifacts, begin, end time.Time) ([]byte, []byte, error)

func (*Reconciler) ReadyCheck

func (r *Reconciler) ReadyCheck(_ *http.Request) error

ReadyCheck reviews if all webhook configs have been injected into the CRDs and if the referenced webhook service is ready.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, opts controller.Options) error

Jump to

Keyboard shortcuts

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