Skip to content

Commit

Permalink
Merge pull request #39 from tidbcloud/shiori/vpc-peering-import-custo…
Browse files Browse the repository at this point in the history
…m-route

feat: support to enable import custom route for vpc peering
  • Loading branch information
KanShiori authored Dec 2, 2022
2 parents 35878e1 + 134f66e commit f7ccbb4
Show file tree
Hide file tree
Showing 44 changed files with 6,851 additions and 1,089 deletions.
1 change: 1 addition & 0 deletions apis/cache/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions apis/compute/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion apis/container/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions apis/container/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion apis/database/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apis/dns/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion apis/generate.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build generate
// +build generate

/*
Expand All @@ -23,7 +24,7 @@ limitations under the License.
//go:generate rm -rf ../package/crds

// Generate deepcopy methodsets and CRD manifests
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:trivialVersions=true,crdVersions=v1 output:artifacts:config=../package/crds
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:crdVersions=v1 output:artifacts:config=../package/crds

// Generate crossplane-runtime methodsets (resource.Managed, etc)
//go:generate go run -tags generate github.com/crossplane/crossplane-tools/cmd/angryjet generate-methodsets --header-file=../hack/boilerplate.go.txt ./...
Expand Down
7 changes: 5 additions & 2 deletions apis/iam/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions apis/kms/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apis/pubsub/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions apis/servicenetworking/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions apis/storage/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apis/storage/v1alpha3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apis/v1alpha3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion apis/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion apis/vpcpeering/v1beta1/peering_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

type PeeringParameters struct {
Project string `json:"project"`

Network string `json:"network"`

// Name: Name of the peering, which should conform to RFC1035.
Expand All @@ -28,6 +28,17 @@ type PeeringParameters struct {
// routes between two networks when peering state is ACTIVE.
AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"`

// ImportCustomRoutes: Whether to import the custom routes from peer
// network. The default value is false.
// NOTE: only used when creating the peering.
ImportCustomRoutes bool `json:"importCustomRoutes,omitempty"`

// ImportSubnetRoutesWithPublicIp: Whether subnet routes with public IP
// range are imported. The default value is false. IPv4 special-use
// ranges are always imported from peers and are not controlled by this
// field.
// NOTE: only used when creating the peering.
ImportSubnetRoutesWithPublicIp bool `json:"importSubnetRoutesWithPublicIp,omitempty"`
}

// A Peering is a managed resource that represents a Google Cloud Service
Expand Down
1 change: 1 addition & 0 deletions apis/vpcpeering/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ require (
k8s.io/apimachinery v0.25.2
k8s.io/client-go v0.25.0
sigs.k8s.io/controller-runtime v0.13.0
sigs.k8s.io/controller-tools v0.8.0
sigs.k8s.io/controller-tools v0.9.2
)

replace github.com/crossplane/provider-gcp/apis/vpcpeering/v1beta1 => ./apis/vpcpeering/v1beta1
Expand Down
Loading

0 comments on commit f7ccbb4

Please sign in to comment.