Skip to content

Add Instance claim kind#838

Closed
hasheddan wants to merge 3 commits intocrossplane:masterfrom
hasheddan:vm-claim
Closed

Add Instance claim kind#838
hasheddan wants to merge 3 commits intocrossplane:masterfrom
hasheddan:vm-claim

Conversation

@hasheddan
Copy link
Copy Markdown
Member

Description of your changes

Adds a VM claim kind and a corresponding default class controller such that infrastructure stacks can add VM resources that can be dynamically provisioned. Because VM configuration can vary greatly across cloud providers (or even within a cloud provider), this initial claim implementation does not surface any configuration details. It is possible we would want OS or some other field surfaced in the future.

Checklist

I have:

  • Run make reviewable to ensure this PR is ready for review.
  • Ensured this PR contains a neat, self documenting set of commits.
  • Updated any relevant documentation, examples, or release notes.
  • Updated the RBAC permissions in clusterrole.yaml to include any new types.

…ntroller

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
@upbound-bot
Copy link
Copy Markdown
Collaborator

71% (-1.55%) vs master 72%

Copy link
Copy Markdown
Member

@muvaf muvaf left a comment

Choose a reason for hiding this comment

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

Overall LGTM but I think we need arch and OS fields at least.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
@hasheddan
Copy link
Copy Markdown
Member Author

@muvaf I agree that those are general enough that we should consider supporting. Would be happy to add if all are in agreement. cc @negz @jbw976

@upbound-bot
Copy link
Copy Markdown
Collaborator

71% (-1.55%) vs master 72%

Copy link
Copy Markdown
Member

@negz negz left a comment

Choose a reason for hiding this comment

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

I think we need arch and OS fields at least.

I suggest we wait until we know the shape of two or three managed resources that could bind to this claim before we "promote" fields to the claim. We want any setting exposed on the claim to be super useful to claim authors, and broadly applicable to most or all of the managed resource that could bind to a claim. I agree that arch and OS will probably make sense, but I'd prefer to make that call once we're informed by a few managed resources.


// A VirtualMachine is a portable resource claim that may be satisfied by
// binding to a Virtual Machine managed resource such as an AWS EC2 instance
// or an Azure VM.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I recall that the initial driver for this change was adding support for Packet, who market as bare metal. If we want to bind this kind to bare metal machines (either Packet or eventually on prem) perhaps Machine would be appropriate? This would fit both virtual and bare metal machines.

We might also consider Instance, which would have symmetry with the existing CloudSQLInstance, RDSInstance, etc types which tend to mean "a server running software X", but would probably make less sense for a bare metal machine.

Copy link
Copy Markdown
Member Author

@hasheddan hasheddan Sep 24, 2019

Choose a reason for hiding this comment

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

Agreed, it seems wrong to call it a VM if binding to bare metal. I would personally be in support of Instance because of the generality of the term. Packet refers to their bare metal machines as Devices.

Copy link
Copy Markdown

@soorena776 soorena776 Sep 25, 2019

Choose a reason for hiding this comment

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

Just Instance seems very generic to me as it does not say anything about the type of that instance, especially when we have resulted derivatives like InstanceController. Maybe something more like ComputeInstance, MachineInstance or CPUInstance?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@soorena776 looking back at this I would tend to agree with you. @prasek @bassam any thoughts on these options?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd prefer ComputeInstance over Instance. I like Machine too, and would probably pick that in a vacuum, but ComputeInstance matches our other FooInstance claim names.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

MachineInstance 👍

You’re getting a machine (VM or bare-metal). Compute is too general IMO.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
@hasheddan hasheddan requested review from muvaf and negz September 24, 2019 18:08
@upbound-bot
Copy link
Copy Markdown
Collaborator

71% (-1.55%) vs master 72%

@hasheddan hasheddan changed the title Add VM claim kind Add Instance claim kind Sep 24, 2019
Copy link
Copy Markdown
Member

@negz negz left a comment

Choose a reason for hiding this comment

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

LGTM but I want to make sure this crosses @prasek and @bassam's desk since this is a highly visible addition to Crossplane's APIs.

@negz
Copy link
Copy Markdown
Member

negz commented Oct 7, 2019

@hasheddan Do you have an idea of how far off any Stacks (e.g. Packet) are from using this claim? I'm a little hesitant to ship a new claim kind until at least one Stack actually makes use of it.

@hasheddan
Copy link
Copy Markdown
Member Author

@negz official work on Packet stack starts in earnest tomorrow. It might be nice to have a claim type to be able to test with. Still think we need @prasek and @bassam thoughts here.

@hasheddan
Copy link
Copy Markdown
Member Author

Closed in favor of #942

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants