From e906cb8db0159a2040a2c1d987a3a21158d6f6cc Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Fri, 28 Jun 2024 10:03:43 +0200 Subject: [PATCH] BUGFIX: Venafi issuer and clusterissuer checks were failing due to nilpointer exception Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- pkg/controller/clusterissuers/checks.go | 10 +++++----- pkg/controller/issuers/checks.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/controller/clusterissuers/checks.go b/pkg/controller/clusterissuers/checks.go index 60044f042..092b036c3 100644 --- a/pkg/controller/clusterissuers/checks.go +++ b/pkg/controller/clusterissuers/checks.go @@ -60,11 +60,11 @@ func (c *controller) issuersForSecret(secret *corev1.Secret) ([]*v1.ClusterIssue affected = append(affected, iss) continue } - } - if iss.Spec.Venafi.TPP.CABundleSecretRef != nil { - if iss.Spec.Venafi.TPP.CABundleSecretRef.Name == secret.Name { - affected = append(affected, iss) - continue + if iss.Spec.Venafi.TPP.CABundleSecretRef != nil { + if iss.Spec.Venafi.TPP.CABundleSecretRef.Name == secret.Name { + affected = append(affected, iss) + continue + } } } if iss.Spec.Venafi.Cloud != nil { diff --git a/pkg/controller/issuers/checks.go b/pkg/controller/issuers/checks.go index 8e95dd64d..8f03e658c 100644 --- a/pkg/controller/issuers/checks.go +++ b/pkg/controller/issuers/checks.go @@ -62,11 +62,11 @@ func (c *controller) issuersForSecret(secret *corev1.Secret) ([]*v1.Issuer, erro affected = append(affected, iss) continue } - } - if iss.Spec.Venafi.TPP.CABundleSecretRef != nil { - if iss.Spec.Venafi.TPP.CABundleSecretRef.Name == secret.Name { - affected = append(affected, iss) - continue + if iss.Spec.Venafi.TPP.CABundleSecretRef != nil { + if iss.Spec.Venafi.TPP.CABundleSecretRef.Name == secret.Name { + affected = append(affected, iss) + continue + } } } if iss.Spec.Venafi.Cloud != nil {