Implement BYO infra API changes - #65
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: csrwng The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| NodePoolReplicas: 2, | ||
| Render: false, | ||
| Region: "us-east-1", | ||
| WorkerInstanceProfile: "hypershift-worker-profile", |
There was a problem hiding this comment.
should probably set all field here, even if they have no default just to make it explicit that we do not default it. I see InfraID and InfrastructureJSON missing
|
one nit, but lgtm |
| AMI string `json:"ami,omitempty"` | ||
| // SecurityGroups is the set of security groups to associate with nodepool machines | ||
| // +optional | ||
| SecurityGroups []string `json:"securityGroups,omitempty"` |
There was a problem hiding this comment.
what does this expect? and ID?
I think we should consolidate with Subnet and let both either support AWSResourceReference or only ID? Happy with this being done in a follow up though
There was a problem hiding this comment.
Yup, right now it's expecting an ID. Can definitely switch to AWSResourceReference
|
|
||
| // AvailabilityZone is the default availability zone for the cluster | ||
| // +optional | ||
| AvailabilityZone string `json:"availabilityZone,omitempty"` |
There was a problem hiding this comment.
have we considered Region and AvailabilityZone as part of NodePoolDefaults? what do they mean above that level?
There was a problem hiding this comment.
@enxebre I don't think we will support multi-region clusters, so I think of Region as a cluster-level thing.
AvailabilityZone yes is more of a nodepool level thing. However, the cluster cloud config (in the control plane) forces me to specify a zone (even though all it does with the zone is derive a region from it). I can definitely move it to the nodepool default and get the default from there for control plane purposes.
| Platform PlatformSpec `json:"platform"` | ||
|
|
||
| // InfraID is used to identify the cluster in cloud platforms | ||
| InfraID string `json:"infraID,omitempty"` |
There was a problem hiding this comment.
Just for the record I'm not a fan of the UX exposing the infraID in the API. I think we could infer it from the VPC ID and let that be the only contract.
Discussed with @csrwng to go as in this PR for now.
There was a problem hiding this comment.
Should definitely do a follow up. Right now specifying the infra ID allows me to avoid doing an AWS call from the hypershift operator to discover it. I can pass it directly to the control plane where it's needed for the cloud config.
84ff173 to
f48108d
Compare
|
Addressed comments, connected more of the control plane pieces |
| SSHKey []byte | ||
| NodePoolReplicas int | ||
|
|
||
| // AWS-specific options |
There was a problem hiding this comment.
Nit: what about extracting the AWS-isms (including AWSCredentials) into its own struct?
08ced39 to
024d958
Compare
|
@csrwng I'm a little bummed out this is further expanding the template debt by introducing more branching logic and even a new template function. If we're going to keep using these templates and even adding more of them, can we at least get to a point where the templates are 100% static string expansions with all data transformation done outside the templates in the code that sets up the input bound to them? |
|
As of Having an issue with the guest cluster's |
@ironcladlou I agree, continuing to use templates is less than ideal, but also not creating functional clusters is even less ideal. My goal with this PR is to get us to the point where we have a fully functional cluster again. At that point, we can update the e2e to validate that things are fully functional (at the very least validating that all cluster operators are reporting Available). Having that in place, then we can start refactoring the code to remove templates. Before that, I don't feel that we have much to validate that we're not breaking things. |
Fair enough, thanks for all this work. I don't want to block this PR on it. |
|
/test e2e-aws |
|
@csrwng: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
e2e is expected to fail |
|
/lgtm |
Implements BYO infra changes in API (as described in #38)
Updates 'create cluster' command to either take an infra description json (output of 'create infra' command) or invoke 'create infra' itself.
Removes use of management cluster infra in setting config for cluster/nodepools.
Still missing: