controllers

package
v0.0.0-...-2583119 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	APIErrorRequeueTime = time.Second * 30
	CSRRequeueTime      = time.Minute
)

Variables

This section is empty.

Functions

func GetCertIDSecret

func GetCertIDSecret(namespace string, name string, certID string) *v1.Secret

func GetSecretNamespace

func GetSecretNamespace(issuer client.Object, req ctrl.Request) string

func GetSpecAndStatus

func GetSpecAndStatus(issuer client.Object) (*ncmv1.IssuerSpec, *ncmv1.IssuerStatus, error)

func IssuerHasCondition

func IssuerHasCondition(status ncmv1.IssuerStatus, c ncmv1.IssuerCondition) bool

IssuerHasCondition will return true if the given issuer has a condition matching the provided IssuerCondition. Only the Type and Status field will be used in the comparison, meaning that this function will return 'true' even if the Reason, Message and LastTransitionTime fields do not match.

Types

type CertificateRequestReconciler

type CertificateRequestReconciler struct {
	client.Client
	Scheme       *runtime.Scheme
	Clock        clock.Clock
	Recorder     record.EventRecorder
	Provisioners *provisioner.ProvisionersMap
	Log          logr.Logger
}

CertificateRequestReconciler reconciles a CertificateRequest object.

func (*CertificateRequestReconciler) Reconcile

func (*CertificateRequestReconciler) SetupWithManager

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

type IssuerReconciler

type IssuerReconciler struct {
	client.Client
	Kind         string
	Scheme       *runtime.Scheme
	Clock        clock.Clock
	Recorder     record.EventRecorder
	Provisioners *provisioner.ProvisionersMap
	Log          logr.Logger
}

IssuerReconciler reconciles a Issuer object.

func (*IssuerReconciler) Reconcile

func (r *IssuerReconciler) Reconcile(ctx context.Context, req 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. the Issuer object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*IssuerReconciler) SetCondition

func (r *IssuerReconciler) SetCondition(issuerStatus *ncmv1.IssuerStatus, status ncmv1.ConditionStatus, reason, message string)

SetCondition will set a 'condition' on the given issuer.

  • If no condition of the same type already exists, the condition will be inserted with the LastTransitionTime set to the current time.
  • If a condition of the same type and state already exists, the condition will be updated but the LastTransitionTime will not be modified.
  • If a condition of the same type and different state already exists, the condition will be updated and the LastTransitionTime set to the current time.

func (*IssuerReconciler) SetStatus

func (r *IssuerReconciler) SetStatus(ctx context.Context, issuer client.Object, conditionStatus ncmv1.ConditionStatus, reason, message string, args ...interface{}) error

func (*IssuerReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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