diff --git a/pkg/healthcheck/healthcheck.go b/pkg/healthcheck/healthcheck.go index 6628f6c8d..2b97ecb39 100644 --- a/pkg/healthcheck/healthcheck.go +++ b/pkg/healthcheck/healthcheck.go @@ -1733,12 +1733,12 @@ func (hc *HealthChecker) fetchCredsFromOldSecret(ctx context.Context, secretName crt, ok := secret.Data[certOldKeyName] if !ok { - return nil, fmt.Errorf("key %s needs to exist in secret %s", certKeyName, secretName) + return nil, fmt.Errorf("key %s needs to exist in secret %s", certOldKeyName, secretName) } key, ok := secret.Data[keyOldKeyName] if !ok { - return nil, fmt.Errorf("key %s needs to exist in secret %s", keyKeyName, secretName) + return nil, fmt.Errorf("key %s needs to exist in secret %s", keyOldKeyName, secretName) } cred, err := tls.ValidateAndCreateCreds(string(crt), string(key))