Skip to content

Commit

Permalink
Merge pull request crossplane-contrib#26 from soorena776/remove_redun…
Browse files Browse the repository at this point in the history
…dant_folders

Removing redundant directories
  • Loading branch information
negz authored Sep 28, 2019
2 parents f7cadd6 + 214a2b5 commit 4d212d3
Show file tree
Hide file tree
Showing 141 changed files with 168 additions and 168 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ NPROCS ?= 1
# to half the number of CPU cores.
GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 )))

GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/crossplane
GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/stack
GO_LDFLAGS += -X $(GO_PROJECT)/pkg/version.Version=$(VERSION)
GO_SUBDIRS += cmd pkg aws
GO_SUBDIRS += cmd pkg apis
-include build/makelib/golang.mk

# ====================================================================================
Expand Down
16 changes: 8 additions & 8 deletions aws/apis/aws.go → apis/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ limitations under the License.
*/

// Generate deepcopy for apis
//go:generate go run ../../vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go object:headerFile=../../hack/boilerplate.go.txt paths=./...
//go:generate go run ../vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go object:headerFile=../hack/boilerplate.go.txt paths=./...

// Package apis contains Kubernetes API groups for AWS cloud provider.
package apis

import (
"k8s.io/apimachinery/pkg/runtime"

cachev1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/cache/v1alpha2"
computev1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/compute/v1alpha2"
databasev1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/database/v1alpha2"
identityv1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/identity/v1alpha2"
networkv1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/network/v1alpha2"
storagev1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/storage/v1alpha2"
awsv1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/v1alpha2"
cachev1alpha2 "github.com/crossplaneio/stack-aws/apis/cache/v1alpha2"
computev1alpha2 "github.com/crossplaneio/stack-aws/apis/compute/v1alpha2"
databasev1alpha2 "github.com/crossplaneio/stack-aws/apis/database/v1alpha2"
identityv1alpha2 "github.com/crossplaneio/stack-aws/apis/identity/v1alpha2"
networkv1alpha2 "github.com/crossplaneio/stack-aws/apis/network/v1alpha2"
storagev1alpha2 "github.com/crossplaneio/stack-aws/apis/storage/v1alpha2"
awsv1alpha2 "github.com/crossplaneio/stack-aws/apis/v1alpha2"
)

func init() {
Expand Down
10 changes: 5 additions & 5 deletions aws/apis/aws_test.go → apis/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ package apis
import (
"testing"

cachev1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/cache/v1alpha2"
computev1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/compute/v1alpha2"
databasev1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/database/v1alpha2"
storagev1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/storage/v1alpha2"
awsv1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/v1alpha2"
cachev1alpha2 "github.com/crossplaneio/stack-aws/apis/cache/v1alpha2"
computev1alpha2 "github.com/crossplaneio/stack-aws/apis/compute/v1alpha2"
databasev1alpha2 "github.com/crossplaneio/stack-aws/apis/database/v1alpha2"
storagev1alpha2 "github.com/crossplaneio/stack-aws/apis/storage/v1alpha2"
awsv1alpha2 "github.com/crossplaneio/stack-aws/apis/v1alpha2"

"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

runtimev1alpha1 "github.com/crossplaneio/crossplane-runtime/apis/core/v1alpha1"

"github.com/crossplaneio/stack-aws/pkg/clients/aws"
aws "github.com/crossplaneio/stack-aws/pkg/clients"
)

// SetBindingPhase of this IAMRole.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

runtimev1alpha1 "github.com/crossplaneio/crossplane-runtime/apis/core/v1alpha1"

"github.com/crossplaneio/stack-aws/pkg/clients/aws"
aws "github.com/crossplaneio/stack-aws/pkg/clients"
)

// SetBindingPhase of this IAMRolePolicyAttachment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/iam"
"github.com/onsi/gomega"

"github.com/crossplaneio/stack-aws/pkg/clients/aws"
aws "github.com/crossplaneio/stack-aws/pkg/clients"
)

func TestMain(m *testing.M) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
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-v2/service/ec2"
"github.com/onsi/gomega"

"github.com/crossplaneio/stack-aws/pkg/clients/aws"
aws "github.com/crossplaneio/stack-aws/pkg/clients"
)

func TestMain(m *testing.M) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

runtimev1alpha1 "github.com/crossplaneio/crossplane-runtime/apis/core/v1alpha1"

"github.com/crossplaneio/stack-aws/pkg/clients/aws"
aws "github.com/crossplaneio/stack-aws/pkg/clients"
)

// SetBindingPhase of this SecurityGroup.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

runtimev1alpha1 "github.com/crossplaneio/crossplane-runtime/apis/core/v1alpha1"

"github.com/crossplaneio/stack-aws/pkg/clients/aws"
aws "github.com/crossplaneio/stack-aws/pkg/clients"
)

// SetBindingPhase of this DBSubnetGroup.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/rds"
"github.com/onsi/gomega"

"github.com/crossplaneio/stack-aws/pkg/clients/aws"
aws "github.com/crossplaneio/stack-aws/pkg/clients"
)

func Test_DBSubnetGroup_BuildExternalStatusFromObservation(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cluster/images/stack-aws/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ RUN apk --no-cache add ca-certificates bash
ARG ARCH
ARG TINI_VERSION

ADD crossplane /usr/local/bin/
ADD stack /usr/local/bin/crossplane-aws-stack

COPY stack-package /

EXPOSE 8080
ENTRYPOINT ["crossplane"]
ENTRYPOINT ["crossplane-aws-stack"]
2 changes: 1 addition & 1 deletion cluster/images/stack-aws/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include ../../../build/makelib/image.mk
img.build:
@$(INFO) docker build $(IMAGE)
@cp Dockerfile $(IMAGE_TEMP_DIR) || $(FAIL)
@cp $(OUTPUT_DIR)/bin/$(OS)_$(ARCH)/crossplane $(IMAGE_TEMP_DIR) || $(FAIL)
@cp $(OUTPUT_DIR)/bin/$(OS)_$(ARCH)/stack $(IMAGE_TEMP_DIR) || $(FAIL)
@cp -R ../../../$(STACK_PACKAGE) $(IMAGE_TEMP_DIR) || $(FAIL)
@cd $(IMAGE_TEMP_DIR) && $(SED_CMD) 's|BASEIMAGE|$(OSBASEIMAGE)|g' Dockerfile || $(FAIL)
@docker build $(BUILD_ARGS) \
Expand Down
10 changes: 5 additions & 5 deletions cmd/crossplane/main.go → cmd/stack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
runtimelog "sigs.k8s.io/controller-runtime/pkg/runtime/log"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"

awsapis "github.com/crossplaneio/stack-aws/aws/apis"
"github.com/crossplaneio/stack-aws/pkg/controller/aws"
apis "github.com/crossplaneio/stack-aws/apis"
"github.com/crossplaneio/stack-aws/pkg/controller"

"github.com/crossplaneio/crossplane-runtime/pkg/logging"
"github.com/crossplaneio/crossplane/apis"
crossplaneapis "github.com/crossplaneio/crossplane/apis"
)

func main() {
Expand Down Expand Up @@ -101,7 +101,7 @@ func main() {
}

func controllerSetupWithManager(mgr manager.Manager) error {
if err := (&aws.Controllers{}).SetupWithManager(mgr); err != nil {
if err := (&controller.Controllers{}).SetupWithManager(mgr); err != nil {
return err
}

Expand All @@ -114,7 +114,7 @@ func addToScheme(scheme *runtime.Scheme) error {
return err
}

if err := awsapis.AddToScheme(scheme); err != nil {
if err := crossplaneapis.AddToScheme(scheme); err != nil {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/clients/aws/aws.go → pkg/clients/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/go-ini/ini"
"k8s.io/client-go/kubernetes"

"github.com/crossplaneio/stack-aws/aws/apis/v1alpha2"
"github.com/crossplaneio/stack-aws/apis/v1alpha2"

"github.com/crossplaneio/crossplane-runtime/pkg/util"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fake
import (
"github.com/aws/aws-sdk-go-v2/service/ec2"

clientset "github.com/crossplaneio/stack-aws/pkg/clients/aws/ec2"
clientset "github.com/crossplaneio/stack-aws/pkg/clients/ec2"
)

// this ensures that the mock implements the client interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fake
import (
"github.com/aws/aws-sdk-go-v2/service/ec2"

clientset "github.com/crossplaneio/stack-aws/pkg/clients/aws/ec2"
clientset "github.com/crossplaneio/stack-aws/pkg/clients/ec2"
)

// this ensures that the mock implements the client interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fake
import (
"github.com/aws/aws-sdk-go-v2/service/ec2"

clientset "github.com/crossplaneio/stack-aws/pkg/clients/aws/ec2"
clientset "github.com/crossplaneio/stack-aws/pkg/clients/ec2"
)

// this ensures that the mock implements the client interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fake
import (
"github.com/aws/aws-sdk-go-v2/service/ec2"

clientset "github.com/crossplaneio/stack-aws/pkg/clients/aws/ec2"
clientset "github.com/crossplaneio/stack-aws/pkg/clients/ec2"
)

// this ensures that the mock implements the client interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fake
import (
"github.com/aws/aws-sdk-go-v2/service/ec2"

clientset "github.com/crossplaneio/stack-aws/pkg/clients/aws/ec2"
clientset "github.com/crossplaneio/stack-aws/pkg/clients/ec2"
)

// this ensures that the mock implements the client interface
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/clients/aws/eks/eks.go → pkg/clients/eks/eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (

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

awscomputev1alpha2 "github.com/crossplaneio/stack-aws/aws/apis/compute/v1alpha2"
cfc "github.com/crossplaneio/stack-aws/pkg/clients/aws/cloudformation"
awscomputev1alpha2 "github.com/crossplaneio/stack-aws/apis/compute/v1alpha2"
cfc "github.com/crossplaneio/stack-aws/pkg/clients/cloudformation"
)

const (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package fake

import (
"github.com/crossplaneio/stack-aws/aws/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-aws/pkg/clients/aws/eks"
"github.com/crossplaneio/stack-aws/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-aws/pkg/clients/eks"
)

// MockEKSClient mock client for EKS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/crossplaneio/stack-aws/aws/apis/cache/v1alpha2"
"github.com/crossplaneio/stack-aws/pkg/clients/aws"
"github.com/crossplaneio/stack-aws/apis/cache/v1alpha2"
aws "github.com/crossplaneio/stack-aws/pkg/clients"
)

// NamePrefix is the prefix for all created ElastiCache replication groups.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/crossplaneio/stack-aws/aws/apis/cache/v1alpha2"
"github.com/crossplaneio/stack-aws/pkg/clients/aws"
"github.com/crossplaneio/stack-aws/apis/cache/v1alpha2"
aws "github.com/crossplaneio/stack-aws/pkg/clients"
)

const (
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fake
import (
"github.com/aws/aws-sdk-go-v2/service/iam"

clientset "github.com/crossplaneio/stack-aws/pkg/clients/aws/iam"
clientset "github.com/crossplaneio/stack-aws/pkg/clients/iam"
)

// this ensures that the mock implements the client interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fake
import (
"github.com/aws/aws-sdk-go-v2/service/iam"

clientset "github.com/crossplaneio/stack-aws/pkg/clients/aws/iam"
clientset "github.com/crossplaneio/stack-aws/pkg/clients/iam"
)

// this ensures that the mock implements the client interface
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fake
import (
"github.com/aws/aws-sdk-go-v2/service/rds"

clientset "github.com/crossplaneio/stack-aws/pkg/clients/aws/rds"
clientset "github.com/crossplaneio/stack-aws/pkg/clients/rds"
)

// this ensures that the mock implements the client interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package fake

import (
"github.com/crossplaneio/stack-aws/aws/apis/database/v1alpha2"
"github.com/crossplaneio/stack-aws/pkg/clients/aws/rds"
"github.com/crossplaneio/stack-aws/apis/database/v1alpha2"
"github.com/crossplaneio/stack-aws/pkg/clients/rds"
)

// MockRDSClient for testing.
Expand Down
2 changes: 1 addition & 1 deletion pkg/clients/aws/rds/rds.go → pkg/clients/rds/rds.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/rds"
"github.com/aws/aws-sdk-go-v2/service/rds/rdsiface"

"github.com/crossplaneio/stack-aws/aws/apis/database/v1alpha2"
"github.com/crossplaneio/stack-aws/apis/database/v1alpha2"
)

// Instance crossplane representation of the to AWS DBInstance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package fake
import (
"github.com/aws/aws-sdk-go-v2/service/iam"

"github.com/crossplaneio/stack-aws/aws/apis/storage/v1alpha2"
client "github.com/crossplaneio/stack-aws/pkg/clients/aws/s3"
"github.com/crossplaneio/stack-aws/apis/storage/v1alpha2"
client "github.com/crossplaneio/stack-aws/pkg/clients/s3"
)

// MockS3Client for testing.
Expand Down

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

File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions pkg/clients/aws/s3/s3.go → pkg/clients/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ import (
"encoding/json"
"fmt"

"github.com/crossplaneio/stack-aws/pkg/clients/aws/s3/operations"
"github.com/crossplaneio/stack-aws/pkg/clients/s3/operations"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/awserr"
"github.com/aws/aws-sdk-go-v2/service/iam"
"github.com/aws/aws-sdk-go-v2/service/s3"

"github.com/crossplaneio/stack-aws/aws/apis/storage/v1alpha2"
iamc "github.com/crossplaneio/stack-aws/pkg/clients/aws/iam"
"github.com/crossplaneio/stack-aws/apis/storage/v1alpha2"
iamc "github.com/crossplaneio/stack-aws/pkg/clients/iam"

"github.com/crossplaneio/crossplane-runtime/pkg/util"
storage "github.com/crossplaneio/crossplane/apis/storage/v1alpha1"
Expand Down
6 changes: 3 additions & 3 deletions pkg/clients/aws/s3/s3_test.go → pkg/clients/s3/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"errors"
"testing"

awsstorage "github.com/crossplaneio/stack-aws/aws/apis/storage/v1alpha2"
fakeiam "github.com/crossplaneio/stack-aws/pkg/clients/aws/iam/fake"
fakeops "github.com/crossplaneio/stack-aws/pkg/clients/aws/s3/operations/fake"
awsstorage "github.com/crossplaneio/stack-aws/apis/storage/v1alpha2"
fakeiam "github.com/crossplaneio/stack-aws/pkg/clients/iam/fake"
fakeops "github.com/crossplaneio/stack-aws/pkg/clients/s3/operations/fake"

storage "github.com/crossplaneio/crossplane/apis/storage/v1alpha1"

Expand Down
Loading

0 comments on commit 4d212d3

Please sign in to comment.