Skip to content

Commit 532d739

Browse files
committed
add Status Updater Builder constructor for openMCP resources
1 parent 43a9436 commit 532d739

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

pkg/controller/openmcp.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package controller
2+
3+
import "sigs.k8s.io/controller-runtime/pkg/client"
4+
5+
////////////////////
6+
// STATUS UPDATER //
7+
////////////////////
8+
9+
// NewOpenMCPStatusUpdaterBuilder returns a StatusUpdaterBuilder that expects only ObservedGeneration, Conditions, and Phase as status fields.
10+
// It does not include LastReconcileTime, Reason, or Message.
11+
func NewOpenMCPStatusUpdaterBuilder[Obj client.Object]() *StatusUpdaterBuilder[Obj] {
12+
return NewStatusUpdaterBuilder[Obj]().WithoutFields(
13+
STATUS_FIELD_LAST_RECONCILE_TIME,
14+
STATUS_FIELD_REASON,
15+
STATUS_FIELD_MESSAGE,
16+
)
17+
}

0 commit comments

Comments
 (0)