-
Notifications
You must be signed in to change notification settings - Fork 20
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
Update NetworkConfiguration CR with new VPC API #595
base: main
Are you sure you want to change the base?
Update NetworkConfiguration CR with new VPC API #595
Conversation
f27b714
to
e45262d
Compare
88264d8
to
247ef00
Compare
VPCConnectivityProfile string `json:"vpcConnectivityProfile,omitempty"` | ||
|
||
// +kubebuilder:validation:Enum=SMALL;MEDIUM;LARGE;XLARGE | ||
LbServiceSize string `json:"lbServiceSize,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.
Could you add this to VPCNetworkConfigInfo
?
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.
done
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.
No, the LB size should be only configured in VPCNetworkConfiguration CR
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.
VPCNetworkConfigInfo
is an internal struct, and it is used to store VPC config.
f195cb8
to
d8b04e8
Compare
@@ -2,4 +2,6 @@ | |||
bin/ | |||
.DS_Store | |||
go.work | |||
go.work.sum |
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 should not submit .gitignore
@@ -43,6 +44,13 @@ require ( | |||
sigs.k8s.io/controller-runtime v0.16.0 | |||
) | |||
|
|||
require ( | |||
github.com/zhengxiexie/vsphere-automation-sdk-go/lib v0.7.2 |
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.
do we merge this change now, or wait till new SDK ready and change it to official one?
go.mod
Outdated
@@ -6,14 +6,15 @@ replace ( | |||
github.com/vmware-tanzu/nsx-operator/pkg/apis => ./pkg/apis | |||
github.com/vmware-tanzu/nsx-operator/pkg/apis/v1alpha1 => ./pkg/apis/v1alpha1 | |||
github.com/vmware-tanzu/nsx-operator/pkg/apis/v1alpha2 => ./pkg/apis/v1alpha2 | |||
github.com/vmware-tanzu/nsx-operator/pkg/client => ./pkg/client | |||
github.com/vmware-tanzu/nsx-operator/pkg/client => ./pkg/client |
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.
just curious, what changed on this line?
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.
space alignment
@@ -41,6 +41,7 @@ type NetworkInfoReconciler struct { | |||
Recorder record.EventRecorder | |||
} | |||
|
|||
// Reconcile ... |
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.
what does this comment do?
@@ -5,7 +5,7 @@ import ( | |||
"fmt" | |||
"reflect" | |||
|
|||
"github.com/vmware/vsphere-automation-sdk-go/services/nsxt/model" | |||
"github.com/zhengxiexie/vsphere-automation-sdk-go/services/nsxt/model" |
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.
VPCConnectivityProfile string `json:"vpcConnectivityProfile,omitempty"` | ||
|
||
// +kubebuilder:validation:Enum=SMALL;MEDIUM;LARGE;XLARGE | ||
LbServiceSize string `json:"lbServiceSize,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.
No, the LB size should be only configured in VPCNetworkConfiguration CR
@@ -558,6 +558,15 @@ func (s *VPCService) CreateOrUpdateVPC(obj *v1alpha1.NetworkInfo) (*model.Vpc, * | |||
return existingVPC[0], &nc, nil | |||
} | |||
|
|||
if nc.VPCConnectivityProfile != "" { |
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.
No need to create private IPBlock, you can just add private CIDR into VPC API request
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.
Put this VPCConnectivityProfile logic into buildNSXVPC
?
|
Update sdk package Signed-off-by: Wenqi Qiu <wenqiq@vmware.com>
Add Project type Add const AccessModeProject Project Signed-off-by: Wenqi Qiu <wenqiq@vmware.com>
Signed-off-by: Wenqi Qiu <wenqiq@vmware.com>
Signed-off-by: Wenqi Qiu <wenqiq@vmware.com>
Signed-off-by: Wenqi Qiu <wenqiq@vmware.com>
Signed-off-by: Wenqi Qiu <wenqiq@vmware.com>
Signed-off-by: Wenqi Qiu <wenqiq@vmware.com>
A separate PR for CRD definition |
// Edge cluster path on which the networking elements will be created. | ||
EdgeClusterPath string `json:"edgeClusterPath,omitempty"` | ||
|
||
// NSX-T Project the Namespace associated with. | ||
NSXTProject string `json:"nsxtProject,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.
NSXTProject -> "NsxProject"
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.
The VPCNetworkConfigurationSpec should be like
type VPCNetworkConfigurationSpec struct {
NsxProject
VpcConnectivityProfile
PrivateIPs
ShortID
LbServiceSize
PodSubnetAccessMode
DefaultSubnetSize
}
d8b04e8
to
93e9662
Compare
Change VPCNetworkConfiguration CR, add VPCConnectivityProfile ID.