-
Notifications
You must be signed in to change notification settings - Fork 58
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
controllers: replicate odf tolerations to child subscriptions #368
controllers: replicate odf tolerations to child subscriptions #368
Conversation
Signed-off-by: Nitin Goyal <[email protected]>
/test odf-operator-e2e-aws |
if odfSub.Spec.Config == nil { | ||
odfSub.Spec.Config = &operatorv1alpha1.SubscriptionConfig{} | ||
} |
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.
This is not needed. Do not update your own subscription.
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.
It is not gonna update. It is just to save from the panic in the below code.
if actualSub != nil { | ||
foundSubs := []string{actualSub.Name, sub.Name} | ||
return nil, fmt.Errorf("multiple Subscriptions found for package '%s': %v", pkgName, foundSubs) | ||
} | ||
actualSub = &subsList.Items[i] | ||
actualSub.Spec.Channel = desiredSubscription.Spec.Channel | ||
|
||
// If the config is not set, only then set it to the desired value => allow user to override | ||
if actualSub.Spec.Config == nil { | ||
if actualSub.Spec.Config == nil && desiredSubscription.Spec.Config == nil { |
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.
Why not just update
odf-operator/controllers/subscriptions.go
Line 260 in 1969776
func GetStorageClusterSubscriptions() []*operatorv1alpha1.Subscription { |
Add tolerations to desired subscription, and during reconcile merge actual and desired subs. Wouldn't that be simpler?
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.
Actually that will require extensive changes in the code, we will have to change the signature of multiple funcs.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: iamniting, umangachapagain The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test odf-operator-e2e-aws |
1 similar comment
/test odf-operator-e2e-aws |
9a4efc9
into
red-hat-storage:main
Signed-off-by: Nitin Goyal [email protected]