Skip to content

Commit 9d7eb36

Browse files
Add DRG based VCN peering (#54)
1 parent f69734d commit 9d7eb36

40 files changed

+5578
-437
lines changed

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ARTIFACTS ?= $(ROOT_DIR)/_artifacts
4848
KUBETEST_CONF_PATH ?= $(abspath $(E2E_DATA_DIR)/kubetest/conformance.yaml)
4949
KUBETEST_FAST_CONF_PATH ?= $(abspath $(E2E_DATA_DIR)/kubetest/conformance-fast.yaml)
5050
GINKGO_FOCUS ?= Workload cluster creation
51-
GINKGO_SKIP ?= "Bare Metal|Multi-Region"
51+
GINKGO_SKIP ?= "Bare Metal|Multi-Region|VCNPeering"
5252
# Image URL to use all building/pushing image targets
5353
IMG ?= controller:latest
5454
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
@@ -249,13 +249,12 @@ generate-e2e-templates: kustomize
249249
$(KUSTOMIZE) build $(OCI_TEMPLATES)/v1beta1/cluster-template-node-drain --load_restrictor LoadRestrictionsNone > $(OCI_TEMPLATES)/v1beta1/cluster-template-node-drain.yaml
250250
$(KUSTOMIZE) build $(OCI_TEMPLATES)/v1beta1/cluster-template-antrea --load_restrictor LoadRestrictionsNone > $(OCI_TEMPLATES)/v1beta1/cluster-template-antrea.yaml
251251
$(KUSTOMIZE) build $(OCI_TEMPLATES)/v1beta1/cluster-template-oracle-linux --load_restrictor LoadRestrictionsNone > $(OCI_TEMPLATES)/v1beta1/cluster-template-oracle-linux.yaml
252-
$(KUSTOMIZE) build $(OCI_TEMPLATES)/v1beta1/cluster-template-ccm-testing --load_restrictor LoadRestrictionsNone > $(OCI_TEMPLATES)/v1beta1/cluster-template-ccm-testing.yaml
253252
$(KUSTOMIZE) build $(OCI_TEMPLATES)/v1beta1/cluster-template-custom-networking-seclist --load_restrictor LoadRestrictionsNone > $(OCI_TEMPLATES)/v1beta1/cluster-template-custom-networking-seclist.yaml
254253
$(KUSTOMIZE) build $(OCI_TEMPLATES)/v1beta1/cluster-template-custom-networking-nsg --load_restrictor LoadRestrictionsNone > $(OCI_TEMPLATES)/v1beta1/cluster-template-custom-networking-nsg.yaml
255254
$(KUSTOMIZE) build $(OCI_TEMPLATES)/v1beta1/cluster-template-multiple-node-nsg --load_restrictor LoadRestrictionsNone > $(OCI_TEMPLATES)/v1beta1/cluster-template-multiple-node-nsg.yaml
256255
$(KUSTOMIZE) build $(OCI_TEMPLATES)/v1beta1/cluster-template-cluster-class --load_restrictor LoadRestrictionsNone > $(OCI_TEMPLATES)/v1beta1/cluster-template-cluster-class.yaml
257-
258-
256+
$(KUSTOMIZE) build $(OCI_TEMPLATES)/v1beta1/cluster-template-local-vcn-peering --load_restrictor LoadRestrictionsNone > $(OCI_TEMPLATES)/v1beta1/cluster-template-local-vcn-peering.yaml
257+
$(KUSTOMIZE) build $(OCI_TEMPLATES)/v1beta1/cluster-template-remote-vcn-peering --load_restrictor LoadRestrictionsNone > $(OCI_TEMPLATES)/v1beta1/cluster-template-remote-vcn-peering.yaml
259258

260259
.PHONY: test-e2e-run
261260
test-e2e-run: generate-e2e-templates ginkgo $(ENVSUBST) ## Run e2e tests

api/v1beta1/conditions_consts.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ const (
4343
ClusterReadyCondition clusterv1.ConditionType = "ClusterReady"
4444
// VcnReconciliationFailedReason used when the vcn reconciliation is failed.
4545
VcnReconciliationFailedReason = "VcnReconciliationFailed"
46+
// DrgReconciliationFailedReason used when the DRG reconciliation fails.
47+
DrgReconciliationFailedReason = "DRGReconciliationFailed"
48+
// DRGVCNAttachmentReconciliationFailedReason used when the DRG VCN Attachment reconciliation fails.
49+
DRGVCNAttachmentReconciliationFailedReason = "DRGVCNAttachmentReconciliationFailed"
50+
// DRGRPCAttachmentReconciliationFailedReason used when the DRG RPC Attachment reconciliation fails.
51+
DRGRPCAttachmentReconciliationFailedReason = "DRGRPCAttachmentReconciliationFailed"
4652
// InternetGatewayReconciliationFailedReason used when the InternetGateway reconciliation is failed.
4753
InternetGatewayReconciliationFailedReason = "InternetGatewayReconciliationFailed"
4854
// NatGatewayReconciliationFailedReason used when the NatGateway reconciliation is failed.
@@ -67,6 +73,12 @@ const (
6773
InstanceIPAddressNotFound = "InstanceIPAddressNotFound"
6874
// VcnEventReady used after reconciliation has completed successfully
6975
VcnEventReady = "VCNReady"
76+
// DrgEventReady used after reconciliation has completed successfully
77+
DrgEventReady = "DRGReady"
78+
// DRGVCNAttachmentEventReady used after reconciliation has completed successfully
79+
DRGVCNAttachmentEventReady = "DRGVCNAttachmentEventReady"
80+
// DRGRPCAttachmentEventReady used after reconciliation has completed successfully
81+
DRGRPCAttachmentEventReady = "DRGRPCAttachmentEventReady"
7082
// InternetGatewayEventReady used after reconciliation has completed successfully
7183
InternetGatewayEventReady = "InternetGatewayReady"
7284
// NatEventReady used after reconciliation has completed successfully

api/v1beta1/ocicluster_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type OCIClusterSpec struct {
3535
// NetworkSpec encapsulates all things related to OCI network.
3636
// +optional
3737
NetworkSpec NetworkSpec `json:"networkSpec,omitempty"`
38-
// Free-form tags for this resource
38+
// Free-form tags for this resource.
3939
// +optional
4040
FreeformTags map[string]string `json:"freeformTags,omitempty"`
4141

@@ -72,7 +72,7 @@ type OCIClusterStatus struct {
7272
//+kubebuilder:object:root=true
7373
//+kubebuilder:subresource:status
7474

75-
// OCICluster is the Schema for the ociclusters API
75+
// OCICluster is the Schema for the ociclusters API.
7676
type OCICluster struct {
7777
metav1.TypeMeta `json:",inline"`
7878
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -83,7 +83,7 @@ type OCICluster struct {
8383

8484
//+kubebuilder:object:root=true
8585

86-
// OCIClusterList contains a list of OciCluster
86+
// OCIClusterList contains a list of OCICluster.
8787
type OCIClusterList struct {
8888
metav1.TypeMeta `json:",inline"`
8989
metav1.ListMeta `json:"metadata,omitempty"`

api/v1beta1/ociclustertemplate_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ type OCIClusterTemplate struct {
4343
type OCIClusterTemplateList struct {
4444
metav1.TypeMeta `json:",inline"`
4545
metav1.ListMeta `json:"metadata,omitempty"`
46-
47-
Items []OCIClusterTemplate `json:"items"`
46+
47+
Items []OCIClusterTemplate `json:"items"`
4848
}
4949

5050
func init() {

api/v1beta1/ocimachine_types.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,23 @@ const (
3535
// Please read the API https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/Instance/LaunchInstance
3636
// for more information about the parameters below
3737
type OCIMachineSpec struct {
38-
// OCID of launched compute instance
38+
// OCID of launched compute instance.
3939
// +optional
4040
InstanceId *string `json:"instanceId,omitempty"`
4141

42-
// OCID of the image to be used to launch the instance
42+
// OCID of the image to be used to launch the instance.
4343
ImageId string `json:"imageId,omitempty"`
4444

4545
// Compartment to launch the instance in.
4646
CompartmentId string `json:"compartmentId,omitempty"`
4747

48-
// Shape of the instance
48+
// Shape of the instance.
4949
Shape string `json:"shape,omitempty"`
5050

51-
// The shape configuration of rhe instance, applicable for flex instances
51+
// The shape configuration of rhe instance, applicable for flex instances.
5252
ShapeConfig ShapeConfig `json:"shapeConfig,omitempty"`
5353

54-
// PrimaryNetworkInterface is required to specify subnet
54+
// PrimaryNetworkInterface is required to specify subnet.
5555
NetworkDetails NetworkDetails `json:"networkDetails,omitempty"`
5656

5757
// Provider ID of the instance, this will be set by Cluster API provider itself,
@@ -72,7 +72,7 @@ type OCIMachineSpec struct {
7272
// required to connect to the instance.
7373
Metadata map[string]string `json:"metadata,omitempty"`
7474

75-
// Free-form tags for this resource
75+
// Free-form tags for this resource.
7676
// +optional
7777
FreeformTags map[string]string `json:"freeformTags,omitempty"`
7878

@@ -95,34 +95,34 @@ type OCIMachineSpec struct {
9595
NSGName string `json:"nsgName,omitempty"`
9696
}
9797

98-
// OCIMachineStatus defines the observed state of OciMachine
98+
// OCIMachineStatus defines the observed state of OCIMachine.
9999
type OCIMachineStatus struct {
100100
// INSERT ADDITIONAL STATUS FIELD - define observed state of machine
101101

102-
// Flag set to true when machine is ready
102+
// Flag set to true when machine is ready.
103103
// +optional
104104
Ready bool `json:"ready,omitempty"`
105105

106106
// Addresses contains the addresses of the associated OCI instance.
107107
Addresses []clusterv1.MachineAddress `json:"addresses,omitempty"`
108108

109-
// Error status on the machine
109+
// Error status on the machine.
110110
// +optional
111111
FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"`
112112

113-
// The error message corresponding tot he error on the machine
113+
// The error message corresponding to the error on the machine.
114114
// +optional
115115
FailureMessage *string `json:"failureMessage,omitempty"`
116116

117-
// Launch instance work request Id
117+
// Launch instance work request ID.
118118
// +optional
119119
LaunchInstanceWorkRequestId string `json:"launchInstanceWorkRequestId,omitempty"`
120120

121-
// Create Backend OPC work request ID for the machine backend
121+
// Create Backend OPC work request ID for the machine backend.
122122
// +optional
123123
CreateBackendWorkRequestId string `json:"createBackendWorkRequestId,omitempty"`
124124

125-
// Delete Backend OPC work request ID for the machine backend
125+
// Delete Backend OPC work request ID for the machine backend.
126126
// +optional
127127
DeleteBackendWorkRequestId string `json:"deleteBackendWorkRequestId,omitempty"`
128128

@@ -134,7 +134,7 @@ type OCIMachineStatus struct {
134134
//+kubebuilder:object:root=true
135135
//+kubebuilder:subresource:status
136136

137-
// OCIMachine is the Schema for the ocimachines API
137+
// OCIMachine is the Schema for the ocimachines API.
138138
type OCIMachine struct {
139139
metav1.TypeMeta `json:",inline"`
140140
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -145,7 +145,7 @@ type OCIMachine struct {
145145

146146
//+kubebuilder:object:root=true
147147

148-
// OCIMachineList contains a list of OCIMachine
148+
// OCIMachineList contains a list of OCIMachine.
149149
type OCIMachineList struct {
150150
metav1.TypeMeta `json:",inline"`
151151
metav1.ListMeta `json:"metadata,omitempty"`

api/v1beta1/ocimachinetemplate_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type OCIMachineTemplateResource struct {
3535
// +kubebuilder:resource:path=ocimachinetemplates,scope=Namespaced,categories=cluster-api
3636
// +kubebuilder:storageversion
3737

38-
// OCIMachineTemplate is the schema for the OCI compute instance machine template
38+
// OCIMachineTemplate is the schema for the OCI compute instance machine template.
3939
type OCIMachineTemplate struct {
4040
metav1.TypeMeta `json:",inline"`
4141
metav1.ObjectMeta `json:"metadata,omitempty"`

0 commit comments

Comments
 (0)