Documentation
¶
Index ¶
- Constants
- func GetCertIDSecret(namespace string, name string, certID string) *v1.Secret
- func GetSecretNamespace(issuer client.Object, req ctrl.Request) string
- func GetSpecAndStatus(issuer client.Object) (*ncmv1.IssuerSpec, *ncmv1.IssuerStatus, error)
- func IssuerHasCondition(status ncmv1.IssuerStatus, c ncmv1.IssuerCondition) bool
- func IssuerHasConditionAndReasonAndMessage(status ncmv1.IssuerStatus, c ncmv1.IssuerCondition) bool
- type CertificateRequestReconciler
- type IssuerReconciler
- func (r *IssuerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *IssuerReconciler) SetCondition(issuerStatus *ncmv1.IssuerStatus, status ncmv1.ConditionStatus, ...)
- func (r *IssuerReconciler) SetStatus(ctx context.Context, issuer client.Object, ...) error
- func (r *IssuerReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
const ( APIErrorRequeueTime = time.Second * 30 CSRRequeueTime = time.Minute )
Variables ¶
This section is empty.
Functions ¶
func GetCertIDSecret ¶
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.
func IssuerHasConditionAndReasonAndMessage ¶
func IssuerHasConditionAndReasonAndMessage(status ncmv1.IssuerStatus, c ncmv1.IssuerCondition) bool
IssuerHasCondition will return true if the given issuer has a condition matching the provided IssuerCondition. The Status, Reason and Message will be used for comparison.
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) 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 ¶
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 ncmv1.ReasonType, 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 ncmv1.ReasonType, message string, args ...interface{}) error
func (*IssuerReconciler) SetupWithManager ¶
func (r *IssuerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.