-
Notifications
You must be signed in to change notification settings - Fork 133
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
Route controller #395
Route controller #395
Conversation
|
||
return ctrl | ||
|
||
// configNameFilter := operator.FilterByNames(api.ConfigResourceName) |
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.
Shall we eliminate the commented code?
} | ||
|
||
func (c *RouteSyncController) sync() error { | ||
// startTime := time.Now() |
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.
Uncomment? Our main Operator.Sync
has, potentially useful for debuggin?
// TODO: do we need the "toUpdate" bool? | ||
status.HandleProgressingOrDegraded(updatedOperatorConfig, "RouteSync", errReason, err) | ||
status.SyncStatus(c.operatorConfigClient, updatedOperatorConfig) | ||
|
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.
Just comparing to refresh myself, I think we forgot SyncStatus()
on the CLIDownloadsController
.
|
||
updatedOperatorConfig := operatorConfig.DeepCopy() | ||
|
||
// TODO: is this all we need when syncing the route? |
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.
We can probably remove these comments.
// default host name set by the server, or any other values. The ApplyRoute() | ||
// logic will have to be sound. | ||
// - update to ApplyRoute() once the logic is settled | ||
func (co *RouteSyncController) SyncRoute(operatorConfig *operatorsv1.Console) (consoleRoute *routev1.Route, isNew bool, reason string, err error) { |
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.
nit:
func (co *RouteSy...
func (c *RouteSy...
Slight inconsistency with co
from the rest of the methods.
pkg/console/operator/operator.go
Outdated
@@ -243,8 +243,10 @@ func (c *consoleOperator) removeConsole() error { | |||
klog.V(2).Info("deleting console resources") | |||
defer klog.V(2).Info("finished deleting console resources") | |||
var errs []error | |||
// route | |||
errs = append(errs, c.routeClient.Routes(api.TargetNamespace).Delete(route.Stub().Name, &metav1.DeleteOptions{})) | |||
// // route |
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.
Can delete this, looks like you got the delete
on the route for ManagementState:Removed
on the correct controller.
pkg/console/starter/starter.go
Outdated
@@ -6,6 +6,8 @@ import ( | |||
"os" | |||
"time" | |||
|
|||
"github.com/openshift/console-operator/pkg/console/controllers/route" |
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.
nit: ordering deps
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.
/approve
Just a couple little tweaks and we can lgtm
, thx!
b618c56
to
8bdcd46
Compare
@benjaminapetersen comments addressed. Thanks for those ! |
8bdcd46
to
ff57c5c
Compare
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.
/approve
/lgtm
ff57c5c
to
2a5e406
Compare
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benjaminapetersen, jhadvig 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@benjaminapetersen I've finalised your work from #350
Tested the change manually and the controller is stomping the route on edit and recreating on delete.
Although when a label or annotation is edited on the route the controller wont stomp the route, not sure if thats desirable.
/assign @benjaminapetersen