Skip to content

Commit

Permalink
chore: skip the component definition that is not supported by the cur…
Browse files Browse the repository at this point in the history
…rent operator
  • Loading branch information
wangyelei committed Dec 20, 2024
1 parent 1498bf5 commit 6b681a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/apps/componentdefinition_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,10 @@ func listCompDefinitionsWithPattern(ctx context.Context, cli client.Reader, name
compDefsFullyMatched := make([]*appsv1alpha1.ComponentDefinition, 0)
compDefsPatternMatched := make([]*appsv1alpha1.ComponentDefinition, 0)
for i, item := range compDefList.Items {
// skip the component definition that is not supported by the current operator
if !intctrlutil.ObjectAPIVersionSupported(&item) {
continue
}
if item.Name == namePattern {
compDefsFullyMatched = append(compDefsFullyMatched, &compDefList.Items[i])
}
Expand Down

0 comments on commit 6b681a9

Please sign in to comment.