Skip to content

Add Back node-bootstrapper Service Account creation - #15896

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
tiran:pr15890
Aug 24, 2017
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
tiran:pr15890

Conversation

@tiran

@tiran tiran commented Aug 22, 2017

Copy link
Copy Markdown
Contributor

This was recently dropped together with some refactoring for Controller
Roles bootstrapping.

Fixes #15869

@simo5's PR #15890 + test fix

@openshift/sig-security

@openshift-merge-robot openshift-merge-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 22, 2017
@tiran
tiran requested a review from smarterclayton August 22, 2017 09:02
@tiran

tiran commented Aug 22, 2017

Copy link
Copy Markdown
Contributor Author

/test unit

@tiran

tiran commented Aug 22, 2017

Copy link
Copy Markdown
Contributor Author

ci/openshift-jenkins/extended_conformance_install_update is caused by a problem in openshift-ansible, see openshift/openshift-ansible#5146

TASK [openshift_node_dnsmasq : Install dnsmasq configuration] ******************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_node_dnsmasq/tasks/main.yml:28
fatal: [localhost]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "generated_timestamp": "2017-08-22 06:38:56.567080", 
    "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'dns_ip'"
}
``

@tiran

tiran commented Aug 22, 2017

Copy link
Copy Markdown
Contributor Author

/test extended_conformance_install_update
/test extended_conformance_gce

LegacyMasterKubeletAdminClientUsername = "system:master"
MasterKubeletAdminClientUsername = "system:openshift-node-admin"

InfraNodeBootstrapServiceAccountName = "system:" + NodeBootstrapRoleName

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is not the name of the service account... this belongs more in the controller_policy.go file than here... it's more akin to the template service broker

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

k8s defines the name as apiconfig.NodeBootstrapperClusterRoleName. Can we use the name from k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no, don't reference code within kubeadm

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@liggitt what do you mean with "this is not the name of the service account" ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the constant is InfraNodeBootstrapServiceAccountName, but system:node-bootstrapper is not the name of the service account

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@liggitt thanks sorted out with @enj that in restroing the names I ended up reversing the role and the account name ... @tiran is going to fix it

@tiran
tiran force-pushed the pr15890 branch 2 times, most recently from 304b05a to 70f03a0 Compare August 22, 2017 15:53
enj
enj previously requested changes Aug 22, 2017
LegacyMasterKubeletAdminClientUsername = "system:master"
MasterKubeletAdminClientUsername = "system:openshift-node-admin"

InfraNodeBootstrapServiceAccountName = "node-bootstrapper"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since all of the Infra consts from the old infra policy file was moved to controller policy, lets move this there as well.

@deads2k @liggitt perhaps we should not deleted that file since controller policy now seems to be doing more than just controller related things?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@enj indeed the controller_policy file now risk becoming a kitchen sink, feels wrong to me.
That is why I put the constants in ... guess what? "constants.go"

newOriginClusterBinding(BuildStrategyJenkinsPipelineRoleBindingName, BuildStrategyJenkinsPipelineRoleName).
Groups(AuthenticatedGroup).
BindingOrDie(),
rbac.NewClusterBinding(NodeBootstrapRoleName).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@deads2k @liggitt is GetOpenshiftBootstrapClusterRoleBindings the right place for this? It seems more correct than ControllerRoleBindings since I do not believe there is a controller involved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it certainly needs a separating comment, not be grouped with the build strategies roles

@juanvallejo

Copy link
Copy Markdown
Contributor

/unassign

@enj

enj commented Aug 23, 2017

Copy link
Copy Markdown
Contributor

@tiran please move the consts to controller policy, I will handle any clean up in #15937

This was recently dropped together with some refactoring for Controller
Roles bootstrapping.

Signed-off-by: Simo Sorce <[email protected]>
Signed-off-by: Christian Heimes <[email protected]>
@enj

enj commented Aug 23, 2017

Copy link
Copy Markdown
Contributor

/lgtm

I will figure out homes for the const's that make people happy, or at least equally unhappy.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 23, 2017
@openshift-merge-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enj, tiran

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 23, 2017
@simo5
simo5 dismissed enj’s stale review August 23, 2017 19:27

constant moved

@openshift-merge-robot

Copy link
Copy Markdown
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@tiran

tiran commented Aug 24, 2017

Copy link
Copy Markdown
Contributor Author

/test extended_conformance_gce

@openshift-merge-robot

Copy link
Copy Markdown
Contributor

Automatic merge from submit-queue (batch tested with PRs 15896, 15921, 15909, 15911, 15906)

@openshift-merge-robot
openshift-merge-robot merged commit 459c2ef into openshift:master Aug 24, 2017
@tiran
tiran deleted the pr15890 branch August 24, 2017 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node-bootstrapper service account does not exist

9 participants