the status is still the same in the bundle (and is not re generated in destination namespace), but in the operator we can read:
time=2024-09-10T13:37:16.460Z level=ERROR msg="Reconciler error" controller=bundles namespace="" name=bundle-mycert reconcileID=efb1bda3-b71d-4bed-9613-60a8b5b2b5bb logger=trust/manager err="failed to build bundle source: invalid PEM data in source: bundle contains no PEM certificates"
time=2024-09-10T13:37:16.460Z level=DEBUG+3 msg="Failed to build bundle sources: invalid PEM data in source: bundle contains no PEM certificates" logger=trust/manager/events type=Warning object="{Kind:Bundle Namespace: Name:bundle-mycert UID:debfc06e-e120-43e6-a78b-8efd646eaf7d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:333113243 FieldPath:}" reason=SourceBuildError
time=2024-09-10T13:37:16.460Z level=DEBUG+3 msg="Failed to build bundle sources: invalid PEM data in source: bundle contains no PEM certificates" logger=trust/manager/events type=Warning object="{Kind:Bundle Namespace: Name:bundle-mycert UID:debfc06e-e120-43e6-a78b-8efd646eaf7d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:333113243 FieldPath:}" reason=SourceBuildError
time=2024-09-10T13:42:44.141Z level=ERROR msg="failed to build source bundle" bundle=bundle-mycert logger=trust/bundle err="invalid PEM data in source: bundle contains no PEM certificates"
Suggestion
I suggest that when we have this kind of error the status in the bundle is updated with a relevant error. This also work for the case where source is empty
@erikgb: The label(s) kind/enhancement cannot be applied, because the repository doesn't have them.
In response to [this](https://github.com/cert-manager/trust-manager/issues/434#issuecomment-2341257082):
>/kind enhancement
Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
Hi !
I noticed that the status do not reflect problem with bad/empty sources.
How to reproduce:
create a bundle that target a ConfigMap with a valid cert entry
the bundle status should change to :
go to the source cert in the configMap and "destroy" it by adding some characters inside the cert
the status is still the same in the bundle (and is not re generated in destination namespace), but in the operator we can read:
Suggestion
I suggest that when we have this kind of error the status in the bundle is updated with a relevant error. This also work for the case where source is empty