Documentation
¶
Index ¶
- Constants
- type CertificateReconcilerConfig
- type Certs
- type IResourceRetriever
- type KeptnWebhookCertificateReconciler
- type LabelSelectorRetriever
- func (r LabelSelectorRetriever) GetCRDs(ctx context.Context) (*apiv1.CustomResourceDefinitionList, error)
- func (r LabelSelectorRetriever) GetMutatingWebhooks(ctx context.Context) (*admissionregistrationv1.MutatingWebhookConfigurationList, error)
- func (r LabelSelectorRetriever) GetValidatingWebhooks(ctx context.Context) (*admissionregistrationv1.ValidatingWebhookConfigurationList, error)
- type ObservedObjects
- type ResourceNameRetriever
- func (r ResourceNameRetriever) GetCRDs(ctx context.Context) (*apiv1.CustomResourceDefinitionList, error)
- func (r ResourceNameRetriever) GetMutatingWebhooks(ctx context.Context) (*admissionregistrationv1.MutatingWebhookConfigurationList, error)
- func (r ResourceNameRetriever) GetValidatingWebhooks(ctx context.Context) (*admissionregistrationv1.ValidatingWebhookConfigurationList, error)
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 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.
type IResourceRetriever ¶
type IResourceRetriever interface {
GetMutatingWebhooks(ctx context.Context) (*admissionregistrationv1.MutatingWebhookConfigurationList, error)
GetValidatingWebhooks(ctx context.Context) (*admissionregistrationv1.ValidatingWebhookConfigurationList, error)
GetCRDs(ctx context.Context) (*apiv1.CustomResourceDefinitionList, error)
}
func NewResourceRetriever ¶
func NewResourceRetriever(config CertificateReconcilerConfig) IResourceRetriever
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 NewReconciler ¶
func NewReconciler(config CertificateReconcilerConfig) *KeptnWebhookCertificateReconciler
func (*KeptnWebhookCertificateReconciler) Reconcile ¶
func (r *KeptnWebhookCertificateReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
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 ¶
func (LabelSelectorRetriever) GetCRDs ¶
func (r LabelSelectorRetriever) GetCRDs(ctx context.Context) (*apiv1.CustomResourceDefinitionList, error)
func (LabelSelectorRetriever) GetMutatingWebhooks ¶
func (r LabelSelectorRetriever) GetMutatingWebhooks(ctx context.Context) (*admissionregistrationv1.MutatingWebhookConfigurationList, error)
func (LabelSelectorRetriever) GetValidatingWebhooks ¶
func (r LabelSelectorRetriever) GetValidatingWebhooks(ctx context.Context) (*admissionregistrationv1.ValidatingWebhookConfigurationList, error)
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 ¶
func (r ResourceNameRetriever) GetCRDs(ctx context.Context) (*apiv1.CustomResourceDefinitionList, error)
func (ResourceNameRetriever) GetMutatingWebhooks ¶
func (r ResourceNameRetriever) GetMutatingWebhooks(ctx context.Context) (*admissionregistrationv1.MutatingWebhookConfigurationList, error)
func (ResourceNameRetriever) GetValidatingWebhooks ¶
func (r ResourceNameRetriever) GetValidatingWebhooks(ctx context.Context) (*admissionregistrationv1.ValidatingWebhookConfigurationList, error)
Click to show internal directories.
Click to hide internal directories.