-
Notifications
You must be signed in to change notification settings - Fork 64
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
Adds Support for Azure Express Route Circuit. #259
base: master
Are you sure you want to change the base?
Changes from all commits
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 | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -226,3 +226,104 @@ type SubnetList struct { | |||||||
metav1.ListMeta `json:"metadata,omitempty"` | ||||||||
Items []Subnet `json:"items"` | ||||||||
} | ||||||||
|
||||||||
// ExpressRouteCircuitsPropertiesFormat defines properties of a ExpressRouteCircuits. | ||||||||
type ExpressRouteCircuitsPropertiesFormat struct { | ||||||||
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. nit: We may consider adding the currently missing fields like |
||||||||
|
||||||||
// ServiceProviderName - Flag denoting service provider name. | ||||||||
ServiceProviderName *string `json:"serviceProviderName,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. Per https://github.com/crossplane/crossplane/blob/master/design/one-pager-managed-resource-api-design.md, please mark the optional fields (pointer types with the
Suggested change
|
||||||||
|
||||||||
// BandwidthInMbps - Flag denotes bandwithwidth in Mbps. | ||||||||
BandwidthInMbps *int32 `json:"bandwidthInMbps,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.
Suggested change
|
||||||||
|
||||||||
// PeeringLocation - Flag denotes peering location. | ||||||||
PeeringLocation *string `json:"peeringLocation,omitempty"` | ||||||||
Comment on lines
+234
to
+240
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. Per Crossplane MR API conventions document, we had better reflect the 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.
Suggested change
|
||||||||
|
||||||||
// AllowClassicOperations - Flag denotes allow classic operations. | ||||||||
AllowClassicOperations *bool `json:"allowClassicOperations,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.
Suggested change
|
||||||||
|
||||||||
// GlobalReachEnabled - Flag denoting Global reach status. | ||||||||
GlobalReachEnabled *bool `json:"globalReachEnabled,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.
Suggested change
|
||||||||
} | ||||||||
|
||||||||
// SKU contains SKU in an ExpressRouteCircuit. | ||||||||
type SKU struct { | ||||||||
// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal' | ||||||||
Tier string `json:"tier,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. If this is optional:
Suggested change
|
||||||||
// Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData' | ||||||||
Family string `json:"family,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. If this is optional:
Suggested change
|
||||||||
} | ||||||||
|
||||||||
// A ExpressRouteCircuitsSpec defines the desired state of a ExpressRouteCircuits. | ||||||||
type ExpressRouteCircuitsSpec struct { | ||||||||
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.
Suggested change
|
||||||||
xpv1.ResourceSpec `json:",inline"` | ||||||||
|
||||||||
// Location - Location of the ExpressRouteCircuit. | ||||||||
Location string `json:"location,omitempty"` | ||||||||
|
||||||||
// SKU - SKU for ExpressRouteCircuit. | ||||||||
Sku SKU `json:"sku,omitempty"` | ||||||||
|
||||||||
// Tags - Resource tags. | ||||||||
// +optional | ||||||||
Tags map[string]string `json:"tags,omitempty"` | ||||||||
|
||||||||
// CircuitName - Name of the expressroutecircuit | ||||||||
CircuitName string `json:"circuitName,omitempty"` | ||||||||
|
||||||||
// ResourceGroupName - Name of the ExpressRouteCircuits's resource group. | ||||||||
ResourceGroupName string `json:"resourceGroupName,omitempty"` | ||||||||
|
||||||||
// ResourceGroupNameRef - Name of the ExpressRouteCircuits's resource group. | ||||||||
ResourceGroupNameRef string `json:"resourceGroupNameRef,omitempty"` | ||||||||
|
||||||||
// ExpressRouteCircuitsPropertiesFormat - Properties of the subnet. | ||||||||
ExpressRouteCircuitsPropertiesFormat `json:"properties"` | ||||||||
} | ||||||||
|
||||||||
// A ExpressRouteCircuitsStatus represents the observed state of a ExpressRouteCircuits. | ||||||||
type ExpressRouteCircuitsStatus struct { | ||||||||
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.
Suggested change
|
||||||||
xpv1.ResourceStatus `json:",inline"` | ||||||||
|
||||||||
// State of this ExpressRouteCircuits. | ||||||||
State string `json:"state,omitempty"` | ||||||||
|
||||||||
// A Message providing detail about the state of this ExpressRouteCircuits, if any. | ||||||||
Message string `json:"message,omitempty"` | ||||||||
|
||||||||
// Etag - A unique string that changes whenever the resource is updated. | ||||||||
Etag string `json:"etag,omitempty"` | ||||||||
|
||||||||
// ID of this ExpressRouteCircuits. | ||||||||
ID string `json:"id,omitempty"` | ||||||||
|
||||||||
// Purpose - A string identifying the intention of use for this subnet based | ||||||||
// on delegations and other user-defined properties. | ||||||||
Purpose string `json:"purpose,omitempty"` | ||||||||
} | ||||||||
|
||||||||
// +kubebuilder:object:root=true | ||||||||
|
||||||||
// A ExpressRouteCircuits is a managed resource that represents an Azure ExpressRouteCircuits. | ||||||||
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" | ||||||||
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" | ||||||||
// +kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".status.state" | ||||||||
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" | ||||||||
// +kubebuilder:subresource:status | ||||||||
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,azure} | ||||||||
type ExpressRouteCircuits struct { | ||||||||
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.
Suggested change
|
||||||||
metav1.TypeMeta `json:",inline"` | ||||||||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||||||||
|
||||||||
Spec ExpressRouteCircuitsSpec `json:"spec"` | ||||||||
Status ExpressRouteCircuitsStatus `json:"status,omitempty"` | ||||||||
} | ||||||||
|
||||||||
// +kubebuilder:object:root=true | ||||||||
|
||||||||
// ExpressRouteCircuitsList contains a list of ExpressRouteCircuits items | ||||||||
type ExpressRouteCircuitsList struct { | ||||||||
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.
Suggested change
|
||||||||
metav1.TypeMeta `json:",inline"` | ||||||||
metav1.ListMeta `json:"metadata,omitempty"` | ||||||||
Items []ExpressRouteCircuits `json:"items"` | ||||||||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,18 @@ | ||||||
apiVersion: network.azure.crossplane.io/v1alpha3 | ||||||
kind: ExpressRouteCircuits | ||||||
metadata: | ||||||
name: example-vn | ||||||
spec: | ||||||
resourceGroupName: test-exp | ||||||
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.
Suggested change
|
||||||
location: West US 2 | ||||||
properties: | ||||||
allowClassicOperations: False | ||||||
bandwidthInMbps: 50 | ||||||
globalReachEnabled: True | ||||||
peeringLocation: Chennai2 | ||||||
serviceProviderName: Airtel | ||||||
sku: | ||||||
family: MeteredData | ||||||
tier: Standard | ||||||
providerConfigRef: | ||||||
name: default | ||||||
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.
Suggested change
In the example manifests, for references to other resources for which an example manifest exists, the name in that manifest is used, and the example provider config name is |
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 corresponding model type name in
azure-sdk-for-go
is singular:network.ExpressRouteCircuitPropertiesFormat
.