func (tc *testContext) findNodeCSR(nodeName string) (*certificates.CertificateSigningRequest, error) {
	expectedCSRName := "system:node:" + nodeName
	csrs, err := tc.client.K8s.CertificatesV1().CertificateSigningRequests().List(context.TODO(),
		metav1.ListOptions{})
	if err != nil {
		return nil, errors.Wrap(err, "unable to get CSR list")
	}
	for _, csr := range csrs.Items {
		if csr.Spec.Username == expectedCSRName {
			return &csr, nil
		}
	}
	return nil, errors.Errorf("could not find CSR named %s", expectedCSRName)
}
// TODO: vSphere CSRs are not being approved due to a hostname mismatch. This is an issue only because the
//       ConfigMap controller does not have the ability to approve CSRs yet. This can be removed if not needed when that
//       functionality is added in https://issues.redhat.com/browse/WINC-581
// findNodeCSR returns the current CSR for the given node
vSphere CSRs are not being approved due to a hostname mismatch. This is an issue only because the
ConfigMap controller does not have the ability to approve CSRs yet.
// TODO : vSphere CSRs are not being approved due to a hostname mismatch . This is an issue only because the // ConfigMap controller does not have the ability to approve CSRs yet . This can be removed if not needed when that // functionality is added in https : // issues . redhat . com / browse / WINC - 581 // findNodeCSR returns the current CSR for the given node
func (tc *testContext) findNodeCSR(nodeName string) (*certificates.CertificateSigningRequest, error) {
	expectedCSRName := "system:node:" + nodeName
	csrs, err := tc.client.K8s.CertificatesV1().CertificateSigningRequests().List(context.TODO(),
		metav1.ListOptions{})
	if err != nil {
		return nil, errors.Wrap(err, "unable to get CSR list")
	}
	for _, csr := range csrs.Items {
		if csr.Spec.Username == expectedCSRName {
			return &csr, nil
		}
	}
	return nil, errors.Errorf("could not find CSR named %s", expectedCSRName)
}
func ( tc * testContext ) findNodeCSR ( nodeName string ) ( * certificates . CertificateSigningRequest , error ) { expectedCSRName := " " + nodeName csrs , err := tc . client . K8s . CertificatesV1 ( ) . CertificateSigningRequests ( ) . List ( context . TODO ( ) , metav1 . ListOptions { } ) if err != nil { return nil , errors . Wrap ( err , " " ) } for _ , csr := range csrs . Items { if csr . Spec . Username == expectedCSRName { return & csr , nil } } return nil , errors . Errorf ( " " , expectedCSRName ) }
vSphere CSRs are not being approved due to a hostname mismatch.
vSphere CSRs are not being approved due to a hostname mismatch .