fix misspell linter
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
parent
aac2233b1a
commit
085136068a
@ -3,7 +3,6 @@ issues:
|
||||
- linters:
|
||||
- dogsled
|
||||
- errcheck
|
||||
- misspell
|
||||
- contextcheck
|
||||
- unparam
|
||||
- promlinter
|
||||
|
||||
@ -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,
|
||||
|
||||
|
||||
@ -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
|
||||
)
|
||||
|
||||
|
||||
@ -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 ||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -236,9 +236,9 @@ func stabilizeError(err error) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
reponse := *resp
|
||||
reponse.Body = io.NopCloser(bytes.NewReader([]byte("<REDACTED>")))
|
||||
return &reponse
|
||||
response := *resp
|
||||
response.Body = io.NopCloser(bytes.NewReader([]byte("<REDACTED>")))
|
||||
return &response
|
||||
}
|
||||
|
||||
var authErr *azidentity.AuthenticationFailedError
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user