-
Notifications
You must be signed in to change notification settings - Fork 82
report status to the CVO #20
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
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| // sync reacts to a change in prereqs by finding information that is required to match another value in the cluster. This | ||
| // must be information that is logically "owned" by another component. | ||
| func (c StatusSyncer) sync() error { | ||
| currentDetailedStatus, err := c.operatorStatusProvider.CurrentStatus() |
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't we just set the ownerRef and let GC to deal with this?
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't we just set the ownerRef and let GC to deal with this?
GC doesn't do cluster scoped resources.
| return operatorv1alpha1.OperatorStatus{}, err | ||
| } | ||
|
|
||
| return instance.Status.OperatorStatus, 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.
do we want DeepCopy here?
| defer utilruntime.HandleCrash() | ||
| defer c.queue.ShutDown() | ||
|
|
||
| glog.Infof("Starting ConfigObserver") |
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.
copy&paste
|
@tnozicka any idea what is up with Travis and tide? |
| return err | ||
| } | ||
|
|
||
| operatorConfig, err := c.clusterOperatorClient.Get(c.clusterOperatorName, metav1.GetOptions{}) |
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.
odd the get the same object again.
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.
odd the get the same object again.
Uncommon, but dynamic informers/listers are in 1.13 and this is fairly slow moving.
| return createErr | ||
| } | ||
| } | ||
| if updateErr != 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.
nit: return updateErr
| return nil, nil | ||
| } | ||
| buf := &bytes.Buffer{} | ||
| if err := json.NewEncoder(buf).Encode(condition); err != 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.
ugly. I guess we don't have go types yet of this object?
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.
ugly. I guess we don't have go types yet of this object?
For the CVO ClusterOperator status? Not yet.
|
some nits |
|
/hold cancel |
Uses openshift/cluster-version-operator#31, a dynamic client, and the operator status used by several operator to create a control loop that will keep the
ClusterOperatorsynchronized if the API is available./cc @abhinavdahiya
/assign @mfojtik @sttts @sanchezl
/hold
hold until we roughly agree on the upstream shape. This will require us to re-fit some conditions.