-
Notifications
You must be signed in to change notification settings - Fork 146
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 support for Equinix Metal #283
Conversation
Hi @detiber. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: detiber The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
README.md
Outdated
namespace: kube-system | ||
name: equinix-metal-credentials | ||
data: | ||
PACKET_API_KEY: EquinixMetalAPIKey |
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.
Seeing this, we should likely change the name of this variable to EQUINIX_METAL_API_KEY
or similar. That would require changes to the cluster-api-provider-equinix-metal PR: openshift/cluster-api-provider-equinix-metal#1 (comment) and installer PR: openshift/installer#4472
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.
+1, i think that makes sense for clarity
README.md
Outdated
@@ -212,6 +224,7 @@ Cloud | Mint | Mint + Remove Admin Cred | Passthrough | Manual | Token | |||
--- | --- | --- | --- | --- | --- | |||
AWS | Y | 4.4+ | Y | 4.3+ | 4.6+ (expected) | |||
Azure | Y | N | Y | unknown | N | |||
EquinixMetal | ? | ? | ? | ? |
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.
@elmiko does it make sense to add more functional support beside just documenting the format? If so, it would help to get some additional context into how CCO fits into the process and what methods might make sense for Equinix Metal to support.
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.
that's a good question, what were you thinking?
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.
EM doesn't currently have fine grained credentials, so I suspect Passthrough may make the most sense, and then as additional support is added for finer grained credentials, we can likely add support for the other methods.
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.
passthrough seems to make sense (i don't a ton about EM though), but as long as fits those restrictions (eg can't mint new credentials) then i would agree.
i think it makes sense to add an asterisk with a note about EM. but i don't want to create an extra maintenance burden, my main goal was to make sure we have a document about what the credentials need in the resource.
get some additional context into how CCO fits into the process
just to make sure i don't skip on this part. as i understand it, the CCO holds the credentials that the Machine-API bits will use(the sensitive bits are in secrets). when calls to the cloud provider API are made then this object will get referenced to ensure we have the proper creds.
what methods might make sense for Equinix Metal to support
another good question, i would like to confer with the installer team to see if there is anything specific we should be highlighting here.
in general, i think proceeding with the passthrough option makes sense to me but i will gather some more information from our teams.
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.
@detiber i followed up with some folks internally and passthrough is fine for now. in the future it would be nice if equinix supported the more granular options, but as it sounds like that does not currently exist we should be fine passthrough.
bc13f83
to
43b2426
Compare
@@ -212,6 +224,7 @@ Cloud | Mint | Mint + Remove Admin Cred | Passthrough | Manual | Token | |||
--- | --- | --- | --- | --- | --- | |||
AWS | Y | 4.4+ | Y | 4.3+ | 4.6+ (expected) | |||
Azure | Y | N | Y | unknown | N | |||
EquinixMetal | N | N | 4.x+ (expected) | N | N |
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.
I wasn't sure the right way to do this, whether it was to just add a 'Y' here or try to add the version like some of the fields for AWS and GCP...
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.
Similar to my overall comment on this PR, we want to not add any in-cluster processing of CredentialsRequest CRs which means that the only column to be supported would be the Manual column.
This doesn't mean that you don't implement what is effectively Passthrough mode (where each Secret for each in-cluster component contains the same API key), but Passthrough mode implies in-cluster handling of CredentialsRequests...
EquinixMetal | N | N | 4.x+ (expected) | N | N | |
EquinixMetal | N | N | N | 4.x+ (expected) | N |
go.mod
Outdated
sigs.k8s.io/controller-runtime v0.6.2 | ||
) | ||
|
||
replace github.com/openshift/api => github.com/detiber/api v0.0.0-20210113181726-19e9a251beff |
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.
Temporary workaround until openshift/api#784 is merged
k8s.io/api v0.20.0 | ||
k8s.io/apimachinery v0.20.0 | ||
k8s.io/client-go v0.20.0 | ||
k8s.io/code-generator v0.20.0 |
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.
This was required when I added the replace for github.com/openshift/api
below.
I believe the other updates came in transitively through the replace and these updates
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.
yeah, seems like you got caught in the middle of some changes
@@ -4,6 +4,7 @@ metadata: | |||
name: cloudcredentials.operator.openshift.io | |||
annotations: | |||
include.release.openshift.io/self-managed-high-availability: "true" | |||
include.release.openshift.io/single-node-developer: "true" |
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.
Updating this through make update-vendored-crds
was required to pass make verify
@@ -4,6 +4,7 @@ metadata: | |||
name: cloudcredentials.operator.openshift.io | |||
annotations: | |||
include.release.openshift.io/self-managed-high-availability: "true" | |||
include.release.openshift.io/single-node-developer: "true" |
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.
Updating this through make update-vendored-crds
was required to pass make verify
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.
here's a little background on this annotation, https://github.com/openshift/enhancements/blob/master/enhancements/single-node-developer-cluster-profile.md
@@ -0,0 +1,364 @@ | |||
/* |
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.
Mostly copy/paste from pkg/vsphere/actuator/actuator.go
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.
This is one of those pieces that we don't want to add to the in-cluster operator. As an example of what we would like, you can view the PRs that were done for IBMCloud (the first pass they made at this effectively implemented Passthrough mode, but their current - as of today - PR removes this Passthrough with support for fine-grained creds) #356
@@ -0,0 +1,183 @@ | |||
/* |
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.
Mostly copy/paste from pkg/operator/secretannotator/vsphere/reconciler.go
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.
Same thing here. We don't need in-cluster processing of the Secret that idealy should not even exist.
@@ -0,0 +1,198 @@ | |||
/* |
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.
Mostly copy/paste from pkg/operator/secretannotator/vsphere/reconciler_test.go
@elmiko Updated to add support for passthrough creds using the vsphere implementation as a guide |
thanks @detiber, i will be following up with some folks internally next week to make sure this is correct. |
Rebased on top of the latest changes, still caught in the middle of a 1.19 to 1.20 rebase. |
Rebased on top of the latest changes, still caught in the middle of a 1.19 to 1.20 rebase. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
@detiber: PR needs rebase. 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. |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
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.
In general for new platforms, we want to move away from having CCO's in-cluster operator handling/processing CredentialsRequest CRs. We want to have cloud credentials provisioning/handling to be handled outside the cluster. This goes back to many customer discussions where they have concerns about a highly-privileged credential sitting inside the cluster.
As an alternative, there is a relatively new ccoctl
binary in this repo that is meant to handle creating the cloud/platform resources (not applicable for Equinix b/c of supporting shared/passthrough credentials) and the manifests that need to be passed to the installer.
Also, would it be possible to break the vendoring into its own commit?
@@ -59,6 +59,18 @@ data: | |||
azure_region: Base64encodeRegion | |||
``` | |||
|
|||
### Equinix Metal |
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.
In an ideal world, this Secret should not even exist on a cluster as the individual components that need to make cloud API calls would receive their credentials via Secrets directly. This allows for a future where we can introduce fine-grained creds/permissions if/when the platform/cloud allows it.
@@ -212,6 +224,7 @@ Cloud | Mint | Mint + Remove Admin Cred | Passthrough | Manual | Token | |||
--- | --- | --- | --- | --- | --- | |||
AWS | Y | 4.4+ | Y | 4.3+ | 4.6+ (expected) | |||
Azure | Y | N | Y | unknown | N | |||
EquinixMetal | N | N | 4.x+ (expected) | N | N |
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.
Similar to my overall comment on this PR, we want to not add any in-cluster processing of CredentialsRequest CRs which means that the only column to be supported would be the Manual column.
This doesn't mean that you don't implement what is effectively Passthrough mode (where each Secret for each in-cluster component contains the same API key), but Passthrough mode implies in-cluster handling of CredentialsRequests...
EquinixMetal | N | N | 4.x+ (expected) | N | N | |
EquinixMetal | N | N | N | 4.x+ (expected) | N |
@@ -0,0 +1,364 @@ | |||
/* |
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.
This is one of those pieces that we don't want to add to the in-cluster operator. As an example of what we would like, you can view the PRs that were done for IBMCloud (the first pass they made at this effectively implemented Passthrough mode, but their current - as of today - PR removes this Passthrough with support for fine-grained creds) #356
@@ -0,0 +1,183 @@ | |||
/* |
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.
Same thing here. We don't need in-cluster processing of the Secret that idealy should not even exist.
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closed this PR. In response to this:
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. |
Start adding support for at least documenting the secret format for Equinix Metal.
Related to: openshift/machine-api-operator#753 (comment)