Skip to content

remove old controller roles #15364

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

Merged
merged 2 commits into from
Jul 20, 2017
Merged

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Jul 20, 2017

This pull shifts us over fully to the RBAC roles. It removes the old wiring, but does leave the ensure block (for now) to ensure give @mfojtik a chance to convince @liggitt he can pick it back instead of wiring a second path.

We no longer need to create the SAs ahead of time, since the client-builder does that for us.

[test]

@deads2k
Copy link
Contributor Author

deads2k commented Jul 20, 2017

Also, I'm betting it was me, but having my controllers rely on a particular way the server started is really ugly.

@0xmichalis
Copy link
Contributor

/lgtm

@openshift-ci-robot
Copy link

@Kargakis: changing LGTM is restricted to assignees, and only kubernetes org members may be assigned issues.

In response to this:

/lgtm

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.

@0xmichalis
Copy link
Contributor

/assign

@liggitt
Copy link
Contributor

liggitt commented Jul 20, 2017

only kubernetes org members may be assigned issues

heh

@0xmichalis
Copy link
Contributor

The message is hardcoded, something else is going on here

@0xmichalis
Copy link
Contributor

/assign

@0xmichalis
Copy link
Contributor

/unassign

}
for _, roleBinding := range bootstrappolicy.ControllerRoleBindings() {
reconcileRoleBinding := &policy.ReconcileClusterRoleBindingsOptions{
RolesToReconcile: []string{roleBinding.Name},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roleBinding.RoleRef.Name


role, _ := bootstrappolicy.InfraSAs.RoleFor(saName)

for _, role := range bootstrappolicy.ControllerRoles() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this omit the kube bootstrappolicy.ControllerRoles()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this omit the kube bootstrappolicy.ControllerRoles()?

We should need any of this moving forward and those are particularly easy to chase. We should stay strict in 3.7

RoleBindingAccessor: roleAccessor,
Subjects: []kapi.ObjectReference{{Namespace: ns, Name: saName, Kind: "ServiceAccount"}},
}
for _, roleBinding := range bootstrappolicy.ControllerRoleBindings() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here for kube bootstrap controller role bindings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should need any of this moving forward and those are particularly easy to chase. We should stay strict in 3.7

@liggitt
Copy link
Contributor

liggitt commented Jul 20, 2017

--- FAIL: TestSystemOnlyRoles (0.00s)
	web_console_role_test.go:80: The list of expected end user roles has been changed.  Please discuss with the web console team to update role annotations.

@liggitt
Copy link
Contributor

liggitt commented Jul 20, 2017

system:openshift:template-service-broker is the problem role

the test would be more helpful if it did this:

	if !show.Equal(rolesToShow) || !hide.Equal(rolesToHide) {
		t.Error("The list of expected end user roles has been changed.  Please discuss with the web console team to update role annotations.")
		t.Logf("These roles are visible but not in rolesToShow: %v", show.Difference(rolesToShow).List())
		t.Logf("These roles are hidden but not in rolesToHide: %v", hide.Difference(rolesToHide).List())
		t.Logf("These roles are in rolesToShow but are missing from the visible list: %v", rolesToShow.Difference(show).List())
		t.Logf("These roles are in rolesToHide but are missing from the hidden list: %v", rolesToHide.Difference(hide).List())
	}

@liggitt
Copy link
Contributor

liggitt commented Jul 20, 2017

ok, fix the roleref.name and test, then LGTM

@deads2k deads2k force-pushed the auth-22-fix-controller branch from 84c4123 to 67e8491 Compare July 20, 2017 15:02
@deads2k
Copy link
Contributor Author

deads2k commented Jul 20, 2017

[merge]

}
for _, roleBinding := range bootstrappolicy.ControllerRoleBindings() {
reconcileRoleBinding := &policy.ReconcileClusterRoleBindingsOptions{
RolesToReconcile: []string{roleBinding.RoleRef.Name},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -46,7 +46,6 @@ var rolesToHide = sets.NewString(
"system:node-proxier",
"system:node-reader",
"system:oauth-token-deleter",
"system:openshift:template-service-broker",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 67e8491

@openshift-bot
Copy link
Contributor

openshift-bot commented Jul 20, 2017

continuous-integration/openshift-jenkins/merge Waiting: You are in the build queue at position: 15

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 67e8491

@deads2k deads2k added the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2017
@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/3341/) (Base Commit: bfb45e9) (PR Branch Commit: 67e8491)

@liggitt
Copy link
Contributor

liggitt commented Jul 20, 2017

green tests, prereq for #15353 which is blocking the queue, merging

@enj
Copy link
Contributor

enj commented Jul 20, 2017

@openshift/security

@enj
Copy link
Contributor

enj commented Jul 20, 2017

@benjaminapetersen in regards to Jordan's comment about test improvement.

@enj
Copy link
Contributor

enj commented Jul 20, 2017

Oh NVM David took care of it 😁

@deads2k deads2k deleted the auth-22-fix-controller branch August 3, 2017 19:27
InfraPersistentVolumeRecyclerControllerServiceAccountName = "pv-recycler-controller"
InfraResourceQuotaControllerServiceAccountName = "resourcequota-controller"

InfraNodeBootstrapServiceAccountName = "node-bootstrapper"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be added back, this is the account that the node is using. Or needs an equivalent set of permissions so that we can merge the openshift-ansible node bootstrapping work. #15869

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants