@@ -11,7 +11,6 @@ import (
1111 corev1 "k8s.io/api/core/v1"
1212 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1313 metav1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
14- "k8s.io/apimachinery/pkg/types"
1514 "k8s.io/apimachinery/pkg/util/validation/field"
1615 "k8s.io/kubernetes/pkg/apis/core"
1716 corevalidation "k8s.io/kubernetes/pkg/apis/core/validation"
@@ -331,7 +330,7 @@ func updateVolumeWithIssuerCA(deployment *appsv1.Deployment) {
331330
332331func (r * Reconciler ) getIssuer (istiocsr * v1alpha1.IstioCSR ) (client.Object , error ) {
333332 issuerRefKind := strings .ToLower (istiocsr .Spec .IstioCSRConfig .CertManager .IssuerRef .Kind )
334- namespacedName := types. NamespacedName {
333+ key := client. ObjectKey {
335334 Name : istiocsr .Spec .IstioCSRConfig .CertManager .IssuerRef .Name ,
336335 Namespace : istiocsr .Spec .IstioCSRConfig .Istio .Namespace ,
337336 }
@@ -344,8 +343,8 @@ func (r *Reconciler) getIssuer(istiocsr *v1alpha1.IstioCSR) (client.Object, erro
344343 object = & certmanagerv1.Issuer {}
345344 }
346345
347- if err := r .Get (r .ctx , namespacedName , object ); err != nil {
348- return nil , fmt .Errorf ("failed to fetch %q issuer: %w" , namespacedName , err )
346+ if err := r .Get (r .ctx , key , object ); err != nil {
347+ return nil , fmt .Errorf ("failed to fetch %q issuer: %w" , key , err )
349348 }
350349 return object , nil
351350}
@@ -355,7 +354,7 @@ func (r *Reconciler) createCAConfigMap(istiocsr *v1alpha1.IstioCSR, issuerConfig
355354 return nil
356355 }
357356
358- secretKey := types. NamespacedName {
357+ secretKey := client. ObjectKey {
359358 Name : issuerConfig .CA .SecretName ,
360359 Namespace : istiocsr .Spec .IstioCSRConfig .Istio .Namespace ,
361360 }
@@ -367,7 +366,7 @@ func (r *Reconciler) createCAConfigMap(istiocsr *v1alpha1.IstioCSR, issuerConfig
367366 return err
368367 }
369368
370- configmapKey := types. NamespacedName {
369+ configmapKey := client. ObjectKey {
371370 Name : istiocsrCAConfigMapName ,
372371 Namespace : istiocsr .GetNamespace (),
373372 }
0 commit comments