keptnwebhookcontroller

package
v0.0.0-...-67b0140 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootKey     = "ca.key"
	RootCert    = "ca.crt"
	RootCertOld = "ca.crt.old"
	ServerKey   = "tls.key"
	ServerCert  = "tls.crt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateReconcilerConfig

type CertificateReconcilerConfig struct {
	WatchResources *ObservedObjects
	MatchLabels    labels.Set
	Namespace      string
	Log            logr.Logger
	Client         client.Client
	Scheme         *runtime.Scheme
	CancelMgrFunc  context.CancelFunc
}

type Certs

type Certs struct {
	Domain  string
	SrcData map[string][]byte
	Data    map[string][]byte

	Now time.Time
	// contains filtered or unexported fields
}

Certs handles creation and renewal of CA and SSL/TLS server certificates.

func (*Certs) Validate

func (cs *Certs) Validate() error

Validate checks for certificates and keys on cs.SrcData and renews them if needed. The existing (or new) certificates will be stored on cs.Data.

type KeptnWebhookCertificateReconciler

type KeptnWebhookCertificateReconciler struct {
	Client            client.Client
	Scheme            *runtime.Scheme
	CancelMgrFunc     context.CancelFunc
	Log               logr.Logger
	Namespace         string
	MatchLabels       labels.Set
	FilterPredicate   predicate.Predicate
	ResourceRetriever IResourceRetriever
}

KeptnWebhookCertificateReconciler reconciles a KeptnWebhookCertificate object

func (*KeptnWebhookCertificateReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile

func (*KeptnWebhookCertificateReconciler) SetupWithManager

func (r *KeptnWebhookCertificateReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type LabelSelectorRetriever

type LabelSelectorRetriever struct {
	MatchLabels labels.Set
	Client      client.Client
}

func (LabelSelectorRetriever) GetCRDs

type ObservedObjects

type ObservedObjects struct {
	MutatingWebhooks          []string
	ValidatingWebhooks        []string
	CustomResourceDefinitions []string
	Deployments               []string
}

ObservedObjects contains information about which Kubernetes resources should be observed by the reconciler.

type ResourceNameRetriever

type ResourceNameRetriever struct {
	Client         client.Client
	WatchResources ObservedObjects
	Log            logr.Logger
}

func (ResourceNameRetriever) GetCRDs

Jump to

Keyboard shortcuts

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