diff --git a/.golangci.yaml b/.golangci.yaml index c002c7d69..63b6d5c9d 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -3,7 +3,6 @@ issues: - linters: - dogsled - errcheck - - misspell - contextcheck - unparam - promlinter diff --git a/internal/vault/vault.go b/internal/vault/vault.go index ce1a6fc67..67750da4e 100644 --- a/internal/vault/vault.go +++ b/internal/vault/vault.go @@ -472,7 +472,7 @@ func (v *Vault) requestTokenWithKubernetesAuth(client Client, kubernetesAuth *v1 // Vault backend can bind the kubernetes auth backend role to the service account and specific namespace of the service account. // Providing additional audiences is not considered a major non-mitigatable security risk // as if someone creates an Issuer in another namespace/globally with the same audiences - // in attempt to highjack the certificate vault (if role config mandates sa:namespace) won't authorise the conneciton + // in attempt to highjack the certificate vault (if role config mandates sa:namespace) won't authorise the connection // as token subject won't match vault role requirement to have SA originated from the specific namespace. Audiences: audiences, diff --git a/pkg/controller/acmeorders/sync.go b/pkg/controller/acmeorders/sync.go index 143306eb6..2f323b88a 100644 --- a/pkg/controller/acmeorders/sync.go +++ b/pkg/controller/acmeorders/sync.go @@ -51,7 +51,7 @@ const ( var ( // RequeuePeriod is the default period after which an Order should be re-queued. - // It can be overriden in tests. + // It can be overridden in tests. RequeuePeriod = time.Second * 5 ) diff --git a/pkg/controller/certificates/issuing/secret_manager.go b/pkg/controller/certificates/issuing/secret_manager.go index 04701fc4a..2e7b0103a 100644 --- a/pkg/controller/certificates/issuing/secret_manager.go +++ b/pkg/controller/certificates/issuing/secret_manager.go @@ -55,7 +55,7 @@ func (c *controller) ensureSecretData(ctx context.Context, log logr.Logger, crt log = log.WithValues("secret", secret.Name) // If there is no certificate or private key data available at the target - // Secret then exit early. The absense of these keys should cause an issuance + // Secret then exit early. The absence of these keys should cause an issuance // of the Certificate, so there is no need to run post issuance checks. if secret.Data == nil || len(secret.Data[corev1.TLSCertKey]) == 0 || diff --git a/pkg/controller/certificates/readiness/readiness_controller_test.go b/pkg/controller/certificates/readiness/readiness_controller_test.go index 116300c45..591928470 100644 --- a/pkg/controller/certificates/readiness/readiness_controller_test.go +++ b/pkg/controller/certificates/readiness/readiness_controller_test.go @@ -216,7 +216,7 @@ func TestProcessItem(t *testing.T) { Message: "ready message", })), }, - "update status for a Certificate that has a Ready conditon and the policy evaluates to True- should remain True": { + "update status for a Certificate that has a Ready condition and the policy evaluates to True- should remain True": { condition: cmapi.CertificateCondition{ Type: cmapi.CertificateConditionReady, Status: cmmeta.ConditionTrue, diff --git a/pkg/controller/certificates/trigger/trigger_controller.go b/pkg/controller/certificates/trigger/trigger_controller.go index 4eeca0848..1724d96a6 100644 --- a/pkg/controller/certificates/trigger/trigger_controller.go +++ b/pkg/controller/certificates/trigger/trigger_controller.go @@ -246,7 +246,7 @@ func (c *controller) updateOrApplyStatus(ctx context.Context, crt *cmapi.Certifi // shouldBackOffReissuingOnFailure returns true if an issuance needs to be // delayed and the required delay after calculating the exponential backoff. // The backoff periods are 1h, 2h, 4h, 8h, 16h and 32h counting from when the last -// failure occured, +// failure occurred, // so the returned delay will be backoff_period - (current_time - last_failure_time) // // Notably, it returns no back-off when the certificate doesn't diff --git a/pkg/issuer/acme/dns/azuredns/azuredns.go b/pkg/issuer/acme/dns/azuredns/azuredns.go index 02dbe5fbf..8c433a703 100644 --- a/pkg/issuer/acme/dns/azuredns/azuredns.go +++ b/pkg/issuer/acme/dns/azuredns/azuredns.go @@ -236,9 +236,9 @@ func stabilizeError(err error) error { return nil } - reponse := *resp - reponse.Body = io.NopCloser(bytes.NewReader([]byte(""))) - return &reponse + response := *resp + response.Body = io.NopCloser(bytes.NewReader([]byte(""))) + return &response } var authErr *azidentity.AuthenticationFailedError diff --git a/pkg/scheduler/scheduler.go b/pkg/scheduler/scheduler.go index 4a7624e3c..1d4f2af3c 100644 --- a/pkg/scheduler/scheduler.go +++ b/pkg/scheduler/scheduler.go @@ -23,7 +23,7 @@ import ( "k8s.io/utils/clock" ) -// We are writting our own time.AfterFunc to be able to mock the clock. The +// We are writing our own time.AfterFunc to be able to mock the clock. The // cancel function can be called concurrently. func afterFunc(c clock.Clock, d time.Duration, f func()) (cancel func()) { t := c.NewTimer(d) diff --git a/pkg/scheduler/scheduler_test.go b/pkg/scheduler/scheduler_test.go index ef0177844..5a0da475c 100644 --- a/pkg/scheduler/scheduler_test.go +++ b/pkg/scheduler/scheduler_test.go @@ -27,7 +27,7 @@ import ( ) func Test_afterFunc(t *testing.T) { - // Note that re-implimenting AfterFunc is not a good idea, since testing it + // Note that re-implementing AfterFunc is not a good idea, since testing it // is tricky as seen in time_test.go in the standard library. We will just // focus on two important cases: "f" should be run after the duration diff --git a/pkg/server/tls/dynamic_source.go b/pkg/server/tls/dynamic_source.go index 34e7ffc76..58e772b8d 100644 --- a/pkg/server/tls/dynamic_source.go +++ b/pkg/server/tls/dynamic_source.go @@ -145,7 +145,7 @@ func (f *DynamicSource) Start(ctx context.Context) error { return false } - // the renewal channel has a buffer of 1 - drop event if we are already issueing + // the renewal channel has a buffer of 1 - drop event if we are already issuing select { case renewalChan <- struct{}{}: default: diff --git a/pkg/server/tls/dynamic_source_test.go b/pkg/server/tls/dynamic_source_test.go index 6480aba58..42aec4674 100644 --- a/pkg/server/tls/dynamic_source_test.go +++ b/pkg/server/tls/dynamic_source_test.go @@ -238,7 +238,7 @@ func TestDynamicSource_FailingSign(t *testing.T) { template.NotAfter = template.NotBefore.Add(150 * time.Millisecond) signedCert := signUsingTempCA(t, template) - // Reset the NotBefor and NotAfter so we have high percision values here + // Reset the NotBefor and NotAfter so we have high precision values here signedCert.NotBefore = time.Now() signedCert.NotAfter = signedCert.NotBefore.Add(150 * time.Millisecond) diff --git a/test/e2e/framework/helper/certificaterequests.go b/test/e2e/framework/helper/certificaterequests.go index 29e600b1a..34cdd97da 100644 --- a/test/e2e/framework/helper/certificaterequests.go +++ b/test/e2e/framework/helper/certificaterequests.go @@ -199,7 +199,7 @@ func (h *Helper) ValidateIssuedCertificateRequest(cr *cmapi.CertificateRequest, return nil, fmt.Errorf("CertificateRequest does not have an Approved condition set to True: %+v", cr.Status.Conditions) } if apiutil.CertificateRequestIsDenied(cr) { - return nil, fmt.Errorf("CertificateRequest has a Denied conditon set to True: %+v", cr.Status.Conditions) + return nil, fmt.Errorf("CertificateRequest has a Denied condition set to True: %+v", cr.Status.Conditions) } return cert, nil