Fix error during public key import
For signed commit verification, this code errors out on line 303: ✗ GitRepository reconciliation failed: ''PGP public keys secret error: expected pointer, but got nil Pointer was not initialized with a concrete instance of the Secret struct Signed-off-by: Kingdon Barrett <yebyen@gmail.com>
This commit is contained in:
parent
d3ea648454
commit
d400c8e9e8
|
@ -298,7 +298,7 @@ func (r *GitRepositoryReconciler) reconcile(ctx context.Context, repository sour
|
||||||
Namespace: repository.Namespace,
|
Namespace: repository.Namespace,
|
||||||
Name: repository.Spec.Verification.SecretRef.Name,
|
Name: repository.Spec.Verification.SecretRef.Name,
|
||||||
}
|
}
|
||||||
var secret *corev1.Secret
|
secret := &corev1.Secret{}
|
||||||
if err := r.Client.Get(ctx, publicKeySecret, secret); err != nil {
|
if err := r.Client.Get(ctx, publicKeySecret, secret); err != nil {
|
||||||
err = fmt.Errorf("PGP public keys secret error: %w", err)
|
err = fmt.Errorf("PGP public keys secret error: %w", err)
|
||||||
return sourcev1.GitRepositoryNotReady(repository, sourcev1.VerificationFailedReason, err.Error()), err
|
return sourcev1.GitRepositoryNotReady(repository, sourcev1.VerificationFailedReason, err.Error()), err
|
||||||
|
|
Loading…
Reference in New Issue