-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add kserve raw reconciler #250
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ package reconcilers | |
|
||
import ( | ||
"context" | ||
"github.com/hashicorp/go-multierror" | ||
|
||
"github.com/go-logr/logr" | ||
kservev1beta1 "github.com/kserve/kserve/pkg/apis/serving/v1beta1" | ||
|
@@ -26,16 +27,29 @@ import ( | |
var _ Reconciler = (*KserveRawInferenceServiceReconciler)(nil) | ||
|
||
type KserveRawInferenceServiceReconciler struct { | ||
client client.Client | ||
client client.Client | ||
subResourceReconcilers []SubResourceReconciler | ||
} | ||
|
||
func NewKServeRawInferenceServiceReconciler(client client.Client) *KserveRawInferenceServiceReconciler { | ||
|
||
subResourceReconciler := []SubResourceReconciler{ | ||
NewKServeRawMetricsServiceReconciler(client), | ||
NewRawKServeMetricsServiceMonitorReconciler(client), | ||
NewKserveMetricsDashboardReconciler(client), | ||
} | ||
|
||
return &KserveRawInferenceServiceReconciler{ | ||
client: client, | ||
client: client, | ||
subResourceReconcilers: subResourceReconciler, | ||
} | ||
} | ||
|
||
func (r *KserveRawInferenceServiceReconciler) Reconcile(_ context.Context, log logr.Logger, _ *kservev1beta1.InferenceService) error { | ||
log.V(1).Info("No Reconciliation to be done for inferenceservice as it is using RawDeployment mode") | ||
return nil | ||
func (r *KserveRawInferenceServiceReconciler) Reconcile(ctx context.Context, log logr.Logger, isvc *kservev1beta1.InferenceService) error { | ||
var reconcileErrors *multierror.Error | ||
for _, reconciler := range r.subResourceReconcilers { | ||
reconcileErrors = multierror.Append(reconcileErrors, reconciler.Reconcile(ctx, log, isvc)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You also will need to implement There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep those changes are made already :D, they will be a part of the next set of commits |
||
} | ||
|
||
return reconcileErrors.ErrorOrNil() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to the next group of imports.