diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6885b42bd..13166ee67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: env: # Common versions - GO_VERSION: '1.16' + GO_VERSION: '1.17' GOLANGCI_VERSION: 'v1.31' DOCKER_BUILDX_VERSION: 'v0.4.2' diff --git a/Makefile b/Makefile index 06ad273e3..d4f0854c4 100644 --- a/Makefile +++ b/Makefile @@ -83,14 +83,6 @@ cobertura: grep -v zz_ | \ $(GOCOVER_COBERTURA) > $(GO_TEST_OUTPUT)/cobertura-coverage.xml -crds.clean: - @$(INFO) cleaning generated CRDs - @find package/crds -name '*.yaml' -exec sed -i.sed -e '1,2d' {} \; || $(FAIL) - @find package/crds -name '*.yaml.sed' -delete || $(FAIL) - @$(OK) cleaned generated CRDs - -generate.done: crds.clean - # Update the submodules, such as the common build scripts. submodules: @git submodule sync diff --git a/apis/autoscaling/v1alpha2/zz_generated.deepcopy.go b/apis/autoscaling/v1alpha2/zz_generated.deepcopy.go index aae758c8e..7cb32fb34 100644 --- a/apis/autoscaling/v1alpha2/zz_generated.deepcopy.go +++ b/apis/autoscaling/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/ec2/v1alpha2/zz_generated.deepcopy.go b/apis/ec2/v1alpha2/zz_generated.deepcopy.go index a3ecab77c..25457c631 100644 --- a/apis/ec2/v1alpha2/zz_generated.deepcopy.go +++ b/apis/ec2/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/ec2/v1alpha2/zz_routetable_types.go b/apis/ec2/v1alpha2/zz_routetable_types.go index a7b7f22a0..c0eda560b 100755 --- a/apis/ec2/v1alpha2/zz_routetable_types.go +++ b/apis/ec2/v1alpha2/zz_routetable_types.go @@ -70,26 +70,26 @@ type RouteTableRouteObservation struct { type RouteTableRouteParameters struct { // +kubebuilder:validation:Optional - CarrierGatewayID *string `json:"carrierGatewayId,omitempty" tf:"carrier_gateway_id,omitempty"` + CarrierGatewayID *string `json:"carrierGatewayId,omitempty" tf:"carrier_gateway_id"` // +kubebuilder:validation:Optional - CidrBlock *string `json:"cidrBlock,omitempty" tf:"cidr_block,omitempty"` + CidrBlock *string `json:"cidrBlock,omitempty" tf:"cidr_block"` // +kubebuilder:validation:Optional - DestinationPrefixListID *string `json:"destinationPrefixListId,omitempty" tf:"destination_prefix_list_id,omitempty"` + DestinationPrefixListID *string `json:"destinationPrefixListId,omitempty" tf:"destination_prefix_list_id"` // +kubebuilder:validation:Optional - EgressOnlyGatewayID *string `json:"egressOnlyGatewayId,omitempty" tf:"egress_only_gateway_id,omitempty"` + EgressOnlyGatewayID *string `json:"egressOnlyGatewayId,omitempty" tf:"egress_only_gateway_id"` // +kubebuilder:validation:Optional - GatewayID *string `json:"gatewayId,omitempty" tf:"gateway_id,omitempty"` + GatewayID *string `json:"gatewayId,omitempty" tf:"gateway_id"` // +kubebuilder:validation:Optional - IPv6CidrBlock *string `json:"ipv6CidrBlock,omitempty" tf:"ipv6_cidr_block,omitempty"` + IPv6CidrBlock *string `json:"ipv6CidrBlock,omitempty" tf:"ipv6_cidr_block"` // +crossplane:generate:reference:type=Instance // +kubebuilder:validation:Optional - InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"` + InstanceID *string `json:"instanceId,omitempty" tf:"instance_id"` // +kubebuilder:validation:Optional InstanceIDRef *v1.Reference `json:"instanceIdRef,omitempty" tf:"-"` @@ -98,14 +98,14 @@ type RouteTableRouteParameters struct { InstanceIDSelector *v1.Selector `json:"instanceIdSelector,omitempty" tf:"-"` // +kubebuilder:validation:Optional - LocalGatewayID *string `json:"localGatewayId,omitempty" tf:"local_gateway_id,omitempty"` + LocalGatewayID *string `json:"localGatewayId,omitempty" tf:"local_gateway_id"` // +kubebuilder:validation:Optional - NATGatewayID *string `json:"natGatewayId,omitempty" tf:"nat_gateway_id,omitempty"` + NATGatewayID *string `json:"natGatewayId,omitempty" tf:"nat_gateway_id"` // +crossplane:generate:reference:type=NetworkInterface // +kubebuilder:validation:Optional - NetworkInterfaceID *string `json:"networkInterfaceId,omitempty" tf:"network_interface_id,omitempty"` + NetworkInterfaceID *string `json:"networkInterfaceId,omitempty" tf:"network_interface_id"` // +kubebuilder:validation:Optional NetworkInterfaceIDRef *v1.Reference `json:"networkInterfaceIdRef,omitempty" tf:"-"` @@ -114,11 +114,11 @@ type RouteTableRouteParameters struct { NetworkInterfaceIDSelector *v1.Selector `json:"networkInterfaceIdSelector,omitempty" tf:"-"` // +kubebuilder:validation:Optional - TransitGatewayID *string `json:"transitGatewayId,omitempty" tf:"transit_gateway_id,omitempty"` + TransitGatewayID *string `json:"transitGatewayId,omitempty" tf:"transit_gateway_id"` // +crossplane:generate:reference:type=VPCEndpoint // +kubebuilder:validation:Optional - VPCEndpointID *string `json:"vpcEndpointId,omitempty" tf:"vpc_endpoint_id,omitempty"` + VPCEndpointID *string `json:"vpcEndpointId,omitempty" tf:"vpc_endpoint_id"` // +kubebuilder:validation:Optional VPCEndpointIDRef *v1.Reference `json:"vpcEndpointIdRef,omitempty" tf:"-"` @@ -128,7 +128,7 @@ type RouteTableRouteParameters struct { // +crossplane:generate:reference:type=VPCPeeringConnection // +kubebuilder:validation:Optional - VPCPeeringConnectionID *string `json:"vpcPeeringConnectionId,omitempty" tf:"vpc_peering_connection_id,omitempty"` + VPCPeeringConnectionID *string `json:"vpcPeeringConnectionId,omitempty" tf:"vpc_peering_connection_id"` // +kubebuilder:validation:Optional VPCPeeringConnectionIDRef *v1.Reference `json:"vpcPeeringConnectionIdRef,omitempty" tf:"-"` diff --git a/apis/ec2/v1alpha2/zz_securitygroup_types.go b/apis/ec2/v1alpha2/zz_securitygroup_types.go index ff0ae7a38..8a860691f 100755 --- a/apis/ec2/v1alpha2/zz_securitygroup_types.go +++ b/apis/ec2/v1alpha2/zz_securitygroup_types.go @@ -31,22 +31,22 @@ type EgressObservation struct { type EgressParameters struct { // +kubebuilder:validation:Optional - CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks,omitempty"` + CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks"` // +kubebuilder:validation:Optional - Description *string `json:"description,omitempty" tf:"description,omitempty"` + Description *string `json:"description,omitempty" tf:"description"` // +kubebuilder:validation:Required - FromPort *int64 `json:"fromPort" tf:"from_port,omitempty"` + FromPort *int64 `json:"fromPort" tf:"from_port"` // +kubebuilder:validation:Optional - IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks,omitempty"` + IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks"` // +kubebuilder:validation:Optional - PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids,omitempty"` + PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids"` // +kubebuilder:validation:Required - Protocol *string `json:"protocol" tf:"protocol,omitempty"` + Protocol *string `json:"protocol" tf:"protocol"` // +kubebuilder:validation:Optional SecurityGroupRefs []v1.Reference `json:"securityGroupRefs,omitempty" tf:"-"` @@ -58,13 +58,13 @@ type EgressParameters struct { // +crossplane:generate:reference:refFieldName=SecurityGroupRefs // +crossplane:generate:reference:selectorFieldName=SecurityGroupSelector // +kubebuilder:validation:Optional - SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups,omitempty"` + SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups"` // +kubebuilder:validation:Optional - Self *bool `json:"self,omitempty" tf:"self,omitempty"` + Self *bool `json:"self,omitempty" tf:"self"` // +kubebuilder:validation:Required - ToPort *int64 `json:"toPort" tf:"to_port,omitempty"` + ToPort *int64 `json:"toPort" tf:"to_port"` } type IngressObservation struct { @@ -73,22 +73,22 @@ type IngressObservation struct { type IngressParameters struct { // +kubebuilder:validation:Optional - CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks,omitempty"` + CidrBlocks []*string `json:"cidrBlocks,omitempty" tf:"cidr_blocks"` // +kubebuilder:validation:Optional - Description *string `json:"description,omitempty" tf:"description,omitempty"` + Description *string `json:"description,omitempty" tf:"description"` // +kubebuilder:validation:Required - FromPort *int64 `json:"fromPort" tf:"from_port,omitempty"` + FromPort *int64 `json:"fromPort" tf:"from_port"` // +kubebuilder:validation:Optional - IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks,omitempty"` + IPv6CidrBlocks []*string `json:"ipv6CidrBlocks,omitempty" tf:"ipv6_cidr_blocks"` // +kubebuilder:validation:Optional - PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids,omitempty"` + PrefixListIds []*string `json:"prefixListIds,omitempty" tf:"prefix_list_ids"` // +kubebuilder:validation:Required - Protocol *string `json:"protocol" tf:"protocol,omitempty"` + Protocol *string `json:"protocol" tf:"protocol"` // +kubebuilder:validation:Optional SecurityGroupRefs []v1.Reference `json:"securityGroupRefs,omitempty" tf:"-"` @@ -100,13 +100,13 @@ type IngressParameters struct { // +crossplane:generate:reference:refFieldName=SecurityGroupRefs // +crossplane:generate:reference:selectorFieldName=SecurityGroupSelector // +kubebuilder:validation:Optional - SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups,omitempty"` + SecurityGroups []*string `json:"securityGroups,omitempty" tf:"security_groups"` // +kubebuilder:validation:Optional - Self *bool `json:"self,omitempty" tf:"self,omitempty"` + Self *bool `json:"self,omitempty" tf:"self"` // +kubebuilder:validation:Required - ToPort *int64 `json:"toPort" tf:"to_port,omitempty"` + ToPort *int64 `json:"toPort" tf:"to_port"` } type SecurityGroupObservation struct { diff --git a/apis/ecr/v1alpha2/zz_generated.deepcopy.go b/apis/ecr/v1alpha2/zz_generated.deepcopy.go index 038e71f50..9eb7afa6c 100644 --- a/apis/ecr/v1alpha2/zz_generated.deepcopy.go +++ b/apis/ecr/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/ecrpublic/v1alpha2/zz_generated.deepcopy.go b/apis/ecrpublic/v1alpha2/zz_generated.deepcopy.go index 097c458ed..5de017203 100644 --- a/apis/ecrpublic/v1alpha2/zz_generated.deepcopy.go +++ b/apis/ecrpublic/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/ecs/v1alpha2/zz_generated.deepcopy.go b/apis/ecs/v1alpha2/zz_generated.deepcopy.go index 4e18c1760..2b50c6188 100644 --- a/apis/ecs/v1alpha2/zz_generated.deepcopy.go +++ b/apis/ecs/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/eks/v1alpha2/zz_generated.deepcopy.go b/apis/eks/v1alpha2/zz_generated.deepcopy.go index e32ff6ae2..9741d3931 100644 --- a/apis/eks/v1alpha2/zz_generated.deepcopy.go +++ b/apis/eks/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/elasticache/v1alpha2/zz_generated.deepcopy.go b/apis/elasticache/v1alpha2/zz_generated.deepcopy.go index 4a0c0f2e3..aa9b811de 100644 --- a/apis/elasticache/v1alpha2/zz_generated.deepcopy.go +++ b/apis/elasticache/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/elbv2/v1alpha2/zz_generated.deepcopy.go b/apis/elbv2/v1alpha2/zz_generated.deepcopy.go index 5a4ff9622..123b866bb 100644 --- a/apis/elbv2/v1alpha2/zz_generated.deepcopy.go +++ b/apis/elbv2/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/generate.go b/apis/generate.go index e79cca43c..af1bdf604 100644 --- a/apis/generate.go +++ b/apis/generate.go @@ -35,7 +35,7 @@ limitations under the License. //go:generate go run ../cmd/generator/main.go .. // 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,allowDangerousTypes=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:allowDangerousTypes=true,crdVersions=v1 output:artifacts:config=../package/crds // Generate crossplane-runtime methodsets (resource.Claim, etc) //go:generate go run -tags generate github.com/crossplane/crossplane-tools/cmd/angryjet generate-methodsets --header-file=../hack/boilerplate.go.txt ./... diff --git a/apis/iam/v1alpha2/zz_accesskey_terraformed.go b/apis/iam/v1alpha2/zz_accesskey_terraformed.go index 8e69e4256..e169db404 100755 --- a/apis/iam/v1alpha2/zz_accesskey_terraformed.go +++ b/apis/iam/v1alpha2/zz_accesskey_terraformed.go @@ -32,7 +32,7 @@ func (mg *AccessKey) GetTerraformResourceType() string { // GetConnectionDetailsMapping for this AccessKey func (tr *AccessKey) GetConnectionDetailsMapping() map[string]string { - return map[string]string{"secret": "status.atProvider.secret", "ses_smtp_password_v4": "status.atProvider.sesSMTPPasswordV4"} + return map[string]string{"secret": "status.atProvider.secret", "ses_smtp_password_v4": "status.atProvider.sesSmtpPasswordV4"} } // GetObservation of this AccessKey diff --git a/apis/iam/v1alpha2/zz_generated.deepcopy.go b/apis/iam/v1alpha2/zz_generated.deepcopy.go index 9810319bb..57ebbf9d7 100644 --- a/apis/iam/v1alpha2/zz_generated.deepcopy.go +++ b/apis/iam/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/kms/v1alpha2/zz_generated.deepcopy.go b/apis/kms/v1alpha2/zz_generated.deepcopy.go index ca0914184..623004912 100644 --- a/apis/kms/v1alpha2/zz_generated.deepcopy.go +++ b/apis/kms/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/neptune/v1alpha2/zz_generated.deepcopy.go b/apis/neptune/v1alpha2/zz_generated.deepcopy.go index fd5657a9f..343c60007 100644 --- a/apis/neptune/v1alpha2/zz_generated.deepcopy.go +++ b/apis/neptune/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/rds/v1alpha2/zz_generated.deepcopy.go b/apis/rds/v1alpha2/zz_generated.deepcopy.go index dd22b6105..e91598d86 100644 --- a/apis/rds/v1alpha2/zz_generated.deepcopy.go +++ b/apis/rds/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/route53/v1alpha2/zz_generated.deepcopy.go b/apis/route53/v1alpha2/zz_generated.deepcopy.go index 888a99c27..a0ffdea73 100644 --- a/apis/route53/v1alpha2/zz_generated.deepcopy.go +++ b/apis/route53/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/route53resolver/v1alpha1/zz_generated.deepcopy.go b/apis/route53resolver/v1alpha1/zz_generated.deepcopy.go index c61db7a54..8473b0594 100644 --- a/apis/route53resolver/v1alpha1/zz_generated.deepcopy.go +++ b/apis/route53resolver/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/s3/v1alpha2/zz_generated.deepcopy.go b/apis/s3/v1alpha2/zz_generated.deepcopy.go index e8e5c8a89..a7e38154e 100644 --- a/apis/s3/v1alpha2/zz_generated.deepcopy.go +++ b/apis/s3/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index d41c64ae1..1fed6475b 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 8e3431e8c..627dda045 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -19,16 +19,20 @@ package main import ( "os" "path/filepath" + "time" + xpcontroller "github.com/crossplane/crossplane-runtime/pkg/controller" + "github.com/crossplane/crossplane-runtime/pkg/feature" "github.com/crossplane/crossplane-runtime/pkg/logging" "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + tjcontroller "github.com/crossplane/terrajet/pkg/controller" + "github.com/crossplane/terrajet/pkg/terraform" tf "github.com/terraform-providers/terraform-provider-aws/aws" "gopkg.in/alecthomas/kingpin.v2" + "k8s.io/client-go/tools/leaderelection/resourcelock" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/log/zap" - "github.com/crossplane/terrajet/pkg/terraform" - "github.com/crossplane-contrib/provider-jet-aws/apis" "github.com/crossplane-contrib/provider-jet-aws/config" "github.com/crossplane-contrib/provider-jet-aws/internal/clients" @@ -44,6 +48,7 @@ func main() { terraformVersion = app.Flag("terraform-version", "Terraform version.").Required().Envar("TERRAFORM_VERSION").String() providerSource = app.Flag("terraform-provider-source", "Terraform provider source.").Required().Envar("TERRAFORM_PROVIDER_SOURCE").String() providerVersion = app.Flag("terraform-provider-version", "Terraform provider version.").Required().Envar("TERRAFORM_PROVIDER_VERSION").String() + maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may checked for drift from the desired state.").Default("10").Int() ) kingpin.MustParse(app.Parse(os.Args[1:])) @@ -61,17 +66,28 @@ func main() { cfg, err := ctrl.GetConfig() kingpin.FatalIfError(err, "Cannot get API server rest config") - mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - LeaderElection: *leaderElection, - LeaderElectionID: "crossplane-leader-election-provider-jet-aws", - SyncPeriod: syncPeriod, + mgr, err := ctrl.NewManager(ratelimiter.LimitRESTConfig(cfg, *maxReconcileRate), ctrl.Options{ + LeaderElection: *leaderElection, + LeaderElectionID: "crossplane-leader-election-provider-jet-aws", + SyncPeriod: syncPeriod, + LeaderElectionResourceLock: resourcelock.LeasesResourceLock, + LeaseDuration: func() *time.Duration { d := 60 * time.Second; return &d }(), + RenewDeadline: func() *time.Duration { d := 50 * time.Second; return &d }(), }) kingpin.FatalIfError(err, "Cannot create controller manager") - ws := terraform.NewWorkspaceStore(log) - setup := clients.TerraformSetupBuilder(*terraformVersion, *providerSource, *providerVersion) - - rl := ratelimiter.NewGlobal(ratelimiter.DefaultGlobalRPS) + o := tjcontroller.Options{ + Options: xpcontroller.Options{ + Logger: log, + GlobalRateLimiter: ratelimiter.NewGlobal(*maxReconcileRate), + PollInterval: 1 * time.Minute, + MaxConcurrentReconciles: 1, + Features: &feature.Flags{}, + }, + Provider: config.GetProvider(tf.Provider()), + WorkspaceStore: terraform.NewWorkspaceStore(log), + SetupFn: clients.TerraformSetupBuilder(*terraformVersion, *providerSource, *providerVersion), + } kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - kingpin.FatalIfError(controller.Setup(mgr, log, rl, setup, ws, config.GetProvider(tf.Provider()), 1), "Cannot setup AWS controllers") + kingpin.FatalIfError(controller.Setup(mgr, o), "Cannot setup AWS controllers") kingpin.FatalIfError(mgr.Start(ctrl.SetupSignalHandler()), "Cannot start controller manager") } diff --git a/go.mod b/go.mod index 68fa2ae03..c21a18e84 100644 --- a/go.mod +++ b/go.mod @@ -1,22 +1,150 @@ module github.com/crossplane-contrib/provider-jet-aws -go 1.16 +go 1.17 require ( github.com/aws/aws-sdk-go-v2 v1.11.0 - github.com/crossplane/crossplane-runtime v0.15.1-0.20211004150827-579c1833b513 + github.com/crossplane/crossplane-runtime v0.15.1-0.20220106140106-428b7c390375 github.com/crossplane/crossplane-tools v0.0.0-20210916125540-071de511ae8e github.com/crossplane/provider-aws v0.23.0 - github.com/crossplane/terrajet v0.4.0-rc.0.0.20220221102850-391b75996abf + github.com/crossplane/terrajet v0.4.2 github.com/hashicorp/terraform-plugin-sdk/v2 v2.7.0 github.com/pkg/errors v0.9.1 github.com/terraform-providers/terraform-provider-aws v1.60.1-0.20210811232925-d6f99829ec3f gopkg.in/alecthomas/kingpin.v2 v2.2.6 - k8s.io/apimachinery v0.22.0 - k8s.io/client-go v0.22.0 + k8s.io/apimachinery v0.23.0 + k8s.io/client-go v0.23.0 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 - sigs.k8s.io/controller-runtime v0.9.6 - sigs.k8s.io/controller-tools v0.6.2 + sigs.k8s.io/controller-runtime v0.11.0 + sigs.k8s.io/controller-tools v0.8.0 +) + +require ( + cloud.google.com/go v0.81.0 // indirect + cloud.google.com/go/storage v1.14.0 // indirect + github.com/agext/levenshtein v1.2.2 // indirect + github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect + github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect + github.com/alecthomas/units v0.0.0-20210912230133-d1bdfacee922 // indirect + github.com/apparentlymart/go-textseg/v12 v12.0.0 // indirect + github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/aws/aws-sdk-go v1.40.19 // indirect + github.com/aws/aws-sdk-go-v2/config v1.10.0 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.6.0 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ec2 v1.21.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.5.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.6.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.9.0 // indirect + github.com/aws/smithy-go v1.9.0 // indirect + github.com/beevik/etree v1.1.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/dave/jennifer v1.4.1 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/fatih/camelcase v1.0.0 // indirect + github.com/fatih/color v1.12.0 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/go-ini/ini v1.46.0 // indirect + github.com/go-logr/logr v1.2.0 // indirect + github.com/go-logr/zapr v1.2.0 // indirect + github.com/gobuffalo/flect v0.2.3 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/hashicorp/aws-sdk-go-base v0.7.1 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-checkpoint v0.5.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect + github.com/hashicorp/go-getter v1.5.3 // indirect + github.com/hashicorp/go-hclog v0.15.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-plugin v1.4.1 // indirect + github.com/hashicorp/go-safetemp v1.0.0 // indirect + github.com/hashicorp/go-uuid v1.0.1 // indirect + github.com/hashicorp/go-version v1.3.0 // indirect + github.com/hashicorp/hcl/v2 v2.8.2 // indirect + github.com/hashicorp/logutils v1.0.0 // indirect + github.com/hashicorp/terraform-exec v0.14.0 // indirect + github.com/hashicorp/terraform-json v0.13.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.3.0 // indirect + github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect + github.com/iancoleman/strcase v0.2.0 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jen20/awspolicyequivalence v1.1.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/jstemmer/go-junit-report v0.9.1 // indirect + github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba // indirect + github.com/klauspost/compress v1.11.2 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/go-wordwrap v1.0.0 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/muvaf/typewriter v0.0.0-20210910160850-80e49fe1eb32 // indirect + github.com/oklog/run v1.0.0 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.28.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/shopspring/decimal v1.2.0 // indirect + github.com/spf13/afero v1.8.0 // indirect + github.com/spf13/cobra v1.2.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/ulikunitz/xz v0.5.8 // indirect + github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect + github.com/zclconf/go-cty v1.9.1 // indirect + go.opencensus.io v0.23.0 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.19.1 // indirect + golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa // indirect + golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect + golang.org/x/mod v0.4.2 // indirect + golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect + golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect + golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/api v0.44.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 // indirect + google.golang.org/grpc v1.40.0 // indirect + google.golang.org/protobuf v1.27.1 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/api v0.23.0 // indirect + k8s.io/apiextensions-apiserver v0.23.0 // indirect + k8s.io/component-base v0.23.0 // indirect + k8s.io/klog/v2 v2.30.0 // indirect + k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect + sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/gdavison/terraform-plugin-sdk/v2 v2.0.2-0.20210714181518-b5a3dc95a675 diff --git a/go.sum b/go.sum index 5feaa52aa..ae63efde4 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,6 +17,7 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= @@ -37,10 +39,13 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5TU= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= @@ -86,6 +91,7 @@ github.com/alecthomas/units v0.0.0-20210912230133-d1bdfacee922/go.mod h1:OMCwj8V github.com/andybalholm/crlf v0.0.0-20171020200849-670099aa064f/go.mod h1:k8feO4+kXDxro6ErPXBRTJ/ro2mf0SsFG8s7doP9kJE= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= @@ -153,6 +159,7 @@ github.com/aws/smithy-go v1.9.0 h1:c7FUdEqrQA1/UVKKCNDFQPNKGp4FQg3YW4Ck5SLTG58= github.com/aws/smithy-go v1.9.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -168,6 +175,8 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= @@ -180,7 +189,11 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -196,14 +209,14 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/crossplane/crossplane-runtime v0.15.1-0.20210930095326-d5661210733b/go.mod h1:gKix9Gq5kRzVe/4XOpwlFgG7OurzrYayviJxWZakhw0= -github.com/crossplane/crossplane-runtime v0.15.1-0.20211004150827-579c1833b513 h1:Sk3QurYYpy8x3c0DvTh9iGYFSv8WgdhnjCalNqNqlRI= -github.com/crossplane/crossplane-runtime v0.15.1-0.20211004150827-579c1833b513/go.mod h1:gKix9Gq5kRzVe/4XOpwlFgG7OurzrYayviJxWZakhw0= +github.com/crossplane/crossplane-runtime v0.15.1-0.20220106140106-428b7c390375 h1:wc0PmOXiNYFgV4k7zVy2NWCqXIpca2tnKA2wureoQNA= +github.com/crossplane/crossplane-runtime v0.15.1-0.20220106140106-428b7c390375/go.mod h1:CH05KIlxoEHEE4aLpUhPuvF+9qXsN6/H6YIDnUEjlDs= github.com/crossplane/crossplane-tools v0.0.0-20210916125540-071de511ae8e h1:7UM4E9gNEzJ22JgRZqY2KBlkdMCAiHmKS96rcLANdME= github.com/crossplane/crossplane-tools v0.0.0-20210916125540-071de511ae8e/go.mod h1:3GzY5sP0PVePArghBh5K4fGzS/3kM0R/NAZn5s7LXqw= github.com/crossplane/provider-aws v0.23.0 h1:PK5SfgEYY4mu/BrP+AkH5jRG/B/XYF06E+k55NdX6f4= github.com/crossplane/provider-aws v0.23.0/go.mod h1:+seFgtg4gbUEhtdYPD7xqlNKkLncGcUFwU/nU2uOM8Y= -github.com/crossplane/terrajet v0.4.0-rc.0.0.20220221102850-391b75996abf h1:EqzVnRksna58jMiLZRCU3ZCvLK9IuMt+tOZ3RVEllQg= -github.com/crossplane/terrajet v0.4.0-rc.0.0.20220221102850-391b75996abf/go.mod h1:hkFaUFClOfpeCtWahn3RxjyDEFIyP2qLDQVjOdHFHiQ= +github.com/crossplane/terrajet v0.4.2 h1:tWgjjPDwzwlurRYgaujsXL7NHhehBy1C8PZloTUQ65U= +github.com/crossplane/terrajet v0.4.2/go.mod h1:oynNx4au8y/tiSb1OanWSMmUf55Cz/O4f1HxH+liI2A= github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -225,25 +238,31 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/gdavison/terraform-plugin-sdk/v2 v2.0.2-0.20210714181518-b5a3dc95a675 h1:2QEdOgyP5bC4Cjkf4DZ7rBcCXfLaf+ceTY95U3axacI= github.com/gdavison/terraform-plugin-sdk/v2 v2.0.2-0.20210714181518-b5a3dc95a675/go.mod h1:grseeRo9g3yNkYW09iFlV8LG78jTa1ssBgouogQg/RU= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= @@ -271,18 +290,23 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= +github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -293,9 +317,11 @@ github.com/gobuffalo/flect v0.2.3/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20j github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -337,6 +363,8 @@ github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170/go.mod h1:EMjYTR github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -367,6 +395,7 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -381,13 +410,16 @@ github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3i github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -495,12 +527,15 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -513,6 +548,7 @@ github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba h1:NARVGAAgEXvoMeNPHhPFt1SBt1VMznA3Gnz9d0qj+co= github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.2 h1:MiK62aErc3gIiVEtyzKfeOHgW7atJb5g/KNX5m3c2nQ= @@ -538,6 +574,7 @@ github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPK github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -589,16 +626,18 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7 h1:CxRHKnh1YJXgNKxcos9rrKL6AcmOl1AS/fygmxFDzh4= -github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7/go.mod h1:SAAdeMEiFXR8LcHffvIdiLI1w243DCH2DuHq7UrA5YQ= +github.com/muvaf/typewriter v0.0.0-20210910160850-80e49fe1eb32 h1:yBQlHXLeUJL3TWVmzup5uT3wG5FLxhiTAiTsmNVocys= +github.com/muvaf/typewriter v0.0.0-20210910160850-80e49fe1eb32/go.mod h1:SAAdeMEiFXR8LcHffvIdiLI1w243DCH2DuHq7UrA5YQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= @@ -617,14 +656,17 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.14.0 h1:ep6kpPVwmr/nTbklSx2nrLNSIO62DoYAhnPNIMhK8gI= github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= @@ -635,6 +677,7 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -657,8 +700,9 @@ github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7q github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -686,20 +730,24 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.0 h1:5MmtuhAgYeU6qpa7w7bP0dv6MBYuup0vekhSpSkoq60= +github.com/spf13/afero v1.8.0/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -728,6 +776,7 @@ github.com/terraform-providers/terraform-provider-aws v1.60.1-0.20210811232925-d github.com/terraform-providers/terraform-provider-aws v1.60.1-0.20210811232925-d6f99829ec3f/go.mod h1:VhCSH/yeR/nHIgleNX27V73ZnR2Gx7Ai2f0BgOXKof0= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -745,6 +794,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= @@ -758,10 +808,15 @@ github.com/zclconf/go-cty-yaml v1.0.2/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgK go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -770,19 +825,35 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -798,8 +869,10 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b h1:7mWr3k41Qtv8XlltBkDkl8LoP3mpSgBW8BUoxtEdbXg= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa h1:idItI2DDfCokpg0N51B2VtiLdJ4vAuXC9fnCb2gACo4= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -879,7 +952,9 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -887,9 +962,11 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -901,8 +978,10 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 h1:0Ja1LBD+yisY6RWM/BH7TJVXWsSjs2VwBSmvSX4HdBc= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -963,6 +1042,7 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -971,6 +1051,7 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -978,17 +1059,23 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 h1:M69LAlWZCshgp0QSzyDcSsSIejIEeuaCVpmwcKwyLMk= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -996,8 +1083,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1007,6 +1095,7 @@ golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2M golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1062,11 +1151,13 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff h1:VX/uD7MK0AHXGiScH3fsieUQUcpmRERPDYtqZdJnA+Q= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1128,6 +1219,7 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1140,18 +1232,22 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 h1:NHN4wOCScVzKhPenJ2dt+BTs3X/XkBVI/Rh4iDt55T8= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1173,8 +1269,10 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1186,8 +1284,9 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1236,46 +1335,59 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= -k8s.io/api v0.22.0 h1:elCpMZ9UE8dLdYxr55E06TmSeji9I3KH494qH70/y+c= -k8s.io/api v0.22.0/go.mod h1:0AoXXqst47OI/L0oGKq9DG61dvGRPXs7X4/B7KyjBCU= -k8s.io/apiextensions-apiserver v0.21.3 h1:+B6biyUWpqt41kz5x6peIsljlsuwvNAp/oFax/j2/aY= +k8s.io/api v0.23.0 h1:WrL1gb73VSC8obi8cuYETJGXEoFNEh3LU0Pt+Sokgro= +k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= +k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= +k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= -k8s.io/apimachinery v0.22.0 h1:CqH/BdNAzZl+sr3tc0D3VsK3u6ARVSo3GWyLmfIjbP0= -k8s.io/apimachinery v0.22.0/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= +k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= +k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= +k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= -k8s.io/client-go v0.22.0 h1:sD6o9O6tCwUKCENw8v+HFsuAbq2jCu8cWC61/ydwA50= -k8s.io/client-go v0.22.0/go.mod h1:GUjIuXR5PiEv/RVK5OODUsm6eZk7wtSWZSaSJbpFdGg= +k8s.io/client-go v0.23.0 h1:vcsOqyPq7XV3QmQRCBH/t9BICJM9Q1M18qahjv+rebY= +k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= -k8s.io/component-base v0.21.3 h1:4WuuXY3Npa+iFfi2aDRiOz+anhNvRfye0859ZgfC5Og= +k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= +k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= +k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= -k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 h1:ZKMMxTvduyf5WUtREOqg5LiXaN1KO/+0oOQPRFrClpo= k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.9.6 h1:EevVMlgUj4fC1NVM4+DB3iPkWkmGRNarA66neqv9Qew= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= sigs.k8s.io/controller-runtime v0.9.6/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA= -sigs.k8s.io/controller-tools v0.6.2 h1:+Y8L0UsAugDipGRw8lrkPoAi6XqlQVZuf1DQHME3PgU= +sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= +sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/controller-tools v0.6.2/go.mod h1:oaeGpjXn6+ZSEIQkUe/+3I40PNiDYp9aeawbt3xTgJ8= +sigs.k8s.io/controller-tools v0.8.0 h1:uUkfTGEwrguqYYfcI2RRGUnC8mYdCFDqfwPKUcNJh1o= +sigs.k8s.io/controller-tools v0.8.0/go.mod h1:qE2DXhVOiEq5ijmINcFbqi9GZrrUjzB1TuJU0xa6eoY= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/internal/controller/autoscaling/attachment/zz_controller.go b/internal/controller/autoscaling/attachment/zz_controller.go index 647d49d71..6223dd1fd 100755 --- a/internal/controller/autoscaling/attachment/zz_controller.go +++ b/internal/controller/autoscaling/attachment/zz_controller.go @@ -21,39 +21,34 @@ package attachment import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/autoscaling/v1alpha2" ) // Setup adds a controller that reconciles Attachment managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Attachment_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Attachment_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_autoscaling_attachment"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_autoscaling_attachment"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Attachment{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/autoscaling/autoscalinggroup/zz_controller.go b/internal/controller/autoscaling/autoscalinggroup/zz_controller.go index 0ce46a0ad..912e3fc6c 100755 --- a/internal/controller/autoscaling/autoscalinggroup/zz_controller.go +++ b/internal/controller/autoscaling/autoscalinggroup/zz_controller.go @@ -21,42 +21,37 @@ package autoscalinggroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/autoscaling/v1alpha2" ) // Setup adds a controller that reconciles AutoscalingGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.AutoscalingGroup_GroupVersionKind.String()) var initializers managed.InitializerChain initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.AutoscalingGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_autoscaling_group"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_autoscaling_group"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.AutoscalingGroup_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.AutoscalingGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/ebsvolume/zz_controller.go b/internal/controller/ec2/ebsvolume/zz_controller.go index 0d42fdbc8..ec8b9842b 100755 --- a/internal/controller/ec2/ebsvolume/zz_controller.go +++ b/internal/controller/ec2/ebsvolume/zz_controller.go @@ -21,42 +21,37 @@ package ebsvolume import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles EBSVolume managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.EBSVolume_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_ebs_volume"].InitializerFns { + for _, i := range o.Provider.Resources["aws_ebs_volume"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.EBSVolume_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ebs_volume"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ebs_volume"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.EBSVolume{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/eip/zz_controller.go b/internal/controller/ec2/eip/zz_controller.go index e5cbec53b..cbbea3a00 100755 --- a/internal/controller/ec2/eip/zz_controller.go +++ b/internal/controller/ec2/eip/zz_controller.go @@ -21,44 +21,39 @@ package eip import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles EIP managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.EIP_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_eip"].InitializerFns { + for _, i := range o.Provider.Resources["aws_eip"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.EIP_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_eip"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_eip"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.EIP_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.EIP{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/instance/zz_controller.go b/internal/controller/ec2/instance/zz_controller.go index 5fd4b2ddd..4ed339d75 100755 --- a/internal/controller/ec2/instance/zz_controller.go +++ b/internal/controller/ec2/instance/zz_controller.go @@ -21,42 +21,37 @@ package instance import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles Instance managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Instance_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_instance"].InitializerFns { + for _, i := range o.Provider.Resources["aws_instance"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Instance_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_instance"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_instance"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Instance{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/launchtemplate/zz_controller.go b/internal/controller/ec2/launchtemplate/zz_controller.go index 8a3c8fe2c..e3c8460eb 100755 --- a/internal/controller/ec2/launchtemplate/zz_controller.go +++ b/internal/controller/ec2/launchtemplate/zz_controller.go @@ -21,42 +21,37 @@ package launchtemplate import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles LaunchTemplate managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.LaunchTemplate_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_launch_template"].InitializerFns { + for _, i := range o.Provider.Resources["aws_launch_template"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.LaunchTemplate_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_launch_template"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_launch_template"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.LaunchTemplate{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/networkinterface/zz_controller.go b/internal/controller/ec2/networkinterface/zz_controller.go index dd9cb8694..730c857bc 100755 --- a/internal/controller/ec2/networkinterface/zz_controller.go +++ b/internal/controller/ec2/networkinterface/zz_controller.go @@ -21,42 +21,37 @@ package networkinterface import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles NetworkInterface managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.NetworkInterface_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_network_interface"].InitializerFns { + for _, i := range o.Provider.Resources["aws_network_interface"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.NetworkInterface_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_network_interface"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_network_interface"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.NetworkInterface{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/route/zz_controller.go b/internal/controller/ec2/route/zz_controller.go index bc4bbdb52..395cb1616 100755 --- a/internal/controller/ec2/route/zz_controller.go +++ b/internal/controller/ec2/route/zz_controller.go @@ -21,41 +21,36 @@ package route import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles Route managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Route_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Route_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.Route_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Route{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/routetable/zz_controller.go b/internal/controller/ec2/routetable/zz_controller.go index 07e13bf3b..9502c7de6 100755 --- a/internal/controller/ec2/routetable/zz_controller.go +++ b/internal/controller/ec2/routetable/zz_controller.go @@ -21,42 +21,37 @@ package routetable import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles RouteTable managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.RouteTable_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_route_table"].InitializerFns { + for _, i := range o.Provider.Resources["aws_route_table"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.RouteTable_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route_table"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route_table"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.RouteTable{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/routetableassociation/zz_controller.go b/internal/controller/ec2/routetableassociation/zz_controller.go index 02ec6359f..789f24d13 100755 --- a/internal/controller/ec2/routetableassociation/zz_controller.go +++ b/internal/controller/ec2/routetableassociation/zz_controller.go @@ -21,39 +21,34 @@ package routetableassociation import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles RouteTableAssociation managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.RouteTableAssociation_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.RouteTableAssociation_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route_table_association"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route_table_association"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.RouteTableAssociation{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/securitygroup/zz_controller.go b/internal/controller/ec2/securitygroup/zz_controller.go index ac401bd0b..81f9305ee 100755 --- a/internal/controller/ec2/securitygroup/zz_controller.go +++ b/internal/controller/ec2/securitygroup/zz_controller.go @@ -21,42 +21,37 @@ package securitygroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles SecurityGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.SecurityGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_security_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_security_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.SecurityGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_security_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_security_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.SecurityGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/securitygrouprule/zz_controller.go b/internal/controller/ec2/securitygrouprule/zz_controller.go index f7f1f7a9f..a53feeefd 100755 --- a/internal/controller/ec2/securitygrouprule/zz_controller.go +++ b/internal/controller/ec2/securitygrouprule/zz_controller.go @@ -21,39 +21,34 @@ package securitygrouprule import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles SecurityGroupRule managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.SecurityGroupRule_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.SecurityGroupRule_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_security_group_rule"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_security_group_rule"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.SecurityGroupRule{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/subnet/zz_controller.go b/internal/controller/ec2/subnet/zz_controller.go index 46b4fc1f8..7937fc22d 100755 --- a/internal/controller/ec2/subnet/zz_controller.go +++ b/internal/controller/ec2/subnet/zz_controller.go @@ -21,42 +21,37 @@ package subnet import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles Subnet managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Subnet_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_subnet"].InitializerFns { + for _, i := range o.Provider.Resources["aws_subnet"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Subnet_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_subnet"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_subnet"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Subnet{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/transitgateway/zz_controller.go b/internal/controller/ec2/transitgateway/zz_controller.go index c5eb3662c..6c0146c46 100755 --- a/internal/controller/ec2/transitgateway/zz_controller.go +++ b/internal/controller/ec2/transitgateway/zz_controller.go @@ -21,42 +21,37 @@ package transitgateway import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles TransitGateway managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.TransitGateway_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_ec2_transit_gateway"].InitializerFns { + for _, i := range o.Provider.Resources["aws_ec2_transit_gateway"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.TransitGateway_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ec2_transit_gateway"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ec2_transit_gateway"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.TransitGateway{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/transitgatewayroute/zz_controller.go b/internal/controller/ec2/transitgatewayroute/zz_controller.go index ab1aca19a..61d464fd8 100755 --- a/internal/controller/ec2/transitgatewayroute/zz_controller.go +++ b/internal/controller/ec2/transitgatewayroute/zz_controller.go @@ -21,39 +21,34 @@ package transitgatewayroute import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles TransitGatewayRoute managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.TransitGatewayRoute_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.TransitGatewayRoute_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ec2_transit_gateway_route"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ec2_transit_gateway_route"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.TransitGatewayRoute{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/transitgatewayroutetable/zz_controller.go b/internal/controller/ec2/transitgatewayroutetable/zz_controller.go index e2e376083..9514b174c 100755 --- a/internal/controller/ec2/transitgatewayroutetable/zz_controller.go +++ b/internal/controller/ec2/transitgatewayroutetable/zz_controller.go @@ -21,42 +21,37 @@ package transitgatewayroutetable import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles TransitGatewayRouteTable managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.TransitGatewayRouteTable_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_ec2_transit_gateway_route_table"].InitializerFns { + for _, i := range o.Provider.Resources["aws_ec2_transit_gateway_route_table"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.TransitGatewayRouteTable_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ec2_transit_gateway_route_table"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ec2_transit_gateway_route_table"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.TransitGatewayRouteTable{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/transitgatewayroutetableassociation/zz_controller.go b/internal/controller/ec2/transitgatewayroutetableassociation/zz_controller.go index 8f379b21e..cb76c69fe 100755 --- a/internal/controller/ec2/transitgatewayroutetableassociation/zz_controller.go +++ b/internal/controller/ec2/transitgatewayroutetableassociation/zz_controller.go @@ -21,39 +21,34 @@ package transitgatewayroutetableassociation import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles TransitGatewayRouteTableAssociation managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.TransitGatewayRouteTableAssociation_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.TransitGatewayRouteTableAssociation_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ec2_transit_gateway_route_table_association"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ec2_transit_gateway_route_table_association"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.TransitGatewayRouteTableAssociation{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/transitgatewayroutetablepropagation/zz_controller.go b/internal/controller/ec2/transitgatewayroutetablepropagation/zz_controller.go index 5dec6af52..4179ccfdd 100755 --- a/internal/controller/ec2/transitgatewayroutetablepropagation/zz_controller.go +++ b/internal/controller/ec2/transitgatewayroutetablepropagation/zz_controller.go @@ -21,39 +21,34 @@ package transitgatewayroutetablepropagation import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles TransitGatewayRouteTablePropagation managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.TransitGatewayRouteTablePropagation_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.TransitGatewayRouteTablePropagation_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ec2_transit_gateway_route_table_propagation"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ec2_transit_gateway_route_table_propagation"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.TransitGatewayRouteTablePropagation{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/transitgatewayvpcattachment/zz_controller.go b/internal/controller/ec2/transitgatewayvpcattachment/zz_controller.go index 44fa1726a..696d2956b 100755 --- a/internal/controller/ec2/transitgatewayvpcattachment/zz_controller.go +++ b/internal/controller/ec2/transitgatewayvpcattachment/zz_controller.go @@ -21,42 +21,37 @@ package transitgatewayvpcattachment import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles TransitGatewayVPCAttachment managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.TransitGatewayVPCAttachment_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_ec2_transit_gateway_vpc_attachment"].InitializerFns { + for _, i := range o.Provider.Resources["aws_ec2_transit_gateway_vpc_attachment"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.TransitGatewayVPCAttachment_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ec2_transit_gateway_vpc_attachment"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ec2_transit_gateway_vpc_attachment"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.TransitGatewayVPCAttachment{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/transitgatewayvpcattachmentaccepter/zz_controller.go b/internal/controller/ec2/transitgatewayvpcattachmentaccepter/zz_controller.go index 692212560..77c931a54 100755 --- a/internal/controller/ec2/transitgatewayvpcattachmentaccepter/zz_controller.go +++ b/internal/controller/ec2/transitgatewayvpcattachmentaccepter/zz_controller.go @@ -21,42 +21,37 @@ package transitgatewayvpcattachmentaccepter import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles TransitGatewayVPCAttachmentAccepter managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.TransitGatewayVPCAttachmentAccepter_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_ec2_transit_gateway_vpc_attachment_accepter"].InitializerFns { + for _, i := range o.Provider.Resources["aws_ec2_transit_gateway_vpc_attachment_accepter"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.TransitGatewayVPCAttachmentAccepter_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ec2_transit_gateway_vpc_attachment_accepter"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ec2_transit_gateway_vpc_attachment_accepter"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.TransitGatewayVPCAttachmentAccepter{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/vpc/zz_controller.go b/internal/controller/ec2/vpc/zz_controller.go index f658bed68..ece8296b2 100755 --- a/internal/controller/ec2/vpc/zz_controller.go +++ b/internal/controller/ec2/vpc/zz_controller.go @@ -21,42 +21,37 @@ package vpc import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles VPC managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.VPC_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_vpc"].InitializerFns { + for _, i := range o.Provider.Resources["aws_vpc"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.VPC_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_vpc"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_vpc"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.VPC{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/vpcendpoint/zz_controller.go b/internal/controller/ec2/vpcendpoint/zz_controller.go index d511ec215..8f9270838 100755 --- a/internal/controller/ec2/vpcendpoint/zz_controller.go +++ b/internal/controller/ec2/vpcendpoint/zz_controller.go @@ -21,42 +21,37 @@ package vpcendpoint import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles VPCEndpoint managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.VPCEndpoint_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_vpc_endpoint"].InitializerFns { + for _, i := range o.Provider.Resources["aws_vpc_endpoint"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.VPCEndpoint_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_vpc_endpoint"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_vpc_endpoint"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.VPCEndpoint{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/vpcipv4cidrblockassociation/zz_controller.go b/internal/controller/ec2/vpcipv4cidrblockassociation/zz_controller.go index d8d7a6d63..c9318d533 100755 --- a/internal/controller/ec2/vpcipv4cidrblockassociation/zz_controller.go +++ b/internal/controller/ec2/vpcipv4cidrblockassociation/zz_controller.go @@ -21,39 +21,34 @@ package vpcipv4cidrblockassociation import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles VPCIPv4CidrBlockAssociation managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.VPCIPv4CidrBlockAssociation_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.VPCIPv4CidrBlockAssociation_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_vpc_ipv4_cidr_block_association"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_vpc_ipv4_cidr_block_association"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.VPCIPv4CidrBlockAssociation{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ec2/vpcpeeringconnection/zz_controller.go b/internal/controller/ec2/vpcpeeringconnection/zz_controller.go index 0d5b02db6..1da0d096d 100755 --- a/internal/controller/ec2/vpcpeeringconnection/zz_controller.go +++ b/internal/controller/ec2/vpcpeeringconnection/zz_controller.go @@ -21,42 +21,37 @@ package vpcpeeringconnection import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ec2/v1alpha2" ) // Setup adds a controller that reconciles VPCPeeringConnection managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.VPCPeeringConnection_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_vpc_peering_connection"].InitializerFns { + for _, i := range o.Provider.Resources["aws_vpc_peering_connection"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.VPCPeeringConnection_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_vpc_peering_connection"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_vpc_peering_connection"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.VPCPeeringConnection{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ecr/repository/zz_controller.go b/internal/controller/ecr/repository/zz_controller.go index dbeb13915..801055a64 100755 --- a/internal/controller/ecr/repository/zz_controller.go +++ b/internal/controller/ecr/repository/zz_controller.go @@ -21,45 +21,40 @@ package repository import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ecr/v1alpha2" ) // Setup adds a controller that reconciles Repository managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Repository_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_ecr_repository"].InitializerFns { + for _, i := range o.Provider.Resources["aws_ecr_repository"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Repository_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ecr_repository"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ecr_repository"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.Repository_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Repository{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ecrpublic/repository/zz_controller.go b/internal/controller/ecrpublic/repository/zz_controller.go index 1fab53f3a..26951c3d5 100755 --- a/internal/controller/ecrpublic/repository/zz_controller.go +++ b/internal/controller/ecrpublic/repository/zz_controller.go @@ -21,42 +21,37 @@ package repository import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ecrpublic/v1alpha2" ) // Setup adds a controller that reconciles Repository managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Repository_GroupVersionKind.String()) var initializers managed.InitializerChain initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Repository_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ecrpublic_repository"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ecrpublic_repository"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.Repository_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Repository{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ecs/capacityprovider/zz_controller.go b/internal/controller/ecs/capacityprovider/zz_controller.go index 58df69236..91e01de6a 100755 --- a/internal/controller/ecs/capacityprovider/zz_controller.go +++ b/internal/controller/ecs/capacityprovider/zz_controller.go @@ -21,43 +21,38 @@ package capacityprovider import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ecs/v1alpha2" ) // Setup adds a controller that reconciles CapacityProvider managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.CapacityProvider_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_ecs_capacity_provider"].InitializerFns { + for _, i := range o.Provider.Resources["aws_ecs_capacity_provider"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.CapacityProvider_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ecs_capacity_provider"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ecs_capacity_provider"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.CapacityProvider{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ecs/cluster/zz_controller.go b/internal/controller/ecs/cluster/zz_controller.go index 2545b935c..f5d10735d 100755 --- a/internal/controller/ecs/cluster/zz_controller.go +++ b/internal/controller/ecs/cluster/zz_controller.go @@ -21,45 +21,40 @@ package cluster import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ecs/v1alpha2" ) // Setup adds a controller that reconciles Cluster managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Cluster_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_ecs_cluster"].InitializerFns { + for _, i := range o.Provider.Resources["aws_ecs_cluster"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Cluster_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ecs_cluster"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ecs_cluster"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.Cluster_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Cluster{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ecs/service/zz_controller.go b/internal/controller/ecs/service/zz_controller.go index 2a559e663..705dc7715 100755 --- a/internal/controller/ecs/service/zz_controller.go +++ b/internal/controller/ecs/service/zz_controller.go @@ -21,45 +21,40 @@ package service import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ecs/v1alpha2" ) // Setup adds a controller that reconciles Service managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Service_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_ecs_service"].InitializerFns { + for _, i := range o.Provider.Resources["aws_ecs_service"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Service_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ecs_service"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ecs_service"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.Service_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Service{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/ecs/taskdefinition/zz_controller.go b/internal/controller/ecs/taskdefinition/zz_controller.go index c2f40074e..c2844c131 100755 --- a/internal/controller/ecs/taskdefinition/zz_controller.go +++ b/internal/controller/ecs/taskdefinition/zz_controller.go @@ -21,42 +21,37 @@ package taskdefinition import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/ecs/v1alpha2" ) // Setup adds a controller that reconciles TaskDefinition managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.TaskDefinition_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_ecs_task_definition"].InitializerFns { + for _, i := range o.Provider.Resources["aws_ecs_task_definition"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.TaskDefinition_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_ecs_task_definition"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_ecs_task_definition"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.TaskDefinition{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/eks/addon/zz_controller.go b/internal/controller/eks/addon/zz_controller.go index 41e3f6ef7..24eac8f6b 100755 --- a/internal/controller/eks/addon/zz_controller.go +++ b/internal/controller/eks/addon/zz_controller.go @@ -21,43 +21,38 @@ package addon import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/eks/v1alpha2" ) // Setup adds a controller that reconciles Addon managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Addon_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_eks_addon"].InitializerFns { + for _, i := range o.Provider.Resources["aws_eks_addon"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Addon_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_eks_addon"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_eks_addon"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Addon{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/eks/cluster/zz_controller.go b/internal/controller/eks/cluster/zz_controller.go index 48a5699d3..81663e842 100755 --- a/internal/controller/eks/cluster/zz_controller.go +++ b/internal/controller/eks/cluster/zz_controller.go @@ -21,45 +21,40 @@ package cluster import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/eks/v1alpha2" ) // Setup adds a controller that reconciles Cluster managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Cluster_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_eks_cluster"].InitializerFns { + for _, i := range o.Provider.Resources["aws_eks_cluster"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Cluster_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_eks_cluster"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_eks_cluster"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.Cluster_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Cluster{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/eks/fargateprofile/zz_controller.go b/internal/controller/eks/fargateprofile/zz_controller.go index e3ae3a600..bbd2fad11 100755 --- a/internal/controller/eks/fargateprofile/zz_controller.go +++ b/internal/controller/eks/fargateprofile/zz_controller.go @@ -21,43 +21,38 @@ package fargateprofile import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/eks/v1alpha2" ) // Setup adds a controller that reconciles FargateProfile managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.FargateProfile_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_eks_fargate_profile"].InitializerFns { + for _, i := range o.Provider.Resources["aws_eks_fargate_profile"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.FargateProfile_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_eks_fargate_profile"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_eks_fargate_profile"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.FargateProfile{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/eks/identityproviderconfig/zz_controller.go b/internal/controller/eks/identityproviderconfig/zz_controller.go index e7d9451da..4f4791186 100755 --- a/internal/controller/eks/identityproviderconfig/zz_controller.go +++ b/internal/controller/eks/identityproviderconfig/zz_controller.go @@ -21,42 +21,37 @@ package identityproviderconfig import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/eks/v1alpha2" ) // Setup adds a controller that reconciles IdentityProviderConfig managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.IdentityProviderConfig_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_eks_identity_provider_config"].InitializerFns { + for _, i := range o.Provider.Resources["aws_eks_identity_provider_config"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.IdentityProviderConfig_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_eks_identity_provider_config"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_eks_identity_provider_config"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.IdentityProviderConfig{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/eks/nodegroup/zz_controller.go b/internal/controller/eks/nodegroup/zz_controller.go index 8a1cfb00a..e4f0a1631 100755 --- a/internal/controller/eks/nodegroup/zz_controller.go +++ b/internal/controller/eks/nodegroup/zz_controller.go @@ -21,45 +21,40 @@ package nodegroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/eks/v1alpha2" ) // Setup adds a controller that reconciles NodeGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.NodeGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_eks_node_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_eks_node_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.NodeGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_eks_node_group"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_eks_node_group"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.NodeGroup_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.NodeGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/cluster/zz_controller.go b/internal/controller/elasticache/cluster/zz_controller.go index 9586a5335..b27c21eb9 100755 --- a/internal/controller/elasticache/cluster/zz_controller.go +++ b/internal/controller/elasticache/cluster/zz_controller.go @@ -21,45 +21,40 @@ package cluster import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/elasticache/v1alpha2" ) // Setup adds a controller that reconciles Cluster managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Cluster_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_elasticache_cluster"].InitializerFns { + for _, i := range o.Provider.Resources["aws_elasticache_cluster"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Cluster_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_elasticache_cluster"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_cluster"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.Cluster_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Cluster{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/parametergroup/zz_controller.go b/internal/controller/elasticache/parametergroup/zz_controller.go index f295b01bc..69ae46843 100755 --- a/internal/controller/elasticache/parametergroup/zz_controller.go +++ b/internal/controller/elasticache/parametergroup/zz_controller.go @@ -21,43 +21,38 @@ package parametergroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/elasticache/v1alpha2" ) // Setup adds a controller that reconciles ParameterGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.ParameterGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_elasticache_parameter_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_elasticache_parameter_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.ParameterGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_elasticache_parameter_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_parameter_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.ParameterGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/replicationgroup/zz_controller.go b/internal/controller/elasticache/replicationgroup/zz_controller.go index a874ca7f3..86f0b6efa 100755 --- a/internal/controller/elasticache/replicationgroup/zz_controller.go +++ b/internal/controller/elasticache/replicationgroup/zz_controller.go @@ -21,43 +21,38 @@ package replicationgroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/elasticache/v1alpha2" ) // Setup adds a controller that reconciles ReplicationGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.ReplicationGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_elasticache_replication_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_elasticache_replication_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.ReplicationGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_elasticache_replication_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_replication_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.ReplicationGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/user/zz_controller.go b/internal/controller/elasticache/user/zz_controller.go index 8f30981a7..4651d78ae 100755 --- a/internal/controller/elasticache/user/zz_controller.go +++ b/internal/controller/elasticache/user/zz_controller.go @@ -21,43 +21,38 @@ package user import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/elasticache/v1alpha2" ) // Setup adds a controller that reconciles User managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.User_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_elasticache_user"].InitializerFns { + for _, i := range o.Provider.Resources["aws_elasticache_user"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.User_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_elasticache_user"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_user"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.User{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elasticache/usergroup/zz_controller.go b/internal/controller/elasticache/usergroup/zz_controller.go index 320f8c62f..7fd7a6a8b 100755 --- a/internal/controller/elasticache/usergroup/zz_controller.go +++ b/internal/controller/elasticache/usergroup/zz_controller.go @@ -21,43 +21,38 @@ package usergroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/elasticache/v1alpha2" ) // Setup adds a controller that reconciles UserGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.UserGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_elasticache_user_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_elasticache_user_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.UserGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_elasticache_user_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_elasticache_user_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.UserGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elbv2/lb/zz_controller.go b/internal/controller/elbv2/lb/zz_controller.go index 50500f544..fdbfb0575 100755 --- a/internal/controller/elbv2/lb/zz_controller.go +++ b/internal/controller/elbv2/lb/zz_controller.go @@ -21,44 +21,39 @@ package lb import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/elbv2/v1alpha2" ) // Setup adds a controller that reconciles LB managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.LB_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_lb"].InitializerFns { + for _, i := range o.Provider.Resources["aws_lb"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.LB_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_lb"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_lb"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.LB_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.LB{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elbv2/lblistener/zz_controller.go b/internal/controller/elbv2/lblistener/zz_controller.go index 3c34a13db..ebea26ebd 100755 --- a/internal/controller/elbv2/lblistener/zz_controller.go +++ b/internal/controller/elbv2/lblistener/zz_controller.go @@ -21,42 +21,37 @@ package lblistener import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/elbv2/v1alpha2" ) // Setup adds a controller that reconciles LBListener managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.LBListener_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_lb_listener"].InitializerFns { + for _, i := range o.Provider.Resources["aws_lb_listener"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.LBListener_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_lb_listener"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_lb_listener"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.LBListener{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elbv2/lbtargetgroup/zz_controller.go b/internal/controller/elbv2/lbtargetgroup/zz_controller.go index 74f0bdb2f..e1796bbaa 100755 --- a/internal/controller/elbv2/lbtargetgroup/zz_controller.go +++ b/internal/controller/elbv2/lbtargetgroup/zz_controller.go @@ -21,42 +21,37 @@ package lbtargetgroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/elbv2/v1alpha2" ) // Setup adds a controller that reconciles LBTargetGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.LBTargetGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_lb_target_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_lb_target_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.LBTargetGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_lb_target_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_lb_target_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.LBTargetGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/elbv2/lbtargetgroupattachment/zz_controller.go b/internal/controller/elbv2/lbtargetgroupattachment/zz_controller.go index c1352d1a5..0e46a77b4 100755 --- a/internal/controller/elbv2/lbtargetgroupattachment/zz_controller.go +++ b/internal/controller/elbv2/lbtargetgroupattachment/zz_controller.go @@ -21,39 +21,34 @@ package lbtargetgroupattachment import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/elbv2/v1alpha2" ) // Setup adds a controller that reconciles LBTargetGroupAttachment managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.LBTargetGroupAttachment_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.LBTargetGroupAttachment_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_lb_target_group_attachment"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_lb_target_group_attachment"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.LBTargetGroupAttachment{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/accesskey/zz_controller.go b/internal/controller/iam/accesskey/zz_controller.go index 4e0005a77..6b36147ac 100755 --- a/internal/controller/iam/accesskey/zz_controller.go +++ b/internal/controller/iam/accesskey/zz_controller.go @@ -21,39 +21,34 @@ package accesskey import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha2" ) // Setup adds a controller that reconciles AccessKey managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.AccessKey_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.AccessKey_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_access_key"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_iam_access_key"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.AccessKey{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/group/zz_controller.go b/internal/controller/iam/group/zz_controller.go index 394795114..5b12f6182 100755 --- a/internal/controller/iam/group/zz_controller.go +++ b/internal/controller/iam/group/zz_controller.go @@ -21,40 +21,35 @@ package group import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha2" ) // Setup adds a controller that reconciles Group managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Group_GroupVersionKind.String()) var initializers managed.InitializerChain initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Group_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_iam_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Group{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/grouppolicyattachment/zz_controller.go b/internal/controller/iam/grouppolicyattachment/zz_controller.go index 168bbe62e..2160842da 100755 --- a/internal/controller/iam/grouppolicyattachment/zz_controller.go +++ b/internal/controller/iam/grouppolicyattachment/zz_controller.go @@ -21,39 +21,34 @@ package grouppolicyattachment import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha2" ) // Setup adds a controller that reconciles GroupPolicyAttachment managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.GroupPolicyAttachment_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.GroupPolicyAttachment_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_group_policy_attachment"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_iam_group_policy_attachment"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.GroupPolicyAttachment{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/instanceprofile/zz_controller.go b/internal/controller/iam/instanceprofile/zz_controller.go index ff569a25a..4ed1b5ab9 100755 --- a/internal/controller/iam/instanceprofile/zz_controller.go +++ b/internal/controller/iam/instanceprofile/zz_controller.go @@ -21,43 +21,38 @@ package instanceprofile import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha2" ) // Setup adds a controller that reconciles InstanceProfile managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.InstanceProfile_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_iam_instance_profile"].InitializerFns { + for _, i := range o.Provider.Resources["aws_iam_instance_profile"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.InstanceProfile_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_instance_profile"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_iam_instance_profile"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.InstanceProfile{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/policy/zz_controller.go b/internal/controller/iam/policy/zz_controller.go index 07a569453..ecb9aa83f 100755 --- a/internal/controller/iam/policy/zz_controller.go +++ b/internal/controller/iam/policy/zz_controller.go @@ -21,42 +21,37 @@ package policy import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha2" ) // Setup adds a controller that reconciles Policy managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Policy_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_iam_policy"].InitializerFns { + for _, i := range o.Provider.Resources["aws_iam_policy"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Policy_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_policy"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_iam_policy"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Policy{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/role/zz_controller.go b/internal/controller/iam/role/zz_controller.go index d457cf546..a9812e9e2 100755 --- a/internal/controller/iam/role/zz_controller.go +++ b/internal/controller/iam/role/zz_controller.go @@ -21,43 +21,38 @@ package role import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha2" ) // Setup adds a controller that reconciles Role managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Role_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_iam_role"].InitializerFns { + for _, i := range o.Provider.Resources["aws_iam_role"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Role_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_role"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_iam_role"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Role{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/rolepolicyattachment/zz_controller.go b/internal/controller/iam/rolepolicyattachment/zz_controller.go index 98675842f..d3306db21 100755 --- a/internal/controller/iam/rolepolicyattachment/zz_controller.go +++ b/internal/controller/iam/rolepolicyattachment/zz_controller.go @@ -21,39 +21,34 @@ package rolepolicyattachment import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha2" ) // Setup adds a controller that reconciles RolePolicyAttachment managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.RolePolicyAttachment_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.RolePolicyAttachment_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_role_policy_attachment"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_iam_role_policy_attachment"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.RolePolicyAttachment{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/user/zz_controller.go b/internal/controller/iam/user/zz_controller.go index f9bde6b51..fb877c217 100755 --- a/internal/controller/iam/user/zz_controller.go +++ b/internal/controller/iam/user/zz_controller.go @@ -21,43 +21,38 @@ package user import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha2" ) // Setup adds a controller that reconciles User managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.User_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_iam_user"].InitializerFns { + for _, i := range o.Provider.Resources["aws_iam_user"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.User_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_user"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_iam_user"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.User{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/usergroupmembership/zz_controller.go b/internal/controller/iam/usergroupmembership/zz_controller.go index 8c8aa2271..9795e0208 100755 --- a/internal/controller/iam/usergroupmembership/zz_controller.go +++ b/internal/controller/iam/usergroupmembership/zz_controller.go @@ -21,39 +21,34 @@ package usergroupmembership import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha2" ) // Setup adds a controller that reconciles UserGroupMembership managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.UserGroupMembership_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.UserGroupMembership_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_user_group_membership"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_iam_user_group_membership"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.UserGroupMembership{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/iam/userpolicyattachment/zz_controller.go b/internal/controller/iam/userpolicyattachment/zz_controller.go index 9d489a3df..ccd26ac12 100755 --- a/internal/controller/iam/userpolicyattachment/zz_controller.go +++ b/internal/controller/iam/userpolicyattachment/zz_controller.go @@ -21,39 +21,34 @@ package userpolicyattachment import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/iam/v1alpha2" ) // Setup adds a controller that reconciles UserPolicyAttachment managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.UserPolicyAttachment_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.UserPolicyAttachment_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_iam_user_policy_attachment"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_iam_user_policy_attachment"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.UserPolicyAttachment{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/kms/key/zz_controller.go b/internal/controller/kms/key/zz_controller.go index 55a0e3b0f..9261cac2f 100755 --- a/internal/controller/kms/key/zz_controller.go +++ b/internal/controller/kms/key/zz_controller.go @@ -21,42 +21,37 @@ package key import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/kms/v1alpha2" ) // Setup adds a controller that reconciles Key managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Key_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_kms_key"].InitializerFns { + for _, i := range o.Provider.Resources["aws_kms_key"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Key_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_kms_key"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_kms_key"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Key{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/neptune/cluster/zz_controller.go b/internal/controller/neptune/cluster/zz_controller.go index a71ee189b..47900b64e 100755 --- a/internal/controller/neptune/cluster/zz_controller.go +++ b/internal/controller/neptune/cluster/zz_controller.go @@ -21,45 +21,40 @@ package cluster import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/neptune/v1alpha2" ) // Setup adds a controller that reconciles Cluster managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Cluster_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_neptune_cluster"].InitializerFns { + for _, i := range o.Provider.Resources["aws_neptune_cluster"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Cluster_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_neptune_cluster"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_neptune_cluster"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.Cluster_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Cluster{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/neptune/clusterendpoint/zz_controller.go b/internal/controller/neptune/clusterendpoint/zz_controller.go index 206714339..79f9f4c2f 100755 --- a/internal/controller/neptune/clusterendpoint/zz_controller.go +++ b/internal/controller/neptune/clusterendpoint/zz_controller.go @@ -21,43 +21,38 @@ package clusterendpoint import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/neptune/v1alpha2" ) // Setup adds a controller that reconciles ClusterEndpoint managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.ClusterEndpoint_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_neptune_cluster_endpoint"].InitializerFns { + for _, i := range o.Provider.Resources["aws_neptune_cluster_endpoint"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.ClusterEndpoint_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_neptune_cluster_endpoint"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_neptune_cluster_endpoint"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.ClusterEndpoint{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/neptune/clusterinstance/zz_controller.go b/internal/controller/neptune/clusterinstance/zz_controller.go index e0d4e3a7c..0cef67568 100755 --- a/internal/controller/neptune/clusterinstance/zz_controller.go +++ b/internal/controller/neptune/clusterinstance/zz_controller.go @@ -21,45 +21,40 @@ package clusterinstance import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/neptune/v1alpha2" ) // Setup adds a controller that reconciles ClusterInstance managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.ClusterInstance_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_neptune_cluster_instance"].InitializerFns { + for _, i := range o.Provider.Resources["aws_neptune_cluster_instance"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.ClusterInstance_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_neptune_cluster_instance"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_neptune_cluster_instance"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.ClusterInstance_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.ClusterInstance{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/neptune/clusterparametergroup/zz_controller.go b/internal/controller/neptune/clusterparametergroup/zz_controller.go index 391d32d4f..824bbaa0c 100755 --- a/internal/controller/neptune/clusterparametergroup/zz_controller.go +++ b/internal/controller/neptune/clusterparametergroup/zz_controller.go @@ -21,43 +21,38 @@ package clusterparametergroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/neptune/v1alpha2" ) // Setup adds a controller that reconciles ClusterParameterGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.ClusterParameterGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_neptune_cluster_parameter_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_neptune_cluster_parameter_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.ClusterParameterGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_neptune_cluster_parameter_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_neptune_cluster_parameter_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.ClusterParameterGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/neptune/clustersnapshot/zz_controller.go b/internal/controller/neptune/clustersnapshot/zz_controller.go index 5d62e072a..e50412199 100755 --- a/internal/controller/neptune/clustersnapshot/zz_controller.go +++ b/internal/controller/neptune/clustersnapshot/zz_controller.go @@ -21,42 +21,37 @@ package clustersnapshot import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/neptune/v1alpha2" ) // Setup adds a controller that reconciles ClusterSnapshot managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.ClusterSnapshot_GroupVersionKind.String()) var initializers managed.InitializerChain initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.ClusterSnapshot_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_neptune_cluster_snapshot"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_neptune_cluster_snapshot"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.ClusterSnapshot_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.ClusterSnapshot{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/neptune/eventsubscription/zz_controller.go b/internal/controller/neptune/eventsubscription/zz_controller.go index 7f79e72e5..b0639fe0a 100755 --- a/internal/controller/neptune/eventsubscription/zz_controller.go +++ b/internal/controller/neptune/eventsubscription/zz_controller.go @@ -21,43 +21,38 @@ package eventsubscription import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/neptune/v1alpha2" ) // Setup adds a controller that reconciles EventSubscription managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.EventSubscription_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_neptune_event_subscription"].InitializerFns { + for _, i := range o.Provider.Resources["aws_neptune_event_subscription"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.EventSubscription_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_neptune_event_subscription"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_neptune_event_subscription"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.EventSubscription{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/neptune/parametergroup/zz_controller.go b/internal/controller/neptune/parametergroup/zz_controller.go index 5a8b9eb1c..c59871e0c 100755 --- a/internal/controller/neptune/parametergroup/zz_controller.go +++ b/internal/controller/neptune/parametergroup/zz_controller.go @@ -21,43 +21,38 @@ package parametergroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/neptune/v1alpha2" ) // Setup adds a controller that reconciles ParameterGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.ParameterGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_neptune_parameter_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_neptune_parameter_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.ParameterGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_neptune_parameter_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_neptune_parameter_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.ParameterGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/neptune/subnetgroup/zz_controller.go b/internal/controller/neptune/subnetgroup/zz_controller.go index 859538313..1381f21e8 100755 --- a/internal/controller/neptune/subnetgroup/zz_controller.go +++ b/internal/controller/neptune/subnetgroup/zz_controller.go @@ -21,43 +21,38 @@ package subnetgroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/neptune/v1alpha2" ) // Setup adds a controller that reconciles SubnetGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.SubnetGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_neptune_subnet_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_neptune_subnet_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.SubnetGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_neptune_subnet_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_neptune_subnet_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.SubnetGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/providerconfig/config.go b/internal/controller/providerconfig/config.go index 9df21557e..8e609825a 100644 --- a/internal/controller/providerconfig/config.go +++ b/internal/controller/providerconfig/config.go @@ -14,32 +14,22 @@ limitations under the License. package providerconfig import ( - "github.com/crossplane/terrajet/pkg/config" - "github.com/crossplane/terrajet/pkg/terraform" - "k8s.io/client-go/util/workqueue" ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/source" "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" - "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/providerconfig" "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane-contrib/provider-jet-aws/apis/v1alpha1" ) // Setup adds a controller that reconciles ProviderConfigs by accounting for // their current usage. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, _ terraform.SetupFn, _ *terraform.WorkspaceStore, _ *config.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o controller.Options) error { name := providerconfig.ControllerName(v1alpha1.ProviderConfigGroupKind) - o := controller.Options{ - RateLimiter: ratelimiter.NewController(rl), - MaxConcurrentReconciles: concurrency, - } - of := resource.ProviderConfigKinds{ Config: v1alpha1.ProviderConfigGroupVersionKind, UsageList: v1alpha1.ProviderConfigUsageListGroupVersionKind, @@ -47,10 +37,10 @@ func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, _ terra return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(o). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.ProviderConfig{}). Watches(&source.Kind{Type: &v1alpha1.ProviderConfigUsage{}}, &resource.EnqueueRequestForProviderConfig{}). Complete(providerconfig.NewReconciler(mgr, of, - providerconfig.WithLogger(l.WithValues("controller", name)), + providerconfig.WithLogger(o.Logger.WithValues("controller", name)), providerconfig.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))))) } diff --git a/internal/controller/rds/cluster/zz_controller.go b/internal/controller/rds/cluster/zz_controller.go index a9b7bd8b5..3a301c395 100755 --- a/internal/controller/rds/cluster/zz_controller.go +++ b/internal/controller/rds/cluster/zz_controller.go @@ -21,45 +21,40 @@ package cluster import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/rds/v1alpha2" ) // Setup adds a controller that reconciles Cluster managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Cluster_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_rds_cluster"].InitializerFns { + for _, i := range o.Provider.Resources["aws_rds_cluster"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Cluster_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_rds_cluster"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_rds_cluster"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.Cluster_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Cluster{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/instance/zz_controller.go b/internal/controller/rds/instance/zz_controller.go index ff3e07041..a2c40860f 100755 --- a/internal/controller/rds/instance/zz_controller.go +++ b/internal/controller/rds/instance/zz_controller.go @@ -21,45 +21,40 @@ package instance import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/rds/v1alpha2" ) // Setup adds a controller that reconciles Instance managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Instance_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_db_instance"].InitializerFns { + for _, i := range o.Provider.Resources["aws_db_instance"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Instance_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_db_instance"], + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_instance"], tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha2.Instance_GroupVersionKind))), )), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Instance{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/rds/parametergroup/zz_controller.go b/internal/controller/rds/parametergroup/zz_controller.go index 64d00ff56..623500d46 100755 --- a/internal/controller/rds/parametergroup/zz_controller.go +++ b/internal/controller/rds/parametergroup/zz_controller.go @@ -21,43 +21,38 @@ package parametergroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/rds/v1alpha2" ) // Setup adds a controller that reconciles ParameterGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.ParameterGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_db_parameter_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_db_parameter_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.ParameterGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_db_parameter_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_db_parameter_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.ParameterGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53/delegationset/zz_controller.go b/internal/controller/route53/delegationset/zz_controller.go index 32ba93f7d..59bb7b29b 100755 --- a/internal/controller/route53/delegationset/zz_controller.go +++ b/internal/controller/route53/delegationset/zz_controller.go @@ -21,39 +21,34 @@ package delegationset import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/route53/v1alpha2" ) // Setup adds a controller that reconciles DelegationSet managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.DelegationSet_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.DelegationSet_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_delegation_set"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_delegation_set"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.DelegationSet{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53/healthcheck/zz_controller.go b/internal/controller/route53/healthcheck/zz_controller.go index 767be5574..c64f08278 100755 --- a/internal/controller/route53/healthcheck/zz_controller.go +++ b/internal/controller/route53/healthcheck/zz_controller.go @@ -21,42 +21,37 @@ package healthcheck import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/route53/v1alpha2" ) // Setup adds a controller that reconciles HealthCheck managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.HealthCheck_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_route53_health_check"].InitializerFns { + for _, i := range o.Provider.Resources["aws_route53_health_check"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.HealthCheck_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_health_check"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_health_check"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.HealthCheck{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53/hostedzonednssec/zz_controller.go b/internal/controller/route53/hostedzonednssec/zz_controller.go index 8f12e1e06..d7ce5aaea 100755 --- a/internal/controller/route53/hostedzonednssec/zz_controller.go +++ b/internal/controller/route53/hostedzonednssec/zz_controller.go @@ -21,39 +21,34 @@ package hostedzonednssec import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/route53/v1alpha2" ) // Setup adds a controller that reconciles HostedZoneDNSSEC managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.HostedZoneDNSSEC_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.HostedZoneDNSSEC_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_hosted_zone_dnssec"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_hosted_zone_dnssec"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.HostedZoneDNSSEC{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53/keysigningkey/zz_controller.go b/internal/controller/route53/keysigningkey/zz_controller.go index ea03cd741..73f37d38c 100755 --- a/internal/controller/route53/keysigningkey/zz_controller.go +++ b/internal/controller/route53/keysigningkey/zz_controller.go @@ -21,39 +21,34 @@ package keysigningkey import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/route53/v1alpha2" ) // Setup adds a controller that reconciles KeySigningKey managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.KeySigningKey_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.KeySigningKey_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_key_signing_key"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_key_signing_key"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.KeySigningKey{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53/querylog/zz_controller.go b/internal/controller/route53/querylog/zz_controller.go index 6096b1cbd..f1aa6eda0 100755 --- a/internal/controller/route53/querylog/zz_controller.go +++ b/internal/controller/route53/querylog/zz_controller.go @@ -21,39 +21,34 @@ package querylog import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/route53/v1alpha2" ) // Setup adds a controller that reconciles QueryLog managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.QueryLog_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.QueryLog_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_query_log"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_query_log"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.QueryLog{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53/record/zz_controller.go b/internal/controller/route53/record/zz_controller.go index 1255f56d7..ed1622199 100755 --- a/internal/controller/route53/record/zz_controller.go +++ b/internal/controller/route53/record/zz_controller.go @@ -21,39 +21,34 @@ package record import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/route53/v1alpha2" ) // Setup adds a controller that reconciles Record managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Record_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Record_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_record"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_record"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Record{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53/vpcassociationauthorization/zz_controller.go b/internal/controller/route53/vpcassociationauthorization/zz_controller.go index 1f685f1aa..26479f1f4 100755 --- a/internal/controller/route53/vpcassociationauthorization/zz_controller.go +++ b/internal/controller/route53/vpcassociationauthorization/zz_controller.go @@ -21,39 +21,34 @@ package vpcassociationauthorization import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/route53/v1alpha2" ) // Setup adds a controller that reconciles VPCAssociationAuthorization managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.VPCAssociationAuthorization_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.VPCAssociationAuthorization_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_vpc_association_authorization"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_vpc_association_authorization"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.VPCAssociationAuthorization{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53/zone/zz_controller.go b/internal/controller/route53/zone/zz_controller.go index 6e012facb..7cdeeb260 100755 --- a/internal/controller/route53/zone/zz_controller.go +++ b/internal/controller/route53/zone/zz_controller.go @@ -21,42 +21,37 @@ package zone import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/route53/v1alpha2" ) // Setup adds a controller that reconciles Zone managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Zone_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_route53_zone"].InitializerFns { + for _, i := range o.Provider.Resources["aws_route53_zone"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Zone_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_zone"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_zone"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Zone{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53/zoneassociation/zz_controller.go b/internal/controller/route53/zoneassociation/zz_controller.go index 84440444a..83aaed0da 100755 --- a/internal/controller/route53/zoneassociation/zz_controller.go +++ b/internal/controller/route53/zoneassociation/zz_controller.go @@ -21,39 +21,34 @@ package zoneassociation import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/route53/v1alpha2" ) // Setup adds a controller that reconciles ZoneAssociation managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.ZoneAssociation_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.ZoneAssociation_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_zone_association"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_zone_association"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.ZoneAssociation{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/dnssecconfig/zz_controller.go b/internal/controller/route53resolver/dnssecconfig/zz_controller.go index d2f977978..4151528dd 100755 --- a/internal/controller/route53resolver/dnssecconfig/zz_controller.go +++ b/internal/controller/route53resolver/dnssecconfig/zz_controller.go @@ -21,39 +21,34 @@ package dnssecconfig import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles DNSSECConfig managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.DNSSECConfig_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.DNSSECConfig_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_dnssec_config"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_dnssec_config"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.DNSSECConfig{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/endpoint/zz_controller.go b/internal/controller/route53resolver/endpoint/zz_controller.go index f40ce7975..68ca2de61 100755 --- a/internal/controller/route53resolver/endpoint/zz_controller.go +++ b/internal/controller/route53resolver/endpoint/zz_controller.go @@ -21,42 +21,37 @@ package endpoint import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles Endpoint managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.Endpoint_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_route53_resolver_endpoint"].InitializerFns { + for _, i := range o.Provider.Resources["aws_route53_resolver_endpoint"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Endpoint_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_endpoint"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_endpoint"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.Endpoint{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/firewallconfig/zz_controller.go b/internal/controller/route53resolver/firewallconfig/zz_controller.go index 73b9d7253..4f2f002c5 100755 --- a/internal/controller/route53resolver/firewallconfig/zz_controller.go +++ b/internal/controller/route53resolver/firewallconfig/zz_controller.go @@ -21,39 +21,34 @@ package firewallconfig import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles FirewallConfig managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.FirewallConfig_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.FirewallConfig_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_firewall_config"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_firewall_config"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.FirewallConfig{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/firewalldomainlist/zz_controller.go b/internal/controller/route53resolver/firewalldomainlist/zz_controller.go index 6be065db8..ce16f4c03 100755 --- a/internal/controller/route53resolver/firewalldomainlist/zz_controller.go +++ b/internal/controller/route53resolver/firewalldomainlist/zz_controller.go @@ -21,42 +21,37 @@ package firewalldomainlist import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles FirewallDomainList managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.FirewallDomainList_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_route53_resolver_firewall_domain_list"].InitializerFns { + for _, i := range o.Provider.Resources["aws_route53_resolver_firewall_domain_list"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.FirewallDomainList_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_firewall_domain_list"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_firewall_domain_list"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.FirewallDomainList{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/firewallrule/zz_controller.go b/internal/controller/route53resolver/firewallrule/zz_controller.go index 4aa78987d..8aa777417 100755 --- a/internal/controller/route53resolver/firewallrule/zz_controller.go +++ b/internal/controller/route53resolver/firewallrule/zz_controller.go @@ -21,39 +21,34 @@ package firewallrule import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles FirewallRule managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.FirewallRule_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.FirewallRule_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_firewall_rule"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_firewall_rule"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.FirewallRule{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/firewallrulegroup/zz_controller.go b/internal/controller/route53resolver/firewallrulegroup/zz_controller.go index 6e23550c0..b3ad39e86 100755 --- a/internal/controller/route53resolver/firewallrulegroup/zz_controller.go +++ b/internal/controller/route53resolver/firewallrulegroup/zz_controller.go @@ -21,42 +21,37 @@ package firewallrulegroup import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles FirewallRuleGroup managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.FirewallRuleGroup_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_route53_resolver_firewall_rule_group"].InitializerFns { + for _, i := range o.Provider.Resources["aws_route53_resolver_firewall_rule_group"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.FirewallRuleGroup_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_firewall_rule_group"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_firewall_rule_group"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.FirewallRuleGroup{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/firewallrulegroupassociation/zz_controller.go b/internal/controller/route53resolver/firewallrulegroupassociation/zz_controller.go index 2b2f25ae7..c77a8fbce 100755 --- a/internal/controller/route53resolver/firewallrulegroupassociation/zz_controller.go +++ b/internal/controller/route53resolver/firewallrulegroupassociation/zz_controller.go @@ -21,42 +21,37 @@ package firewallrulegroupassociation import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles FirewallRuleGroupAssociation managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.FirewallRuleGroupAssociation_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_route53_resolver_firewall_rule_group_association"].InitializerFns { + for _, i := range o.Provider.Resources["aws_route53_resolver_firewall_rule_group_association"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.FirewallRuleGroupAssociation_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_firewall_rule_group_association"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_firewall_rule_group_association"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.FirewallRuleGroupAssociation{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/querylogconfig/zz_controller.go b/internal/controller/route53resolver/querylogconfig/zz_controller.go index 8b5f68953..817d3c43f 100755 --- a/internal/controller/route53resolver/querylogconfig/zz_controller.go +++ b/internal/controller/route53resolver/querylogconfig/zz_controller.go @@ -21,42 +21,37 @@ package querylogconfig import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles QueryLogConfig managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.QueryLogConfig_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_route53_resolver_query_log_config"].InitializerFns { + for _, i := range o.Provider.Resources["aws_route53_resolver_query_log_config"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.QueryLogConfig_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_query_log_config"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_query_log_config"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.QueryLogConfig{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/querylogconfigassociation/zz_controller.go b/internal/controller/route53resolver/querylogconfigassociation/zz_controller.go index 3630c5678..a1d9e5a6b 100755 --- a/internal/controller/route53resolver/querylogconfigassociation/zz_controller.go +++ b/internal/controller/route53resolver/querylogconfigassociation/zz_controller.go @@ -21,39 +21,34 @@ package querylogconfigassociation import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles QueryLogConfigAssociation managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.QueryLogConfigAssociation_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.QueryLogConfigAssociation_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_query_log_config_association"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_query_log_config_association"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.QueryLogConfigAssociation{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/rule/zz_controller.go b/internal/controller/route53resolver/rule/zz_controller.go index e7939b60a..592abbbbe 100755 --- a/internal/controller/route53resolver/rule/zz_controller.go +++ b/internal/controller/route53resolver/rule/zz_controller.go @@ -21,42 +21,37 @@ package rule import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles Rule managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.Rule_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_route53_resolver_rule"].InitializerFns { + for _, i := range o.Provider.Resources["aws_route53_resolver_rule"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Rule_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_rule"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_rule"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.Rule{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/route53resolver/ruleassociation/zz_controller.go b/internal/controller/route53resolver/ruleassociation/zz_controller.go index 51f1500c9..4519bff8f 100755 --- a/internal/controller/route53resolver/ruleassociation/zz_controller.go +++ b/internal/controller/route53resolver/ruleassociation/zz_controller.go @@ -21,39 +21,34 @@ package ruleassociation import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/crossplane-contrib/provider-jet-aws/apis/route53resolver/v1alpha1" ) // Setup adds a controller that reconciles RuleAssociation managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha1.RuleAssociation_GroupVersionKind.String()) var initializers managed.InitializerChain r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.RuleAssociation_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_route53_resolver_rule_association"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_route53_resolver_rule_association"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha1.RuleAssociation{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/s3/bucket/zz_controller.go b/internal/controller/s3/bucket/zz_controller.go index 99b400667..ab5548d34 100755 --- a/internal/controller/s3/bucket/zz_controller.go +++ b/internal/controller/s3/bucket/zz_controller.go @@ -21,43 +21,38 @@ package bucket import ( "time" - "k8s.io/client-go/util/workqueue" - ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/logging" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - "sigs.k8s.io/controller-runtime/pkg/controller" - - tjconfig "github.com/crossplane/terrajet/pkg/config" tjcontroller "github.com/crossplane/terrajet/pkg/controller" "github.com/crossplane/terrajet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" v1alpha2 "github.com/crossplane-contrib/provider-jet-aws/apis/s3/v1alpha2" ) // Setup adds a controller that reconciles Bucket managed resources. -func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, s terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { name := managed.ControllerName(v1alpha2.Bucket_GroupVersionKind.String()) var initializers managed.InitializerChain - for _, i := range cfg.Resources["aws_s3_bucket"].InitializerFns { + for _, i := range o.Provider.Resources["aws_s3_bucket"].InitializerFns { initializers = append(initializers, i(mgr.GetClient())) } initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha2.Bucket_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), ws, s, cfg.Resources["aws_s3_bucket"])), - managed.WithLogger(l.WithValues("controller", name)), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_s3_bucket"])), + managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithFinalizer(terraform.NewWorkspaceFinalizer(ws, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), managed.WithTimeout(3*time.Minute), managed.WithInitializers(initializers), ) return ctrl.NewControllerManagedBy(mgr). Named(name). - WithOptions(controller.Options{RateLimiter: rl, MaxConcurrentReconciles: concurrency}). + WithOptions(o.ForControllerRuntime()). For(&v1alpha2.Bucket{}). - Complete(r) + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 60c3882f2..25a55e985 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -17,13 +17,9 @@ limitations under the License. package controller import ( - "k8s.io/client-go/util/workqueue" ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/crossplane-runtime/pkg/logging" - - tjconfig "github.com/crossplane/terrajet/pkg/config" - "github.com/crossplane/terrajet/pkg/terraform" + "github.com/crossplane/terrajet/pkg/controller" attachment "github.com/crossplane-contrib/provider-jet-aws/internal/controller/autoscaling/attachment" autoscalinggroup "github.com/crossplane-contrib/provider-jet-aws/internal/controller/autoscaling/autoscalinggroup" @@ -117,8 +113,8 @@ import ( // Setup creates all controllers with the supplied logger and adds them to // the supplied manager. -func Setup(mgr ctrl.Manager, l logging.Logger, wl workqueue.RateLimiter, ps terraform.SetupFn, ws *terraform.WorkspaceStore, cfg *tjconfig.Provider, concurrency int) error { - for _, setup := range []func(ctrl.Manager, logging.Logger, workqueue.RateLimiter, terraform.SetupFn, *terraform.WorkspaceStore, *tjconfig.Provider, int) error{ +func Setup(mgr ctrl.Manager, o controller.Options) error { + for _, setup := range []func(ctrl.Manager, controller.Options) error{ attachment.Setup, autoscalinggroup.Setup, ebsvolume.Setup, @@ -208,7 +204,7 @@ func Setup(mgr ctrl.Manager, l logging.Logger, wl workqueue.RateLimiter, ps terr ruleassociation.Setup, bucket.Setup, } { - if err := setup(mgr, l, wl, ps, ws, cfg, concurrency); err != nil { + if err := setup(mgr, o); err != nil { return err } } diff --git a/package/crds/autoscaling.aws.jet.crossplane.io_attachments.yaml b/package/crds/autoscaling.aws.jet.crossplane.io_attachments.yaml index df118f482..39244388b 100644 --- a/package/crds/autoscaling.aws.jet.crossplane.io_attachments.yaml +++ b/package/crds/autoscaling.aws.jet.crossplane.io_attachments.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: attachments.autoscaling.aws.jet.crossplane.io spec: diff --git a/package/crds/autoscaling.aws.jet.crossplane.io_autoscalinggroups.yaml b/package/crds/autoscaling.aws.jet.crossplane.io_autoscalinggroups.yaml index b573ff8de..7eddea1f1 100644 --- a/package/crds/autoscaling.aws.jet.crossplane.io_autoscalinggroups.yaml +++ b/package/crds/autoscaling.aws.jet.crossplane.io_autoscalinggroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: autoscalinggroups.autoscaling.aws.jet.crossplane.io spec: diff --git a/package/crds/aws.jet.crossplane.io_providerconfigs.yaml b/package/crds/aws.jet.crossplane.io_providerconfigs.yaml index 073b6e700..d4c1ae5d6 100644 --- a/package/crds/aws.jet.crossplane.io_providerconfigs.yaml +++ b/package/crds/aws.jet.crossplane.io_providerconfigs.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: providerconfigs.aws.jet.crossplane.io spec: diff --git a/package/crds/aws.jet.crossplane.io_providerconfigusages.yaml b/package/crds/aws.jet.crossplane.io_providerconfigusages.yaml index 0aab6c2db..f49198336 100644 --- a/package/crds/aws.jet.crossplane.io_providerconfigusages.yaml +++ b/package/crds/aws.jet.crossplane.io_providerconfigusages.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: providerconfigusages.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_ebsvolumes.yaml b/package/crds/ec2.aws.jet.crossplane.io_ebsvolumes.yaml index e12c8573c..29dd43d80 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_ebsvolumes.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_ebsvolumes.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: ebsvolumes.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_eips.yaml b/package/crds/ec2.aws.jet.crossplane.io_eips.yaml index e1a71ef48..e1fb64438 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_eips.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_eips.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: eips.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_instances.yaml b/package/crds/ec2.aws.jet.crossplane.io_instances.yaml index 87f065024..230124099 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_instances.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_instances.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: instances.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_launchtemplates.yaml b/package/crds/ec2.aws.jet.crossplane.io_launchtemplates.yaml index ef57946b8..0a425160b 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_launchtemplates.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_launchtemplates.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: launchtemplates.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_networkinterfaces.yaml b/package/crds/ec2.aws.jet.crossplane.io_networkinterfaces.yaml index 414b3764d..7a9cd1e7a 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_networkinterfaces.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_networkinterfaces.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: networkinterfaces.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_routes.yaml b/package/crds/ec2.aws.jet.crossplane.io_routes.yaml index 33d90b438..5203981d0 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_routes.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_routes.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: routes.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_routetableassociations.yaml b/package/crds/ec2.aws.jet.crossplane.io_routetableassociations.yaml index b462629b2..7b837b57b 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_routetableassociations.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_routetableassociations.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: routetableassociations.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_routetables.yaml b/package/crds/ec2.aws.jet.crossplane.io_routetables.yaml index 7f892599c..cea250020 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_routetables.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_routetables.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: routetables.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_securitygrouprules.yaml b/package/crds/ec2.aws.jet.crossplane.io_securitygrouprules.yaml index eeac4bc34..da699f1f2 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_securitygrouprules.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_securitygrouprules.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: securitygrouprules.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_securitygroups.yaml b/package/crds/ec2.aws.jet.crossplane.io_securitygroups.yaml index 81cb6b26b..16eed6595 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_securitygroups.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_securitygroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: securitygroups.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_subnets.yaml b/package/crds/ec2.aws.jet.crossplane.io_subnets.yaml index 070fc7466..87a8cf659 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_subnets.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_subnets.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: subnets.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutes.yaml b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutes.yaml index 33ab6d3f9..f00f1b75f 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutes.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutes.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: transitgatewayroutes.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetableassociations.yaml b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetableassociations.yaml index 79d733477..469107534 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetableassociations.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetableassociations.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: transitgatewayroutetableassociations.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetablepropagations.yaml b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetablepropagations.yaml index f4436b93c..75614fd74 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetablepropagations.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetablepropagations.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: transitgatewayroutetablepropagations.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetables.yaml b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetables.yaml index d73ed01b9..9f1fa9c6e 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetables.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayroutetables.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: transitgatewayroutetables.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_transitgateways.yaml b/package/crds/ec2.aws.jet.crossplane.io_transitgateways.yaml index 3fb1619b3..1bc25a4a4 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_transitgateways.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_transitgateways.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: transitgateways.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayvpcattachmentaccepters.yaml b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayvpcattachmentaccepters.yaml index bca652c05..3fe0d85ef 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayvpcattachmentaccepters.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayvpcattachmentaccepters.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: transitgatewayvpcattachmentaccepters.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayvpcattachments.yaml b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayvpcattachments.yaml index af87534d9..c9edd7d52 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_transitgatewayvpcattachments.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_transitgatewayvpcattachments.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: transitgatewayvpcattachments.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_vpcendpoints.yaml b/package/crds/ec2.aws.jet.crossplane.io_vpcendpoints.yaml index 01009c4a5..78cb63c49 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_vpcendpoints.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_vpcendpoints.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: vpcendpoints.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_vpcipv4cidrblockassociations.yaml b/package/crds/ec2.aws.jet.crossplane.io_vpcipv4cidrblockassociations.yaml index 6c6537058..0bc36219c 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_vpcipv4cidrblockassociations.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_vpcipv4cidrblockassociations.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: vpcipv4cidrblockassociations.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_vpcpeeringconnections.yaml b/package/crds/ec2.aws.jet.crossplane.io_vpcpeeringconnections.yaml index 5a922ce66..5a572081e 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_vpcpeeringconnections.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_vpcpeeringconnections.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: vpcpeeringconnections.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ec2.aws.jet.crossplane.io_vpcs.yaml b/package/crds/ec2.aws.jet.crossplane.io_vpcs.yaml index a3eeebcd3..f36e81de8 100644 --- a/package/crds/ec2.aws.jet.crossplane.io_vpcs.yaml +++ b/package/crds/ec2.aws.jet.crossplane.io_vpcs.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: vpcs.ec2.aws.jet.crossplane.io spec: diff --git a/package/crds/ecr.aws.jet.crossplane.io_repositories.yaml b/package/crds/ecr.aws.jet.crossplane.io_repositories.yaml index d12f7af06..ba65e6a44 100644 --- a/package/crds/ecr.aws.jet.crossplane.io_repositories.yaml +++ b/package/crds/ecr.aws.jet.crossplane.io_repositories.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: repositories.ecr.aws.jet.crossplane.io spec: diff --git a/package/crds/ecrpublic.aws.jet.crossplane.io_repositories.yaml b/package/crds/ecrpublic.aws.jet.crossplane.io_repositories.yaml index a5e9660ea..724a58ef2 100644 --- a/package/crds/ecrpublic.aws.jet.crossplane.io_repositories.yaml +++ b/package/crds/ecrpublic.aws.jet.crossplane.io_repositories.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: repositories.ecrpublic.aws.jet.crossplane.io spec: diff --git a/package/crds/ecs.aws.jet.crossplane.io_capacityproviders.yaml b/package/crds/ecs.aws.jet.crossplane.io_capacityproviders.yaml index 92ef33937..11fecbdb6 100644 --- a/package/crds/ecs.aws.jet.crossplane.io_capacityproviders.yaml +++ b/package/crds/ecs.aws.jet.crossplane.io_capacityproviders.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: capacityproviders.ecs.aws.jet.crossplane.io spec: diff --git a/package/crds/ecs.aws.jet.crossplane.io_clusters.yaml b/package/crds/ecs.aws.jet.crossplane.io_clusters.yaml index 8e49b10ea..e98f17020 100644 --- a/package/crds/ecs.aws.jet.crossplane.io_clusters.yaml +++ b/package/crds/ecs.aws.jet.crossplane.io_clusters.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clusters.ecs.aws.jet.crossplane.io spec: diff --git a/package/crds/ecs.aws.jet.crossplane.io_services.yaml b/package/crds/ecs.aws.jet.crossplane.io_services.yaml index 5a340e297..266f030c7 100644 --- a/package/crds/ecs.aws.jet.crossplane.io_services.yaml +++ b/package/crds/ecs.aws.jet.crossplane.io_services.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: services.ecs.aws.jet.crossplane.io spec: diff --git a/package/crds/ecs.aws.jet.crossplane.io_taskdefinitions.yaml b/package/crds/ecs.aws.jet.crossplane.io_taskdefinitions.yaml index 255501ce5..f9a9b9b7d 100644 --- a/package/crds/ecs.aws.jet.crossplane.io_taskdefinitions.yaml +++ b/package/crds/ecs.aws.jet.crossplane.io_taskdefinitions.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: taskdefinitions.ecs.aws.jet.crossplane.io spec: diff --git a/package/crds/eks.aws.jet.crossplane.io_addons.yaml b/package/crds/eks.aws.jet.crossplane.io_addons.yaml index ba323754a..d9d637dbe 100644 --- a/package/crds/eks.aws.jet.crossplane.io_addons.yaml +++ b/package/crds/eks.aws.jet.crossplane.io_addons.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: addons.eks.aws.jet.crossplane.io spec: diff --git a/package/crds/eks.aws.jet.crossplane.io_clusters.yaml b/package/crds/eks.aws.jet.crossplane.io_clusters.yaml index 7f5e4edd9..265c96b84 100644 --- a/package/crds/eks.aws.jet.crossplane.io_clusters.yaml +++ b/package/crds/eks.aws.jet.crossplane.io_clusters.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clusters.eks.aws.jet.crossplane.io spec: diff --git a/package/crds/eks.aws.jet.crossplane.io_fargateprofiles.yaml b/package/crds/eks.aws.jet.crossplane.io_fargateprofiles.yaml index 54a35a9e6..e1f205395 100644 --- a/package/crds/eks.aws.jet.crossplane.io_fargateprofiles.yaml +++ b/package/crds/eks.aws.jet.crossplane.io_fargateprofiles.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: fargateprofiles.eks.aws.jet.crossplane.io spec: diff --git a/package/crds/eks.aws.jet.crossplane.io_identityproviderconfigs.yaml b/package/crds/eks.aws.jet.crossplane.io_identityproviderconfigs.yaml index c4a10b1d9..447967542 100644 --- a/package/crds/eks.aws.jet.crossplane.io_identityproviderconfigs.yaml +++ b/package/crds/eks.aws.jet.crossplane.io_identityproviderconfigs.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: identityproviderconfigs.eks.aws.jet.crossplane.io spec: diff --git a/package/crds/eks.aws.jet.crossplane.io_nodegroups.yaml b/package/crds/eks.aws.jet.crossplane.io_nodegroups.yaml index 55dc53f79..d7f7b31e8 100644 --- a/package/crds/eks.aws.jet.crossplane.io_nodegroups.yaml +++ b/package/crds/eks.aws.jet.crossplane.io_nodegroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: nodegroups.eks.aws.jet.crossplane.io spec: diff --git a/package/crds/elasticache.aws.jet.crossplane.io_clusters.yaml b/package/crds/elasticache.aws.jet.crossplane.io_clusters.yaml index e6054f5bc..684b41531 100644 --- a/package/crds/elasticache.aws.jet.crossplane.io_clusters.yaml +++ b/package/crds/elasticache.aws.jet.crossplane.io_clusters.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clusters.elasticache.aws.jet.crossplane.io spec: diff --git a/package/crds/elasticache.aws.jet.crossplane.io_parametergroups.yaml b/package/crds/elasticache.aws.jet.crossplane.io_parametergroups.yaml index eaac5f3d3..5bb29d41d 100644 --- a/package/crds/elasticache.aws.jet.crossplane.io_parametergroups.yaml +++ b/package/crds/elasticache.aws.jet.crossplane.io_parametergroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: parametergroups.elasticache.aws.jet.crossplane.io spec: diff --git a/package/crds/elasticache.aws.jet.crossplane.io_replicationgroups.yaml b/package/crds/elasticache.aws.jet.crossplane.io_replicationgroups.yaml index 5498d0eb0..b2a653732 100644 --- a/package/crds/elasticache.aws.jet.crossplane.io_replicationgroups.yaml +++ b/package/crds/elasticache.aws.jet.crossplane.io_replicationgroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: replicationgroups.elasticache.aws.jet.crossplane.io spec: diff --git a/package/crds/elasticache.aws.jet.crossplane.io_usergroups.yaml b/package/crds/elasticache.aws.jet.crossplane.io_usergroups.yaml index cd064dfca..a8192d224 100644 --- a/package/crds/elasticache.aws.jet.crossplane.io_usergroups.yaml +++ b/package/crds/elasticache.aws.jet.crossplane.io_usergroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: usergroups.elasticache.aws.jet.crossplane.io spec: diff --git a/package/crds/elasticache.aws.jet.crossplane.io_users.yaml b/package/crds/elasticache.aws.jet.crossplane.io_users.yaml index 2bbbb1a21..2d4f3a357 100644 --- a/package/crds/elasticache.aws.jet.crossplane.io_users.yaml +++ b/package/crds/elasticache.aws.jet.crossplane.io_users.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: users.elasticache.aws.jet.crossplane.io spec: diff --git a/package/crds/elbv2.aws.jet.crossplane.io_lblisteners.yaml b/package/crds/elbv2.aws.jet.crossplane.io_lblisteners.yaml index 32137f7ab..39eba0237 100644 --- a/package/crds/elbv2.aws.jet.crossplane.io_lblisteners.yaml +++ b/package/crds/elbv2.aws.jet.crossplane.io_lblisteners.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: lblisteners.elbv2.aws.jet.crossplane.io spec: diff --git a/package/crds/elbv2.aws.jet.crossplane.io_lbs.yaml b/package/crds/elbv2.aws.jet.crossplane.io_lbs.yaml index e7fbe0588..2a27c91f0 100644 --- a/package/crds/elbv2.aws.jet.crossplane.io_lbs.yaml +++ b/package/crds/elbv2.aws.jet.crossplane.io_lbs.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: lbs.elbv2.aws.jet.crossplane.io spec: diff --git a/package/crds/elbv2.aws.jet.crossplane.io_lbtargetgroupattachments.yaml b/package/crds/elbv2.aws.jet.crossplane.io_lbtargetgroupattachments.yaml index 6264f7cb6..02b3ee963 100644 --- a/package/crds/elbv2.aws.jet.crossplane.io_lbtargetgroupattachments.yaml +++ b/package/crds/elbv2.aws.jet.crossplane.io_lbtargetgroupattachments.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: lbtargetgroupattachments.elbv2.aws.jet.crossplane.io spec: diff --git a/package/crds/elbv2.aws.jet.crossplane.io_lbtargetgroups.yaml b/package/crds/elbv2.aws.jet.crossplane.io_lbtargetgroups.yaml index 7d57e7e61..8a3eee933 100644 --- a/package/crds/elbv2.aws.jet.crossplane.io_lbtargetgroups.yaml +++ b/package/crds/elbv2.aws.jet.crossplane.io_lbtargetgroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: lbtargetgroups.elbv2.aws.jet.crossplane.io spec: diff --git a/package/crds/iam.aws.jet.crossplane.io_accesskeys.yaml b/package/crds/iam.aws.jet.crossplane.io_accesskeys.yaml index 0357917f6..9e23cee48 100644 --- a/package/crds/iam.aws.jet.crossplane.io_accesskeys.yaml +++ b/package/crds/iam.aws.jet.crossplane.io_accesskeys.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: accesskeys.iam.aws.jet.crossplane.io spec: diff --git a/package/crds/iam.aws.jet.crossplane.io_grouppolicyattachments.yaml b/package/crds/iam.aws.jet.crossplane.io_grouppolicyattachments.yaml index 1f8a589aa..6b819496c 100644 --- a/package/crds/iam.aws.jet.crossplane.io_grouppolicyattachments.yaml +++ b/package/crds/iam.aws.jet.crossplane.io_grouppolicyattachments.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: grouppolicyattachments.iam.aws.jet.crossplane.io spec: diff --git a/package/crds/iam.aws.jet.crossplane.io_groups.yaml b/package/crds/iam.aws.jet.crossplane.io_groups.yaml index b7960e204..899702723 100644 --- a/package/crds/iam.aws.jet.crossplane.io_groups.yaml +++ b/package/crds/iam.aws.jet.crossplane.io_groups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: groups.iam.aws.jet.crossplane.io spec: diff --git a/package/crds/iam.aws.jet.crossplane.io_instanceprofiles.yaml b/package/crds/iam.aws.jet.crossplane.io_instanceprofiles.yaml index d1d9d10cb..5caa97a5e 100644 --- a/package/crds/iam.aws.jet.crossplane.io_instanceprofiles.yaml +++ b/package/crds/iam.aws.jet.crossplane.io_instanceprofiles.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: instanceprofiles.iam.aws.jet.crossplane.io spec: diff --git a/package/crds/iam.aws.jet.crossplane.io_policies.yaml b/package/crds/iam.aws.jet.crossplane.io_policies.yaml index fb5f44e52..a1cb81905 100644 --- a/package/crds/iam.aws.jet.crossplane.io_policies.yaml +++ b/package/crds/iam.aws.jet.crossplane.io_policies.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: policies.iam.aws.jet.crossplane.io spec: diff --git a/package/crds/iam.aws.jet.crossplane.io_rolepolicyattachments.yaml b/package/crds/iam.aws.jet.crossplane.io_rolepolicyattachments.yaml index 030d67f82..6b9fc459d 100644 --- a/package/crds/iam.aws.jet.crossplane.io_rolepolicyattachments.yaml +++ b/package/crds/iam.aws.jet.crossplane.io_rolepolicyattachments.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: rolepolicyattachments.iam.aws.jet.crossplane.io spec: diff --git a/package/crds/iam.aws.jet.crossplane.io_roles.yaml b/package/crds/iam.aws.jet.crossplane.io_roles.yaml index 01b7f8e31..8b0d61ce5 100644 --- a/package/crds/iam.aws.jet.crossplane.io_roles.yaml +++ b/package/crds/iam.aws.jet.crossplane.io_roles.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: roles.iam.aws.jet.crossplane.io spec: diff --git a/package/crds/iam.aws.jet.crossplane.io_usergroupmemberships.yaml b/package/crds/iam.aws.jet.crossplane.io_usergroupmemberships.yaml index 152b30654..9a68ba1ad 100644 --- a/package/crds/iam.aws.jet.crossplane.io_usergroupmemberships.yaml +++ b/package/crds/iam.aws.jet.crossplane.io_usergroupmemberships.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: usergroupmemberships.iam.aws.jet.crossplane.io spec: diff --git a/package/crds/iam.aws.jet.crossplane.io_userpolicyattachments.yaml b/package/crds/iam.aws.jet.crossplane.io_userpolicyattachments.yaml index ec0be7e69..009a1c849 100644 --- a/package/crds/iam.aws.jet.crossplane.io_userpolicyattachments.yaml +++ b/package/crds/iam.aws.jet.crossplane.io_userpolicyattachments.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: userpolicyattachments.iam.aws.jet.crossplane.io spec: diff --git a/package/crds/iam.aws.jet.crossplane.io_users.yaml b/package/crds/iam.aws.jet.crossplane.io_users.yaml index 1a44af7ae..e10806c85 100644 --- a/package/crds/iam.aws.jet.crossplane.io_users.yaml +++ b/package/crds/iam.aws.jet.crossplane.io_users.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: users.iam.aws.jet.crossplane.io spec: diff --git a/package/crds/kms.aws.jet.crossplane.io_keys.yaml b/package/crds/kms.aws.jet.crossplane.io_keys.yaml index b428be2b2..4a9fdc91d 100644 --- a/package/crds/kms.aws.jet.crossplane.io_keys.yaml +++ b/package/crds/kms.aws.jet.crossplane.io_keys.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: keys.kms.aws.jet.crossplane.io spec: diff --git a/package/crds/neptune.aws.jet.crossplane.io_clusterendpoints.yaml b/package/crds/neptune.aws.jet.crossplane.io_clusterendpoints.yaml index 022b3f631..67890fa51 100644 --- a/package/crds/neptune.aws.jet.crossplane.io_clusterendpoints.yaml +++ b/package/crds/neptune.aws.jet.crossplane.io_clusterendpoints.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clusterendpoints.neptune.aws.jet.crossplane.io spec: diff --git a/package/crds/neptune.aws.jet.crossplane.io_clusterinstances.yaml b/package/crds/neptune.aws.jet.crossplane.io_clusterinstances.yaml index fc8d89e29..952c80c45 100644 --- a/package/crds/neptune.aws.jet.crossplane.io_clusterinstances.yaml +++ b/package/crds/neptune.aws.jet.crossplane.io_clusterinstances.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clusterinstances.neptune.aws.jet.crossplane.io spec: diff --git a/package/crds/neptune.aws.jet.crossplane.io_clusterparametergroups.yaml b/package/crds/neptune.aws.jet.crossplane.io_clusterparametergroups.yaml index 6ed3308db..141415aa7 100644 --- a/package/crds/neptune.aws.jet.crossplane.io_clusterparametergroups.yaml +++ b/package/crds/neptune.aws.jet.crossplane.io_clusterparametergroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clusterparametergroups.neptune.aws.jet.crossplane.io spec: diff --git a/package/crds/neptune.aws.jet.crossplane.io_clusters.yaml b/package/crds/neptune.aws.jet.crossplane.io_clusters.yaml index bcde4d698..0ac4a4869 100644 --- a/package/crds/neptune.aws.jet.crossplane.io_clusters.yaml +++ b/package/crds/neptune.aws.jet.crossplane.io_clusters.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clusters.neptune.aws.jet.crossplane.io spec: diff --git a/package/crds/neptune.aws.jet.crossplane.io_clustersnapshots.yaml b/package/crds/neptune.aws.jet.crossplane.io_clustersnapshots.yaml index 89fa11bbf..43c061b19 100644 --- a/package/crds/neptune.aws.jet.crossplane.io_clustersnapshots.yaml +++ b/package/crds/neptune.aws.jet.crossplane.io_clustersnapshots.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clustersnapshots.neptune.aws.jet.crossplane.io spec: diff --git a/package/crds/neptune.aws.jet.crossplane.io_eventsubscriptions.yaml b/package/crds/neptune.aws.jet.crossplane.io_eventsubscriptions.yaml index 64733e81c..469219d63 100644 --- a/package/crds/neptune.aws.jet.crossplane.io_eventsubscriptions.yaml +++ b/package/crds/neptune.aws.jet.crossplane.io_eventsubscriptions.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: eventsubscriptions.neptune.aws.jet.crossplane.io spec: diff --git a/package/crds/neptune.aws.jet.crossplane.io_parametergroups.yaml b/package/crds/neptune.aws.jet.crossplane.io_parametergroups.yaml index 99bd5b2b6..d5a225538 100644 --- a/package/crds/neptune.aws.jet.crossplane.io_parametergroups.yaml +++ b/package/crds/neptune.aws.jet.crossplane.io_parametergroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: parametergroups.neptune.aws.jet.crossplane.io spec: diff --git a/package/crds/neptune.aws.jet.crossplane.io_subnetgroups.yaml b/package/crds/neptune.aws.jet.crossplane.io_subnetgroups.yaml index 69ebfb806..74e5d1992 100644 --- a/package/crds/neptune.aws.jet.crossplane.io_subnetgroups.yaml +++ b/package/crds/neptune.aws.jet.crossplane.io_subnetgroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: subnetgroups.neptune.aws.jet.crossplane.io spec: diff --git a/package/crds/rds.aws.jet.crossplane.io_clusters.yaml b/package/crds/rds.aws.jet.crossplane.io_clusters.yaml index f993cd575..1ad64cb87 100644 --- a/package/crds/rds.aws.jet.crossplane.io_clusters.yaml +++ b/package/crds/rds.aws.jet.crossplane.io_clusters.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clusters.rds.aws.jet.crossplane.io spec: diff --git a/package/crds/rds.aws.jet.crossplane.io_instances.yaml b/package/crds/rds.aws.jet.crossplane.io_instances.yaml index 18759cfea..73b8bde43 100644 --- a/package/crds/rds.aws.jet.crossplane.io_instances.yaml +++ b/package/crds/rds.aws.jet.crossplane.io_instances.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: instances.rds.aws.jet.crossplane.io spec: diff --git a/package/crds/rds.aws.jet.crossplane.io_parametergroups.yaml b/package/crds/rds.aws.jet.crossplane.io_parametergroups.yaml index ac6a03a0c..2db73875f 100644 --- a/package/crds/rds.aws.jet.crossplane.io_parametergroups.yaml +++ b/package/crds/rds.aws.jet.crossplane.io_parametergroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: parametergroups.rds.aws.jet.crossplane.io spec: diff --git a/package/crds/route53.aws.jet.crossplane.io_delegationsets.yaml b/package/crds/route53.aws.jet.crossplane.io_delegationsets.yaml index 51b50d421..1e80e26f7 100644 --- a/package/crds/route53.aws.jet.crossplane.io_delegationsets.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_delegationsets.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: delegationsets.route53.aws.jet.crossplane.io spec: diff --git a/package/crds/route53.aws.jet.crossplane.io_healthchecks.yaml b/package/crds/route53.aws.jet.crossplane.io_healthchecks.yaml index 076eb36c8..64a6adddb 100644 --- a/package/crds/route53.aws.jet.crossplane.io_healthchecks.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_healthchecks.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: healthchecks.route53.aws.jet.crossplane.io spec: diff --git a/package/crds/route53.aws.jet.crossplane.io_hostedzonednssecs.yaml b/package/crds/route53.aws.jet.crossplane.io_hostedzonednssecs.yaml index b8e6e35c4..42d36cde7 100644 --- a/package/crds/route53.aws.jet.crossplane.io_hostedzonednssecs.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_hostedzonednssecs.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: hostedzonednssecs.route53.aws.jet.crossplane.io spec: diff --git a/package/crds/route53.aws.jet.crossplane.io_keysigningkeys.yaml b/package/crds/route53.aws.jet.crossplane.io_keysigningkeys.yaml index 19ff721d7..2a3a5d1d6 100644 --- a/package/crds/route53.aws.jet.crossplane.io_keysigningkeys.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_keysigningkeys.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: keysigningkeys.route53.aws.jet.crossplane.io spec: diff --git a/package/crds/route53.aws.jet.crossplane.io_querylogs.yaml b/package/crds/route53.aws.jet.crossplane.io_querylogs.yaml index eb673bebb..1b12bbc2c 100644 --- a/package/crds/route53.aws.jet.crossplane.io_querylogs.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_querylogs.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: querylogs.route53.aws.jet.crossplane.io spec: diff --git a/package/crds/route53.aws.jet.crossplane.io_records.yaml b/package/crds/route53.aws.jet.crossplane.io_records.yaml index bd78aebc7..071abc89b 100644 --- a/package/crds/route53.aws.jet.crossplane.io_records.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_records.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: records.route53.aws.jet.crossplane.io spec: diff --git a/package/crds/route53.aws.jet.crossplane.io_vpcassociationauthorizations.yaml b/package/crds/route53.aws.jet.crossplane.io_vpcassociationauthorizations.yaml index cbcf83cad..681858b64 100644 --- a/package/crds/route53.aws.jet.crossplane.io_vpcassociationauthorizations.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_vpcassociationauthorizations.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: vpcassociationauthorizations.route53.aws.jet.crossplane.io spec: diff --git a/package/crds/route53.aws.jet.crossplane.io_zoneassociations.yaml b/package/crds/route53.aws.jet.crossplane.io_zoneassociations.yaml index ac0cdf67e..3e63c237c 100644 --- a/package/crds/route53.aws.jet.crossplane.io_zoneassociations.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_zoneassociations.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: zoneassociations.route53.aws.jet.crossplane.io spec: diff --git a/package/crds/route53.aws.jet.crossplane.io_zones.yaml b/package/crds/route53.aws.jet.crossplane.io_zones.yaml index c5dd5ff12..1747a883e 100644 --- a/package/crds/route53.aws.jet.crossplane.io_zones.yaml +++ b/package/crds/route53.aws.jet.crossplane.io_zones.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: zones.route53.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_dnssecconfigs.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_dnssecconfigs.yaml index 0ab9dafcf..3d41b6f84 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_dnssecconfigs.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_dnssecconfigs.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: dnssecconfigs.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_endpoints.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_endpoints.yaml index 4482062b8..9c068aa27 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_endpoints.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_endpoints.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: endpoints.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_firewallconfigs.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_firewallconfigs.yaml index a79486568..83cf04902 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_firewallconfigs.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_firewallconfigs.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: firewallconfigs.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_firewalldomainlists.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_firewalldomainlists.yaml index f1874d5db..f6e37e354 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_firewalldomainlists.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_firewalldomainlists.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: firewalldomainlists.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_firewallrulegroupassociations.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_firewallrulegroupassociations.yaml index cc770475d..97a5a2249 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_firewallrulegroupassociations.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_firewallrulegroupassociations.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: firewallrulegroupassociations.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_firewallrulegroups.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_firewallrulegroups.yaml index d586e9ea1..7ad2cc0e8 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_firewallrulegroups.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_firewallrulegroups.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: firewallrulegroups.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_firewallrules.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_firewallrules.yaml index 8ceb9add6..59409a74c 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_firewallrules.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_firewallrules.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: firewallrules.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_querylogconfigassociations.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_querylogconfigassociations.yaml index 6cb8413e9..912d3ce09 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_querylogconfigassociations.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_querylogconfigassociations.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: querylogconfigassociations.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_querylogconfigs.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_querylogconfigs.yaml index e43b6e524..159ed19f1 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_querylogconfigs.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_querylogconfigs.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: querylogconfigs.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_ruleassociations.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_ruleassociations.yaml index 2ba86ff70..8651e6b9c 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_ruleassociations.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_ruleassociations.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: ruleassociations.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/route53resolver.aws.jet.crossplane.io_rules.yaml b/package/crds/route53resolver.aws.jet.crossplane.io_rules.yaml index e964c686f..5d15ab6ac 100644 --- a/package/crds/route53resolver.aws.jet.crossplane.io_rules.yaml +++ b/package/crds/route53resolver.aws.jet.crossplane.io_rules.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: rules.route53resolver.aws.jet.crossplane.io spec: diff --git a/package/crds/s3.aws.jet.crossplane.io_buckets.yaml b/package/crds/s3.aws.jet.crossplane.io_buckets.yaml index 6dc3c41ba..c6b681050 100644 --- a/package/crds/s3.aws.jet.crossplane.io_buckets.yaml +++ b/package/crds/s3.aws.jet.crossplane.io_buckets.yaml @@ -1,8 +1,9 @@ +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.2 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: buckets.s3.aws.jet.crossplane.io spec: