@@ -87,19 +87,20 @@ func (r *Reconciler) checkIfResourceExists(ctx context.Context, dynClient dynami
8787}
8888
8989func (r * Reconciler ) synthesizeAndParseResources (appSourcePath string , logger logr.Logger ) ([]* unstructured.Unstructured , error ) {
90+ reason := addonsv1alpha1 .Cdk8sSynthFailedReason
9091 // Synthesize cdk8s application
91- if err := r .synthesizeCdk8sApp (appSourcePath , logger , OperationSynthesize ); err != nil {
92+ if err := r .synthesizeCdk8sApp (appSourcePath , logger , reason ); err != nil {
9293 return nil , err
9394 }
9495
9596 // Find manifest files
96- manifestFiles , err := r .findManifestFiles (appSourcePath , logger , OperationFindFiles )
97+ manifestFiles , err := r .findManifestFiles (appSourcePath , logger , reason )
9798 if err != nil {
9899 return nil , err
99100 }
100101
101102 // Parse resources from manifest files using the consolidated function
102- return r .parseManifestFiles (manifestFiles , logger , OperationSynthesize )
103+ return r .parseManifestFiles (manifestFiles , logger , reason )
103104}
104105
105106func (r * Reconciler ) synthesizeCdk8sApp (appSourcePath string , logger logr.Logger , operation string ) error {
@@ -212,7 +213,7 @@ func (r *Reconciler) deleteResourcesFromClusters(ctx context.Context, cdk8sAppPr
212213 dynamicClient , err := r .getDynamicClientForCluster (ctx , cdk8sAppProxy .Namespace , cluster .Name )
213214 if err != nil {
214215 clusterLogger .Error (err , "Failed to get dynamic client for cluster during deletion, skipping this cluster" )
215- // Log error but continue with other clusters
216+
216217 continue
217218 }
218219
0 commit comments