Skip to content

Commit

Permalink
move cloud library into pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
enxebre committed Oct 16, 2018
1 parent 5a149c6 commit 32adb86
Show file tree
Hide file tree
Showing 28 changed files with 33 additions and 34 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ test: generate-mocks unit
gendeepcopy:
go build -o $$GOPATH/bin/deepcopy-gen sigs.k8s.io/cluster-api-provider-aws/vendor/k8s.io/code-generator/cmd/deepcopy-gen
deepcopy-gen \
-i ./cloud/aws/providerconfig,./cloud/aws/providerconfig/v1alpha1 \
-i ./pkg/cloud/aws/providerconfig,./pkg/cloud/aws/providerconfig/v1alpha1 \
-O zz_generated.deepcopy \
-h boilerplate.go.txt

.PHONY: generate-mocks
generate-mocks:
go build -o $$GOPATH/bin/mockgen sigs.k8s.io/cluster-api-provider-aws/vendor/github.com/golang/mock/mockgen/
go generate ./cloud/aws/client/
go generate ./pkg/cloud/aws/client/

bin:
@mkdir $@
Expand All @@ -85,7 +85,7 @@ check: fmt vet lint test ## Check your code

.PHONY: unit
unit: # Run unit test
$(DOCKER_CMD) go test -race -cover ./cmd/... ./cloud/...
$(DOCKER_CMD) go test -race -cover ./cmd/... ./pkg/cloud/...

.PHONY: integration
integration: ## Run integration test
Expand Down
4 changes: 2 additions & 2 deletions cmd/aws-actuator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"

awsclient "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"

"github.com/ghodss/yaml"
Expand All @@ -45,7 +45,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes"
kubernetesfake "k8s.io/client-go/kubernetes/fake"
machineactuator "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/actuators/machine"
machineactuator "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/actuators/machine"
"sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset"

"text/template"
Expand Down
4 changes: 2 additions & 2 deletions cmd/cluster-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"k8s.io/apiserver/pkg/util/logs"
"sigs.k8s.io/cluster-api/pkg/controller/config"

"sigs.k8s.io/cluster-api-provider-aws/cloud/aws/controllers/cluster"
"sigs.k8s.io/cluster-api-provider-aws/cloud/aws/controllers/cluster/options"
"sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/controllers/cluster"
"sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/controllers/cluster/options"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/machine-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"github.com/spf13/pflag"
"k8s.io/apiserver/pkg/util/logs"
"k8s.io/client-go/kubernetes"
machineactuator "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/actuators/machine"
awsclient "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
machineactuator "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/actuators/machine"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
"sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset"
"sigs.k8s.io/cluster-api/pkg/controller/config"
"sigs.k8s.io/cluster-api/pkg/controller/machine"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"

providerconfigv1 "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/providerconfig/v1alpha1"
providerconfigv1 "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/providerconfig/v1alpha1"
clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"
clusterclient "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset"
clustererror "sigs.k8s.io/cluster-api/pkg/controller/error"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"

awsclient "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
clustoplog "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/logging"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
clustoplog "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/logging"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,16 @@ import (

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
awsclient "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
mockaws "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client/mock"
providerconfigv1 "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/providerconfig/v1alpha1"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
mockaws "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client/mock"
providerconfigv1 "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/providerconfig/v1alpha1"
clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"

"sigs.k8s.io/cluster-api-provider-aws/test/utils"
)

const (
controllerLogName = "awsMachine"
defaultLogLevel = "info"

defaultNamespace = "default"
defaultAvailabilityZone = "us-east-1a"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
jsonserializer "k8s.io/apimachinery/pkg/runtime/serializer/json"

awsclient "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
providerconfigv1 "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/providerconfig/v1alpha1"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
providerconfigv1 "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/providerconfig/v1alpha1"
clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"

"github.com/aws/aws-sdk-go/aws"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/elb"
"k8s.io/client-go/kubernetes"
"sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
"sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
)

type awsClient struct {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import (
"sigs.k8s.io/cluster-api/pkg/controller/config"
"sigs.k8s.io/cluster-api/pkg/controller/sharedinformers"

clusteractuator "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/actuators/cluster"
"sigs.k8s.io/cluster-api-provider-aws/cloud/aws/controllers/cluster/options"
clusteractuator "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/actuators/cluster"
"sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/controllers/cluster/options"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ import (
machinecontroller "sigs.k8s.io/cluster-api/pkg/controller/machine"
"sigs.k8s.io/cluster-api/pkg/controller/sharedinformers"

machineactuator "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/actuators/machine"
"sigs.k8s.io/cluster-api-provider-aws/cloud/aws/controllers/machine/options"
machineactuator "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/actuators/machine"
"sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/controllers/machine/options"

log "github.com/sirupsen/logrus"
awsclient "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
)

const (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// limitations under the License.

// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-aws/cloud/aws/providerconfig
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/providerconfig
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// limitations under the License.

// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-aws/cloud/aws/providerconfig
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/providerconfig
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/serializer"
clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"

"sigs.k8s.io/cluster-api-provider-aws/cloud/aws/providerconfig"
"sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/providerconfig"
)

// AWSProviderConfigCodec carries AWS provider configuration encoder/decoder
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions test/integration/create_update_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

machineactuator "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/actuators/machine"
awsclient "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
machineactuator "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/actuators/machine"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"

"github.com/ghodss/yaml"
Expand Down
4 changes: 2 additions & 2 deletions test/machines/awsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package machines
import (
"fmt"

machineutils "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/actuators/machine"
awsclient "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
machineutils "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/actuators/machine"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
clusterv1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion test/machines/machines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"

awsclient "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions test/utils/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
awsclient "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/client"
providerconfigv1 "sigs.k8s.io/cluster-api-provider-aws/cloud/aws/providerconfig/v1alpha1"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/client"
providerconfigv1 "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/providerconfig/v1alpha1"
clusterv1alpha1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"
)

Expand Down

0 comments on commit 32adb86

Please sign in to comment.