-
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
Create role bindings for operator service accounts #571
Create role bindings for operator service accounts #571
Conversation
eaef874
to
92223c3
Compare
A few minor fixes you can steal are here: https://github.com/jpeeler/operator-lifecycle-manager/tree/evan-pr-571. (Can I push to your branch directly?) |
c33b459
to
7120fef
Compare
…ts in target namespaces if target namespaces == all namespaces, generate cluster role bindings instead
copying and rbac generation behavior
7120fef
to
77252f4
Compare
806aa39
to
b2cab67
Compare
// User a StrategyResolver to get the strategy details | ||
strategyResolver := install.StrategyResolver{} | ||
strategy, err := strategyResolver.UnmarshalStrategy(csv.Spec.InstallStrategy) | ||
extractedRBAC, err := RBACForClusterServiceVersion(csv) |
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.
😎
} | ||
} | ||
|
||
// OwnerLabel returns a label added to generated objects for later querying |
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.
Would it be useful to generalize this to take metav1.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.
Great stuff! There are only a few small things that I saw.
obj = v | ||
default: | ||
meta, ok := obj.(metav1.Object) | ||
if !ok { | ||
panic("could not assert object as Deployment, APIService, or Secret while adding annotations") |
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.
probably should be changed to "couldn't find object metadata" or something
@@ -2292,24 +2528,43 @@ func TestSyncOperatorGroups(t *testing.T) { | |||
err = op.syncOperatorGroups(tt.initial.operatorGroup) | |||
require.NoError(t, err) | |||
|
|||
// Sync csvs enough to get them back to succeeded state | |||
for i := 0; i < 6; i++ { |
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.
Clever
b2cab67
to
bff3b20
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: njhale 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 |
…t-rbac Create role bindings for operator service accounts
targetNamespaces
will be""
Namespace
objects