Skip to content

Commit f9aa23a

Browse files
ntnyarpechenin
andauthored
Fix the reconciliation bug: (#12648)
In multi-user mode, all jobs are ignored by the namespace filter (kubeflow). Signed-off-by: arpechenin <arpechenin@avito.ru> Co-authored-by: arpechenin <arpechenin@avito.ru>
1 parent 7201b44 commit f9aa23a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

backend/src/apiserver/model/resource_reference.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ type FilterContext struct {
181181
*ReferenceKey
182182
}
183183

184+
func EmptyFilterContext() *FilterContext {
185+
return &FilterContext{}
186+
}
187+
184188
// Checks whether the resource-reference relationship combination is valid.
185189
func ValidateResourceReferenceRelationship(resType ResourceType, refType ResourceType, relType Relationship) bool {
186190
check, err := validResourceReferenceRelationship[ResourceReferenceRelationshipTriplet{

backend/src/apiserver/resource/resource_manager.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,9 +628,7 @@ func (r *ResourceManager) CreateRun(ctx context.Context, run *model.Run) (*model
628628

629629
// ReconcileSwfCrs reconciles the ScheduledWorkflow CRs based on existing jobs.
630630
func (r *ResourceManager) ReconcileSwfCrs(ctx context.Context) error {
631-
filterContext := &model.FilterContext{
632-
ReferenceKey: &model.ReferenceKey{Type: model.NamespaceResourceType, ID: common.GetPodNamespace()},
633-
}
631+
filterContext := model.EmptyFilterContext()
634632

635633
opts := list.EmptyOptions()
636634

0 commit comments

Comments
 (0)