From 1d1fb258461920b950e4d40e77db1e84dfe0284f Mon Sep 17 00:00:00 2001 From: Hayden Roszell Date: Thu, 14 Dec 2023 11:47:48 -0700 Subject: [PATCH] chore(comments): Write function comments and update license header --- internal/controllers/certificaterequest_controller.go | 2 ++ internal/controllers/issuer_controller.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/internal/controllers/certificaterequest_controller.go b/internal/controllers/certificaterequest_controller.go index a544ca4..b106a26 100644 --- a/internal/controllers/certificaterequest_controller.go +++ b/internal/controllers/certificaterequest_controller.go @@ -60,6 +60,8 @@ type CertificateRequestReconciler struct { // +kubebuilder:rbac:groups=cert-manager.io,resources=certificaterequests/status,verbs=get;update;patch // +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch +// Reconcile attempts to sign a CertificateRequest given the configuration provided and a configured +// Command signer instance. func (r *CertificateRequestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error) { log := ctrl.LoggerFrom(ctx) diff --git a/internal/controllers/issuer_controller.go b/internal/controllers/issuer_controller.go index a2c8e53..9f96af0 100644 --- a/internal/controllers/issuer_controller.go +++ b/internal/controllers/issuer_controller.go @@ -60,6 +60,7 @@ type IssuerReconciler struct { //+kubebuilder:rbac:groups=command-issuer.keyfactor.com,resources=issuers/status;clusterissuers/status,verbs=get;update;patch //+kubebuilder:rbac:groups=command-issuer.keyfactor.com,resources=issuers/finalizers,verbs=update +// newIssuer returns a new Issuer or ClusterIssuer object func (r *IssuerReconciler) newIssuer() (client.Object, error) { issuerGVK := commandissuer.GroupVersion.WithKind(r.Kind) ro, err := r.Scheme.New(issuerGVK) @@ -69,6 +70,7 @@ func (r *IssuerReconciler) newIssuer() (client.Object, error) { return ro.(client.Object), nil } +// Reconcile reconciles and updates the status of an Issuer or ClusterIssuer object func (r *IssuerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error) { log := ctrl.LoggerFrom(ctx)