-
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
Changes from all commits
677a4e4
5498c3d
a337095
52179f6
d6222e0
ed1c768
93e9662
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
bin/ | ||
.DS_Store | ||
go.work | ||
go.work.sum | ||
go.work.sum | ||
vendor/ | ||
.golangci-bin/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,10 +32,6 @@ require ( | |
github.com/vmware-tanzu/nsx-operator/pkg/client v0.0.0-20240102061654-537b080e159f | ||
github.com/vmware-tanzu/vm-operator/api v1.8.2 | ||
github.com/vmware/govmomi v0.27.4 | ||
github.com/vmware/vsphere-automation-sdk-go/lib v0.7.0 | ||
github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.1-0.20240611083326-25a4e1834c4d | ||
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.12.0 | ||
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.6.0 | ||
go.uber.org/automaxprocs v1.5.3 | ||
go.uber.org/zap v1.25.0 | ||
golang.org/x/crypto v0.17.0 | ||
|
@@ -48,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 commentThe 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? |
||
github.com/zhengxiexie/vsphere-automation-sdk-go/runtime v0.7.2 | ||
github.com/zhengxiexie/vsphere-automation-sdk-go/services/nsxt v0.12.2 | ||
github.com/zhengxiexie/vsphere-automation-sdk-go/services/nsxt-mp v0.6.2 | ||
) | ||
|
||
require ( | ||
github.com/beevik/etree v1.1.0 // indirect | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,13 @@ import ( | |
) | ||
|
||
const ( | ||
AccessModePublic string = "Public" | ||
AccessModePrivate string = "Private" | ||
AccessModePublic string = "Public" | ||
AccessModePrivate string = "Private" | ||
AccessModeProject string = "Project" | ||
LbServiceSizeSmall string = "SMALL" | ||
LbServiceSizeMedium string = "MEDIUM" | ||
LbServiceSizeLarge string = "LARGE" | ||
LbServiceSizeXlarge string = "XLARGE" | ||
) | ||
|
||
// VPCNetworkConfigurationSpec defines the desired state of VPCNetworkConfiguration. | ||
|
@@ -21,14 +26,24 @@ const ( | |
type VPCNetworkConfigurationSpec struct { | ||
// PolicyPath of Tier0 or Tier0 VRF gateway. | ||
DefaultGatewayPath string `json:"defaultGatewayPath,omitempty"` | ||
|
||
// VPCConnectivityProfile ID. This profile has configuration related to create VPC transit gateway attachment. | ||
VPCConnectivityProfile string `json:"vpcConnectivityProfile,omitempty"` | ||
|
||
// +kubebuilder:validation:Enum=SMALL;MEDIUM;LARGE;XLARGE | ||
LbServiceSize string `json:"lbServiceSize,omitempty"` | ||
|
||
// 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. The VPCNetworkConfigurationSpec should be like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @wenqiq probably you missed this one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dantingl do we only support for VPC new model or both old and new model? |
||
|
||
// NSX-T IPv4 Block paths used to allocate external Subnets. | ||
// +kubebuilder:validation:MinItems=0 | ||
// +kubebuilder:validation:MaxItems=5 | ||
ExternalIPv4Blocks []string `json:"externalIPv4Blocks,omitempty"` | ||
|
||
// Private IPv4 CIDRs used to allocate Private Subnets. | ||
// +kubebuilder:validation:MinItems=0 | ||
// +kubebuilder:validation:MaxItems=5 | ||
|
@@ -37,12 +52,12 @@ type VPCNetworkConfigurationSpec struct { | |
// Defaults to 26. | ||
// +kubebuilder:default=26 | ||
DefaultIPv4SubnetSize int `json:"defaultIPv4SubnetSize,omitempty"` | ||
// DefaultSubnetAccessMode defines the access mode of the default SubnetSet for PodVM and VM. | ||
// DefaultPodSubnetAccessMode defines the access mode of the default SubnetSet for PodVM. | ||
// Must be Public or Private. | ||
// +kubebuilder:validation:Enum=Public;Private | ||
DefaultSubnetAccessMode string `json:"defaultSubnetAccessMode,omitempty"` | ||
// +kubebuilder:validation:Enum=Public;Private;Project | ||
DefaultPodSubnetAccessMode string `json:"defaultPodSubnetAccessMode,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change to PodSubnetAccessMode |
||
// ShortID specifies Identifier to use when displaying VPC context in logs. | ||
// Less than or equal to 8 characters. | ||
// Less than equal to 8 characters. | ||
// +kubebuilder:validation:MaxLength=8 | ||
// +optional | ||
ShortID string `json:"shortID,omitempty"` | ||
|
@@ -64,9 +79,9 @@ type VPCInfo struct { | |
|
||
// +genclient | ||
// +genclient:nonNamespaced | ||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
//+kubebuilder:storageversion | ||
// +kubebuilder:object:root=true | ||
// +kubebuilder:subresource:status | ||
// +kubebuilder:storageversion | ||
|
||
// VPCNetworkConfiguration is the Schema for the vpcnetworkconfigurations API. | ||
// +kubebuilder:resource:scope="Cluster" | ||
|
@@ -81,7 +96,7 @@ type VPCNetworkConfiguration struct { | |
Status VPCNetworkConfigurationStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
// +kubebuilder:object:root=true | ||
|
||
// VPCNetworkConfigurationList contains a list of VPCNetworkConfiguration. | ||
type VPCNetworkConfigurationList 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.
we should not submit .gitignore