You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RBAC Migration Followup #25: Deprecate policy commands in favor of RBAC equivalents #18096
Update ansible playbooks to use RBAC commands instead
Deprecated should contain a pointer to the RBAC equivalent command. The CLI completions will have to be regenerated since we do not include completions for deprecated commands.
I do agree that it is less convenient, but I find it significantly easier to understand what is actually happening when you run these commands. For example, add-role-to-user, by default, creates or edits a role binding to a cluster role. This is hard to reason about, especially when you run a bunch of these commands together.
I now need to come up w/ unique names every time i want to give a user a new rolebinding (and remember/determine that name when i want to remove it)
Yeah, it forces you to take ownership of the objects you are creating. It is explicit, and also less convenient. You can also edit an existing object, which requires you to understand the objects.
it explodes the number of etcd objects (one binding object per role assignment per user)
Kube seems to survive with this. The whole behavior of these commands was built around etcd2's poor scaling with a large number of objects. Let's hope etcd3 is beyond that.
@bparees I think this is mitigated by the fact that we do not force the creation of objects as we do for secrets. Asmins that end up creating large amount of objects unnnecessarily can be coached and helped to consolidate those, so at least the size problem is manageable where it makes sense.
This is to say I do not think size matters should influence this issue.
@enj on point 1, should we instead point to some other command to eidt groups ?
I am not confortable pointing at a create command from a modify command, some people know what they are doing and they deserve to be pointed at how to modify objects, telling them to create new ones is not helpful or appropriate in all cases.
Kube also survives w/ the secrets problem. They don't run the scale we do as I understand it.
Sure but secrets are large (because of the embedded cert) and we have controllers auto create (and recreate if deleted) a bunch of them per namespace. RBAC objects are small, and we only auto create a few for the SAs and admin user when the project is created. Any extra objects are purely user driven.
Point n. 4 doesn't really have equivalents. While the other commands can reasonably transitioned to oc edit rolebindings as generally you are going to edit a specific role/binding, the command in 4 is more complex and removes a user from all namepace roles (even though it doesn't touch cluster rolebindings). I'll leave that one out as I think it falls off the "equivalent" charter for this issue.
What's the pressure to have to do something now for add-*?
There were complaints about either the add or the remove (I don't recall which), not performing retry on conflicts when fighting with other controllers (I think it was controllers). That brought it to the forefront and the realization that we have two sets of commands, one set I wrote in openshift pre-3.0 and one set I wrote in kube with lessons learned from 3.0.
Having two sets of commands leads to confusion and cases where the discrete sets don't play nice together. Both sets are internally consistent, but mixing the two makes your head hurt.
Ultimately, I'm not going to die on the hill for it, but if I had to own it, I wouldn't want to keep responding to issues, feature request, and pulls that take the openshift commands further from the upstream.
@deads2k I am confused now, what are the 2 sets of commands you are referring to ?
So it seems like there is no consensus on removeing these commands, and most seem to oppose the idea of adding new commands.
Most also recognize that the way the add-{cluser}role-to-[user|group] command behave is not ok.
So would it be fair to say that most agree that:
changing these commands to not re-use rolebindings on add is desirable (unless -rolebinding-name is provided) while allowing them to keep removing stuff as they do now is acceptable. This means they woun't be deprecated, only "improved" with a backward compatible change in behavior.
It still seem we should just deprecate remove-[user|group] and eventually remove them.
Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
Activity
bparees commentedon Jan 12, 2018
I still think this is a bad user experience.
bparees commentedon Jan 12, 2018
(my comments only apply to (1) obviously. I have no opinion on (2) and (3))
enj commentedon Jan 12, 2018
I do agree that it is less convenient, but I find it significantly easier to understand what is actually happening when you run these commands. For example,
add-role-to-user, by default, creates or edits a role binding to a cluster role. This is hard to reason about, especially when you run a bunch of these commands together.Yeah, it forces you to take ownership of the objects you are creating. It is explicit, and also less convenient. You can also edit an existing object, which requires you to understand the objects.
Kube seems to survive with this. The whole behavior of these commands was built around etcd2's poor scaling with a large number of objects. Let's hope etcd3 is beyond that.
bparees commentedon Jan 12, 2018
Kube also survives w/ the secrets problem. They don't run the scale we do as I understand it.
simo5 commentedon Jan 12, 2018
@bparees I think this is mitigated by the fact that we do not force the creation of objects as we do for secrets. Asmins that end up creating large amount of objects unnnecessarily can be coached and helped to consolidate those, so at least the size problem is manageable where it makes sense.
This is to say I do not think size matters should influence this issue.
simo5 commentedon Jan 12, 2018
@enj on point 1, should we instead point to some other command to eidt groups ?
I am not confortable pointing at a create command from a modify command, some people know what they are doing and they deserve to be pointed at how to modify objects, telling them to create new ones is not helpful or appropriate in all cases.
enj commentedon Jan 12, 2018
Sure but secrets are large (because of the embedded cert) and we have controllers auto create (and recreate if deleted) a bunch of them per namespace. RBAC objects are small, and we only auto create a few for the SAs and admin user when the project is created. Any extra objects are purely user driven.
simo5 commentedon Jan 12, 2018
Point n. 4 doesn't really have equivalents. While the other commands can reasonably transitioned to oc edit rolebindings as generally you are going to edit a specific role/binding, the command in 4 is more complex and removes a user from all namepace roles (even though it doesn't touch cluster rolebindings). I'll leave that one out as I think it falls off the "equivalent" charter for this issue.
22 remaining items
deads2k commentedon Jan 15, 2018
There were complaints about either the add or the remove (I don't recall which), not performing retry on conflicts when fighting with other controllers (I think it was controllers). That brought it to the forefront and the realization that we have two sets of commands, one set I wrote in openshift pre-3.0 and one set I wrote in kube with lessons learned from 3.0.
Having two sets of commands leads to confusion and cases where the discrete sets don't play nice together. Both sets are internally consistent, but mixing the two makes your head hurt.
Ultimately, I'm not going to die on the hill for it, but if I had to own it, I wouldn't want to keep responding to issues, feature request, and pulls that take the openshift commands further from the upstream.
simo5 commentedon Jan 16, 2018
@deads2k I am confused now, what are the 2 sets of commands you are referring to ?
So it seems like there is no consensus on removeing these commands, and most seem to oppose the idea of adding new commands.
Most also recognize that the way the add-{cluser}role-to-[user|group] command behave is not ok.
So would it be fair to say that most agree that:
changing these commands to not re-use rolebindings on add is desirable (unless -rolebinding-name is provided) while allowing them to keep removing stuff as they do now is acceptable. This means they woun't be deprecated, only "improved" with a backward compatible change in behavior.
It still seem we should just deprecate remove-[user|group] and eventually remove them.
@smarterclayton @liggitt ?
simo5 commentedon Jan 22, 2018
@deads2k @liggitt @smarterclayton ping ?
simo5 commentedon Jan 31, 2018
Ok folks #18102 is all green and implements the above, PTAL
@deads2k @liggitt @smarterclayton
Merge pull request #18102 from simo5/deprecpol
enj commentedon Feb 12, 2018
Leaving open for future deprecation.
openshift-bot commentedon May 13, 2018
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting
/remove-lifecycle stale.Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting
/lifecycle frozen.If this issue is safe to close now please do so with
/close./lifecycle stale
simo5 commentedon Jul 5, 2018
I do not see us deprecating the policy commands @enj, should we keep this card around ?