Skip to content
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

Add credentials secret to AWS provider config in order to support CredentialsRequest #1281

Conversation

spangenberg
Copy link
Contributor

/cc bison

@spangenberg
Copy link
Contributor Author

/hold

@openshift-ci-robot openshift-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 20, 2019
@dgoodwin
Copy link
Contributor

If we do this by setting a secret on every MachineSet, and ultimately remove the IAM role that allows the machine API to work today, the default state for anyone who creates a MachineSet would be broken?

Just wondering if this would be best done by default in the machine-api, rather than having it pinned on every MachineSet.

@bison
Copy link
Contributor

bison commented Feb 20, 2019

If we do this by setting a secret on every MachineSet, and ultimately remove the IAM role that allows the machine API to work today, the default state for anyone who creates a MachineSet would be broken?

Just wondering if this would be best done by default in the machine-api, rather than having it pinned on every MachineSet.

Any defaults would have to go into the controllers in our fork of the cluster-api, and further deviate from upstream. Users already have to choose quite a few things in the providerConfig that we can't provide sensible defaults for. Either that, or they copy an existing MachineSet created by the installer. The latter is probably the more common case right now.

We probably want to start using MachineClass objects for this kind of thing, but I'm not sure where we're at with that.

@dgoodwin
Copy link
Contributor

I understand, thanks!

@spangenberg
Copy link
Contributor Author

/retest

@bison
Copy link
Contributor

bison commented Feb 21, 2019

This isn't going to pass until openshift/machine-api-operator#199 is merged.

@spangenberg
Copy link
Contributor Author

@bison
Copy link
Contributor

bison commented Feb 21, 2019

@spangenberg, ah, I forgot about that. That is using the wrong namespace though. We changed it to openshift-machine-api.

@spangenberg
Copy link
Contributor Author

/test e2e-aws

openshift/machine-api-operator#199 got merged 🎉

@spangenberg
Copy link
Contributor Author

/retest

1 similar comment
@spangenberg
Copy link
Contributor Author

/retest

@spangenberg
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 26, 2019
@spangenberg
Copy link
Contributor Author

/retest

1 similar comment
@spangenberg
Copy link
Contributor Author

/retest

@enxebre
Copy link
Member

enxebre commented Feb 28, 2019

@dgoodwin
Copy link
Contributor

Hopefully we'd be at a point where we can try at least, I think that was an end goal of all this.

@spangenberg
Copy link
Contributor Author

Machine controller is throwing errors:

	status code: 403, request id: 6a61f19a-5257-4a07-bd58-35eb654c7a7d
E0228 16:31:15.172013       1 actuator.go:106] Machine error: error launching instance: error creating EC2 instance: UnauthorizedOperation: You are not authorized to perform this operation. Encoded authorization failure message: qM5RU2SzLuICZYAmY10kX86MSaRNCbibh7MjtAO6tV0oBYF2oEigg3sv4jVvck9l8_Lq40Jd9nvvweD_XTY6EAZvZ94yNidNVDOQcChaOewOZWXSZWHsVIKRWckGMrDYRu84TxnxsV2EdbHqHQVhL39GFuyBgFUhsx2i0hj2Ep2qYmUk2_JU4tTlHN7_iS-hAY5in0qx5gEHKrZw16dNpiHzsvEg1o6HN4krQDoSqPae8FswngSd-1PaRPlIXCqBFO28D34i5BfrYH7-Sc-6K8C99hcjDullKTH_Wb8EDU5VgPIKdFHDOP5tC1XdmNvCYLAlRHdQYJaTT3GCHymx9RD3sIFK5HLNwcGBAeCZ--9qFGhtnJWx91nGD1pps8DqAONLvmOUXNc6jLqdPUZm_OGSVgX5VpgOpa5onzQa-jAxdRK1iNBZtYWWBvIAwfo-T1fjSWDlK5BpRRs1aZEAOIg63rD37ey3F7eMLMqYMrygyBKpXEo8mTTqMdm47xOFzmoMfq6oD0tP4OKEJtThwS1NfJd6Nt-6qJ9f6wVTo-TdxujlYChx-haxc5L2PMh1Y6D_5itSYy_5GiU3GcJfUUq1AqJXUagyExVJCyf8LWN8b-vSUJOFm3fwbuDLDqJWPvvV5NNFOERZBZ9yiPF_m2zKqmLQn--bNa__SqzqIIGgFE1Ifouw-tKZqaNgM3Nbzc8zOx7O8oNPoqpCYVgeMwtsyyS0iAWPFdtjviBlFOQgaMFoB7B3z_M_UFA
	status code: 403, request id: 6a61f19a-5257-4a07-bd58-35eb654c7a7d
E0228 16:31:15.172025       1 actuator.go:115] error creating machine: error launching instance: error creating EC2 instance: UnauthorizedOperation: You are not authorized to perform this operation. Encoded authorization failure message: qM5RU2SzLuICZYAmY10kX86MSaRNCbibh7MjtAO6tV0oBYF2oEigg3sv4jVvck9l8_Lq40Jd9nvvweD_XTY6EAZvZ94yNidNVDOQcChaOewOZWXSZWHsVIKRWckGMrDYRu84TxnxsV2EdbHqHQVhL39GFuyBgFUhsx2i0hj2Ep2qYmUk2_JU4tTlHN7_iS-hAY5in0qx5gEHKrZw16dNpiHzsvEg1o6HN4krQDoSqPae8FswngSd-1PaRPlIXCqBFO28D34i5BfrYH7-Sc-6K8C99hcjDullKTH_Wb8EDU5VgPIKdFHDOP5tC1XdmNvCYLAlRHdQYJaTT3GCHymx9RD3sIFK5HLNwcGBAeCZ--9qFGhtnJWx91nGD1pps8DqAONLvmOUXNc6jLqdPUZm_OGSVgX5VpgOpa5onzQa-jAxdRK1iNBZtYWWBvIAwfo-T1fjSWDlK5BpRRs1aZEAOIg63rD37ey3F7eMLMqYMrygyBKpXEo8mTTqMdm47xOFzmoMfq6oD0tP4OKEJtThwS1NfJd6Nt-6qJ9f6wVTo-TdxujlYChx-haxc5L2PMh1Y6D_5itSYy_5GiU3GcJfUUq1AqJXUagyExVJCyf8LWN8b-vSUJOFm3fwbuDLDqJWPvvV5NNFOERZBZ9yiPF_m2zKqmLQn--bNa__SqzqIIGgFE1Ifouw-tKZqaNgM3Nbzc8zOx7O8oNPoqpCYVgeMwtsyyS0iAWPFdtjviBlFOQgaMFoB7B3z_M_UFA
	status code: 403, request id: 6a61f19a-5257-4a07-bd58-35eb654c7a7d

@enxebre
Copy link
Member

enxebre commented Mar 1, 2019

some perm must me missed, you should be able to use aws sts decode-authorization-message --encoded-message and go from there

@spangenberg
Copy link
Contributor Author

This should be unblocked by openshift/cloud-credential-operator#37 and additionally openshift/machine-api-operator#241.

@spangenberg
Copy link
Contributor Author

Depending PRs are all merged now.

/retest

@openshift-ci-robot openshift-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 4, 2019
@spangenberg spangenberg force-pushed the machine-operator-support-credentials-request branch from 34d339b to ab0e2e2 Compare March 4, 2019 20:17
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 4, 2019
@@ -33,41 +29,6 @@ EOF
), var.tags)}"
}

resource "aws_iam_role_policy" "master_policy" {
Copy link
Contributor

Choose a reason for hiding this comment

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

We need the iam policy for kubelet to running. also the kube-controller-manager would need access to AWS api too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the change, something like this can happen in another PR if wanted.

@spangenberg spangenberg force-pushed the machine-operator-support-credentials-request branch from ab0e2e2 to 30f5cf0 Compare March 4, 2019 20:40
@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 4, 2019
@spangenberg
Copy link
Contributor Author

/retest

@spangenberg
Copy link
Contributor Author

spangenberg commented Mar 5, 2019

/cc @wking @abhinavdahiya

Copy link
Contributor

@abhinavdahiya abhinavdahiya left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, spangenberg

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 5, 2019
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 0137c54 into openshift:master Mar 5, 2019
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants