-
Notifications
You must be signed in to change notification settings - Fork 544
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
Bug 1740332: OLM should resume operator install #1006
Bug 1740332: OLM should resume operator install #1006
Conversation
/test e2e-aws-console-olm |
I don't think approach will work (well) since |
@tkashem: This pull request references Bugzilla bug 1740332, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
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
had a couple of nits but I don't think they should block
return | ||
} | ||
|
||
func (s *ClientAttenuator) AttenuateClientWithServiceAccount(reference *corev1.ObjectReference) (kubeclient operatorclient.ClientInterface, crclient versioned.Interface, 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: the comment has a different name than the method
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.
done
@@ -1075,6 +1097,8 @@ var _ installPlanTransitioner = &Operator{} | |||
func transitionInstallPlanState(log *logrus.Logger, transitioner installPlanTransitioner, in v1alpha1.InstallPlan, now metav1.Time) (*v1alpha1.InstallPlan, error) { | |||
out := in.DeepCopy() | |||
|
|||
|
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: extra spaces
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.
done
return | ||
} | ||
|
||
logger.Infof("successfully attached attenuated ServiceAccount to status - %s", reference.Name) |
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: could use a structured logging field for the reference.Name
here
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.
done
|
||
if updateErr := update(ip); updateErr != nil { | ||
errs = append(errs, updateErr) | ||
logger.Warnf("failed to kick off InstallPlan retry - %v", updateErr) |
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 logger.WithError()
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.
done
OLM should automatically resume operator install when a user grants proper permission(s). Currently, a user has to manually delete the subscription and recreate it in order to trigger a reinstall of the operator. Do the following to trigger reinstall: - Add a new field 'AttenuatedServiceAccountRef' to status of InstallPlan. We use this to refer to the ServiceAccount that will be used to do attenuated scoped install of the operator. - Watch on Role(Binding), ServiceAccount resources. When these RBAC resources are added/updated find the target InstallPlan object. - Update the status.phase of the InstallPlan object to Installing. This will trigger a sync of the InstallPlan. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1740332 Jira: https://jira.coreos.com/browse/OLM-1244
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ecordell, jpeeler, tkashem 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 |
@tkashem: All pull requests linked via external trackers have merged. Bugzilla bug 1740332 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
OLM should automatically resume operator install when a user grants
proper permission(s).
Currently, a user has to manually delete the subscription and recreate
it in order to trigger a reinstall of the operator.
Do the following to trigger reinstall:
InstallPlan. We use this to refer to the ServiceAccount that will be
used to do attenuated scoped install of the operator.
resources are added/updated find the target InstallPlan object.
This will trigger a sync of the InstallPlan.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1740332
Jira: https://jira.coreos.com/browse/OLM-1244