diff --git a/pkg/apis/cert/v1alpha1/types.go b/pkg/apis/cert/v1alpha1/types.go index 34056755b..6b63c019b 100644 --- a/pkg/apis/cert/v1alpha1/types.go +++ b/pkg/apis/cert/v1alpha1/types.go @@ -96,7 +96,7 @@ type IssuerRef struct { Namespace string `json:"namespace,omitempty"` } -// PrivateKeyAlgorithm is the type for the algorithm +// PrivateKeyAlgorithm is the type for the algorithm. // +kubebuilder:validation:Enum=RSA;ECDSA type PrivateKeyAlgorithm string @@ -108,7 +108,7 @@ const ( ECDSAKeyAlgorithm PrivateKeyAlgorithm = "ECDSA" ) -// PrivateKeySize is the size for the algorithm +// PrivateKeySize is the size for the algorithm. // +kubebuilder:validation:Enum=256;384;2048;3072;4096 type PrivateKeySize int32 @@ -202,7 +202,7 @@ type QualifiedIssuerRef struct { Namespace string `json:"namespace"` } -// IsDefaultCluster returns true if the reference is on the default cluster +// IsDefaultCluster returns true if the reference is on the default cluster. func (r QualifiedIssuerRef) IsDefaultCluster() bool { return r.Cluster == "default" } diff --git a/pkg/cert/legobridge/certificate.go b/pkg/cert/legobridge/certificate.go index 4802daf99..d03faca3e 100644 --- a/pkg/cert/legobridge/certificate.go +++ b/pkg/cert/legobridge/certificate.go @@ -148,7 +148,7 @@ func obtainForDomains(client *lego.Client, domains []string, input ObtainInput) return client.Certificate.Obtain(request) } -// ToKeyType extracts the key type from the +// ToKeyType extracts the key type from the private key spec. func ToKeyType(privateKeySpec *api.CertificatePrivateKey) (certcrypto.KeyType, error) { keyType := certcrypto.RSA2048 if privateKeySpec != nil { @@ -189,7 +189,7 @@ func ToKeyType(privateKeySpec *api.CertificatePrivateKey) (certcrypto.KeyType, e return keyType, nil } -// FromKeyType converts key type back to +// FromKeyType converts key type back to a private key spec. func FromKeyType(keyType certcrypto.KeyType) *api.CertificatePrivateKey { switch keyType { case certcrypto.RSA2048: @@ -270,7 +270,7 @@ func (o *obtainer) Obtain(input ObtainInput) error { } } -// Obtain starts the async obtain request. +// ObtainACME starts the async obtain request. func (o *obtainer) ObtainACME(input ObtainInput) error { err := o.setPending(input) if err != nil {