@@ -58,7 +58,7 @@ func reconcileScopeForResource(
5858 return nil , err
5959 }
6060
61- return newResourceReconcileScope (crs , resourceRef , resourceSetBinding , normalizedData , objs ), nil
61+ return newResourceReconcileScope (crs , resourceRef , resourceSetBinding , normalizedData , objs )
6262}
6363
6464func newResourceReconcileScope (
@@ -67,7 +67,7 @@ func newResourceReconcileScope(
6767 resourceSetBinding * addonsv1.ResourceSetBinding ,
6868 normalizedData [][]byte ,
6969 objs []unstructured.Unstructured ,
70- ) resourceReconcileScope {
70+ ) ( resourceReconcileScope , error ) {
7171 base := baseResourceReconcileScope {
7272 clusterResourceSet : clusterResourceSet ,
7373 resourceRef : resourceRef ,
@@ -79,11 +79,11 @@ func newResourceReconcileScope(
7979
8080 switch addonsv1 .ClusterResourceSetStrategy (clusterResourceSet .Spec .Strategy ) {
8181 case addonsv1 .ClusterResourceSetStrategyApplyOnce :
82- return & reconcileApplyOnceScope {base }
82+ return & reconcileApplyOnceScope {base }, nil
8383 case addonsv1 .ClusterResourceSetStrategyReconcile :
84- return & reconcileStrategyScope {base }
84+ return & reconcileStrategyScope {base }, nil
8585 default :
86- return nil
86+ return nil , errors . Errorf ( "unsupported or empty resource strategy: %q" , clusterResourceSet . Spec . Strategy )
8787 }
8888}
8989
@@ -173,7 +173,7 @@ func (r *reconcileApplyOnceScope) applyObj(ctx context.Context, c client.Client,
173173
174174type applyObj func (ctx context.Context , c client.Client , obj * unstructured.Unstructured ) error
175175
176- // apply reconciles unstructured objects using applyObj and aggreates the error if present.
176+ // apply reconciles unstructured objects using applyObj and aggregates the error if present.
177177func apply (ctx context.Context , c client.Client , applyObj applyObj , objs []unstructured.Unstructured ) error {
178178 errList := []error {}
179179 for i := range objs {
0 commit comments