-
Notifications
You must be signed in to change notification settings - Fork 84
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
VPC: Add infrastructure creation proposal #1657
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cjschaef 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 |
Hi @cjschaef. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
✅ Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
// cisInstance defines the IBM Cloud CIS instance to create DNS Records for the cluster. | ||
// +optional | ||
CISInstance *CISInstance `json:"cisInstance,omitempty"` |
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.
Usually DNS is handled by the openshift itself for other providers like powervs, aws etc.. any more information of the need for adding DNS will be helpful for further discussions
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.
Sure, I will remove this then, with that expectation.
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.
Removed references.
|
||
// dnsServicesInstance defines the IBM Cloud DNS Services instance to create DNS Records for the cluster. | ||
// +optional | ||
DNSServicesInstance *DNSServicesInstance `json:"dnsServicesInstance,omitempty"` |
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.
Usually DNS is handled by the openshift itself for other providers like powervs, aws etc.. any more information of the need for adding DNS will be helpful for further discussions
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.
Sure, I will remove this then, with that expectation.
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.
Removed references.
/cc @Karthik-K-N |
90d843a
to
21457df
Compare
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 have added Initial review comments.
It would be great if you can add more documentation on api types, like usage and its dependency on setting of other variables, default values or system/controller set constants.
# Dynamically create infrastructure required for VPC cluster | ||
|
||
## Motivation | ||
Currently, inorder to create a VPC cluster using cluster api we need to create |
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.
Currently capi does create various resources automatically, like vpc, subnet, loadbalancer so on, May be we can rephrase the sentence or mention the resources which we need to create manually.
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 the present CAPIBM flow for VPC creates everything on its own.
Note - can you please elaborate here which prerequisites you are referring too?
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.
Sure, I can attempt to make things a bit clearer.
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.
Updated, hopefully that makes things a bit easier to follow and explains what we are trying to do, expanding the current VPC support. options.
|
||
// controlPlaneLoadBalancer is optional configuration for customizing control plane behavior. | ||
// +optional | ||
ControlPlaneLoadBalancer []*VPCLoadBalancerSpec `json:"controlPlaneLoadBalancer,omitempty"` |
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 filed is already exist in current spec, so it will be a breaking change to make it slice.
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.
Oh, sorry, missed that change before making the change to deprecated fields. Will attempt to redesign.
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.
Fixed, added new field, restored and marked this one as deprecated.
ID string `json:id"` | ||
|
||
// type defines the type of IBM Cloud resource. | ||
Type VPCResourceType `json:type"` |
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.
is resource type necessary here?
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 a nice to have, as the ResourceReference
(PowerVS was using) I was modeling after has a limited amount of data (Id only, so I was hoping to have a little more data included in such a resource.
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.
It looks like my attempt to use something like this was included recently into types.go
3add9b2#diff-c82f4c3e71cee496ae15d0bb197a279d5911a9b5b86282fa3b6f4900673078e2R120-R141
To some extent anyway, I would like to expand that list to include the additional ones listed below.
CRN *string `json"crn,omitempty"` | ||
|
||
// id defines the ID of the IBM Cloud resource. | ||
ID string `json:id"` |
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.
is both crn and id required, doen't crn contains id?
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.
CRN is another nice to have, as it includes the account Id, region, etc.
I can try to determine whether including the Id at all is useful (Id was the default required field), to potentially drop it in this definition. I just don't have enough information ATM.
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.
Dropped ID
// | ||
// When enabled, the IAM instance profiles specified are not used. | ||
// +optional | ||
PresignedURLDuration *metav1.Duration `json:"presignedURLDuration,omitempty"` |
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.
We had hard time creating a url with presignedduration, may be an experiment to verify it works and on cofirmation of it we can add this field.
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 think we tried the TOKEN based authorisation and it works fine, may be you can consider using that to keep it simple with the IAM token instead of access key/secret key for this presignedURL stuff.
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 we already have pushed code using IAM token same can be adopted here.
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 simply suggesting moving the existing CosInstance
struct out of ibmpowervscluster_types.go
into a "shared" location, so VPC does not redefine the resource and so VPC is not referencing a CosInstance
in PowerVS managed files.
If you wish to drop or make this field deprecated, I can do that. If you wish to have a new unique resource for COS, I can implement that in a shared location (that you can choose to migrate to, if you desire).
such as the following: | ||
```go | ||
// PortRange represents a range of ports, minimum to maximum. | ||
type PortRange struct { |
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 dont have much idea about the security group section, may be will try to understand better before taking a look,
ResourceGroup string `json:"resourceGroup"` | ||
|
||
// The Name of VPC. | ||
// Deprecated: use NetworkSpec instead. |
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.
any specific reason for moving VPC
inside NetworkSpec
?
cc @Karthik-K-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.
VPC is considered a part of the Network definition, which in VPC's case, can be defined in a unique ResourceGroup, along with the VPC's Subnets, SecurityGroups, etc. So those related resources seemed to fit better within a common type.
Using a NetworkSpec seems to follow other platform's design, rather than a 'flat' VPCCluster struct.
VPC string `json:"vpc,omitempty"` | ||
|
||
// The Name of availability zone. | ||
// Deprecated: use NetworkSpec instead. |
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 don't see any field indicating zone
data in NetworkSpec
, how is that being handled once we deprecate this.
cc @Karthik-K-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.
Zones will be defined within sub-resources. VPC isn't restricted to a single zone, it can deploy (or use) Subnets, VSI's, etc. across multiple zones, of which I expect those resources to specify their Zone.
ControlPlaneLoadBalancerState *VPCLoadBalancerState `json:"controlPlaneLoadBalancerState,omitempty"` | ||
|
||
// COSInstance is the reference to the IBM Cloud COS Instance used for the cluster. | ||
COSInstance *VPCResourceReference |
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.
missing marker details
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.
Will add.
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.
Added.
Add a new proposal with details and images for creating and deleting VPC resources for the IBMVPCCluster definition.
21457df
to
cd20ff1
Compare
``` | ||
|
||
|
||
#### Share existing common resource definitions |
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.
@Karthik-K-N this might break few things in PowerVS right, if we take them out of APIs.
IMO, we should focus on only VPC flow and related resources as part of this proposal. Anything related to PowerVS we can deal with later as a separate activity once we are done with VPC flow.
@cjschaef as discussed in our last sync up - please start working on the controller part, we can keep this item and not blocking you to implement the controller and merge |
/easycla |
@cjschaef please update this PR, we are planning to merge soon |
I will update the PR with the expected arch soon. |
Add a new proposal with details and images for creating and deleting VPC resources for the IBMVPCCluster definition.
What this PR does / why we need it:
Adds a new proposal to extend VPC Cluster support to create necessary resources based on design.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes # N/A
Special notes for your reviewer:
We expect to break up our enhancements into the following sets:
/area provider/ibmcloud
Release note: