func (tc *testContext) listPendingCSRs() ([]*certificates.CertificateSigningRequest, error) {
	var foundCSRs []*certificates.CertificateSigningRequest
	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 i, csr := range csrs.Items {
		if tc.isPending(&csr) {
			foundCSRs = append(foundCSRs, &csrs.Items[i])
		}
	}
	return foundCSRs, nil
}
// 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 needs to be removed when that
//       functionality is added in https://issues.redhat.com/browse/WINC-581
// listPendingCSRs returns a list of CSRs which have neither been approved nor denied
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 needs to be removed when that // functionality is added in https : // issues . redhat . com / browse / WINC - 581 // listPendingCSRs returns a list of CSRs which have neither been approved nor denied
func (tc *testContext) listPendingCSRs() ([]*certificates.CertificateSigningRequest, error) {
	var foundCSRs []*certificates.CertificateSigningRequest
	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 i, csr := range csrs.Items {
		if tc.isPending(&csr) {
			foundCSRs = append(foundCSRs, &csrs.Items[i])
		}
	}
	return foundCSRs, nil
}
func ( tc * testContext ) listPendingCSRs ( ) ( [ ] * certificates . CertificateSigningRequest , error ) { var foundCSRs [ ] * certificates . CertificateSigningRequest csrs , err := tc . client . K8s . CertificatesV1 ( ) . CertificateSigningRequests ( ) . List ( context . TODO ( ) , metav1 . ListOptions { } ) if err != nil { return nil , errors . Wrap ( err , " " ) } for i , csr := range csrs . Items { if tc . isPending ( & csr ) { foundCSRs = append ( foundCSRs , & csrs . Items [ i ] ) } } return foundCSRs , nil }
vSphere CSRs are not being approved due to a hostname mismatch.
vSphere CSRs are not being approved due to a hostname mismatch .