Skip to content

Commit

Permalink
Use secretLister in updateSecret
Browse files Browse the repository at this point in the history
Signed-off-by: James Munnelly <james@munnelly.eu>
  • Loading branch information
munnerz committed Feb 5, 2019
1 parent a3f02cb commit e533124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/certificates/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func ownerRef(crt *v1alpha1.Certificate) metav1.OwnerReference {
}

func (c *Controller) updateSecret(crt *v1alpha1.Certificate, namespace string, cert, key, ca []byte) (*corev1.Secret, error) {
secret, err := c.Client.CoreV1().Secrets(namespace).Get(crt.Spec.SecretName, metav1.GetOptions{})
secret, err := c.secretLister.Secrets(namespace).Get(crt.Spec.SecretName)
if err != nil && !k8sErrors.IsNotFound(err) {
return nil, err
}
Expand Down

0 comments on commit e533124

Please sign in to comment.