Skip to content

Commit

Permalink
Merge pull request #38 from soorena776/remove_redundant_directories
Browse files Browse the repository at this point in the history
Remove redundant gcp folders
  • Loading branch information
jbw976 authored Sep 30, 2019
2 parents a83c882 + 327102b commit bb47431
Show file tree
Hide file tree
Showing 98 changed files with 116 additions and 116 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 gcp
GO_SUBDIRS += cmd pkg apis
-include build/makelib/golang.mk

# ====================================================================================
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.
14 changes: 7 additions & 7 deletions gcp/apis/gcp.go → apis/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ 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 for GCP cloud provider.
package apis

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

cachev1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/cache/v1alpha2"
computev1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
databasev1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/database/v1alpha2"
servicenetworkingv1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/servicenetworking/v1alpha2"
storagev1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/storage/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/v1alpha2"
cachev1alpha2 "github.com/crossplaneio/stack-gcp/apis/cache/v1alpha2"
computev1alpha2 "github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
databasev1alpha2 "github.com/crossplaneio/stack-gcp/apis/database/v1alpha2"
servicenetworkingv1alpha2 "github.com/crossplaneio/stack-gcp/apis/servicenetworking/v1alpha2"
storagev1alpha2 "github.com/crossplaneio/stack-gcp/apis/storage/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/apis/v1alpha2"
)

func init() {
Expand Down
10 changes: 5 additions & 5 deletions gcp/apis/gcp_test.go → apis/gcp_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-gcp/gcp/apis/cache/v1alpha2"
computev1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
databasev1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/database/v1alpha2"
storagev1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/storage/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/v1alpha2"
cachev1alpha2 "github.com/crossplaneio/stack-gcp/apis/cache/v1alpha2"
computev1alpha2 "github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
databasev1alpha2 "github.com/crossplaneio/stack-gcp/apis/database/v1alpha2"
storagev1alpha2 "github.com/crossplaneio/stack-gcp/apis/storage/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/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.
4 changes: 2 additions & 2 deletions cluster/images/stack-gcp/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-gcp-stack

COPY stack-package /

EXPOSE 8080
ENTRYPOINT ["crossplane"]
ENTRYPOINT ["crossplane-gcp-stack"]
2 changes: 1 addition & 1 deletion cluster/images/stack-gcp/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
12 changes: 6 additions & 6 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"

"github.com/crossplaneio/crossplane-runtime/pkg/logging"
"github.com/crossplaneio/crossplane/apis"
"github.com/crossplaneio/stack-gcp/apis"
"github.com/crossplaneio/stack-gcp/pkg/controller"

gcpapis "github.com/crossplaneio/stack-gcp/gcp/apis"
"github.com/crossplaneio/stack-gcp/pkg/controller/gcp"
"github.com/crossplaneio/crossplane-runtime/pkg/logging"
crossplaneapis "github.com/crossplaneio/crossplane/apis"
)

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

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

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/crossplaneio/stack-gcp/gcp/apis/cache/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/cache/v1alpha2"
)

// NamePrefix is the prefix for all created CloudMemorystore instances.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"github.com/google/go-cmp/cmp"

"github.com/crossplaneio/stack-gcp/gcp/apis/cache/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/cache/v1alpha2"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
gax "github.com/googleapis/gax-go"
redisv1pb "google.golang.org/genproto/googleapis/cloud/redis/v1"

"github.com/crossplaneio/stack-gcp/pkg/clients/gcp/cloudmemorystore"
"github.com/crossplaneio/stack-gcp/pkg/clients/cloudmemorystore"
)

var _ cloudmemorystore.Client = &MockClient{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

sqladmin "google.golang.org/api/sqladmin/v1beta4"

"github.com/crossplaneio/stack-gcp/pkg/clients/gcp/cloudsql"
"github.com/crossplaneio/stack-gcp/pkg/clients/cloudsql"
)

// MockInstanceClient for testing purposes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fake
import (
"context"

"github.com/crossplaneio/stack-gcp/pkg/clients/gcp/cloudsql"
"github.com/crossplaneio/stack-gcp/pkg/clients/cloudsql"

sqladmin "google.golang.org/api/sqladmin/v1beta4"
)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

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

"github.com/crossplaneio/stack-gcp/gcp/apis/servicenetworking/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/servicenetworking/v1alpha2"
)

// VPC Network peering states.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
runtimev1alpha1 "github.com/crossplaneio/crossplane-runtime/apis/core/v1alpha1"
"github.com/crossplaneio/crossplane-runtime/pkg/test"

"github.com/crossplaneio/stack-gcp/gcp/apis/servicenetworking/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/servicenetworking/v1alpha2"
)

func TestFromParameters(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/clients/gcp/fake/fake.go → pkg/clients/fake/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fake
import (
"google.golang.org/api/container/v1"

computev1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
computev1alpha2 "github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
)

// GKEClient for mocking.
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/clients/gcp/gke/gke.go → pkg/clients/gke/gke.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"google.golang.org/api/container/v1"
"google.golang.org/api/option"

computev1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp"
computev1alpha2 "github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
gcp "github.com/crossplaneio/stack-gcp/pkg/clients"
)

const (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

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

"github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp"
"github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
gcp "github.com/crossplaneio/stack-gcp/pkg/clients"
)

// Known Address statuses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
runtimev1alpha1 "github.com/crossplaneio/crossplane-runtime/apis/core/v1alpha1"
"github.com/crossplaneio/crossplane-runtime/pkg/test"

"github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
)

func TestFromParameters(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

. "github.com/onsi/gomega"

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

func TestProject(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package network
import (
googlecompute "google.golang.org/api/compute/v1"

"github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
)

// GenerateNetwork takes a *NetworkParameters and returns *googlecompute.Network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/google/go-cmp/cmp"
"google.golang.org/api/compute/v1"

"github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
)

const (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"cloud.google.com/go/storage"

gcpstorage "github.com/crossplaneio/stack-gcp/pkg/clients/gcp/storage"
gcpstorage "github.com/crossplaneio/stack-gcp/pkg/clients/storage"
)

// MockBucketClient Client interface implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package subnetwork
import (
"google.golang.org/api/compute/v1"

"github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
)

// GenerateSubnetwork creates a *googlecompute.Subnetwork object using SubnetworkParameters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/google/go-cmp/cmp/cmpopts"
"google.golang.org/api/compute/v1"

"github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/crossplaneio/crossplane-runtime/pkg/resource"
cachev1alpha1 "github.com/crossplaneio/crossplane/apis/cache/v1alpha1"

"github.com/crossplaneio/stack-gcp/gcp/apis/cache/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/cache/v1alpha2"
)

// CloudMemorystoreInstanceClaimController is responsible for adding the Cloud Memorystore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/crossplaneio/crossplane-runtime/pkg/test"
cachev1alpha1 "github.com/crossplaneio/crossplane/apis/cache/v1alpha1"

"github.com/crossplaneio/stack-gcp/gcp/apis/cache/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/cache/v1alpha2"
)

var _ resource.ManagedConfigurator = resource.ManagedConfiguratorFn(ConfigureCloudMemorystoreInstance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
"github.com/crossplaneio/crossplane-runtime/pkg/meta"
"github.com/crossplaneio/crossplane-runtime/pkg/resource"

"github.com/crossplaneio/stack-gcp/gcp/apis/cache/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/v1alpha2"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp/cloudmemorystore"
"github.com/crossplaneio/stack-gcp/apis/cache/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/apis/v1alpha2"
"github.com/crossplaneio/stack-gcp/pkg/clients/cloudmemorystore"
)

// Error strings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ import (
"github.com/crossplaneio/crossplane-runtime/pkg/resource"
"github.com/crossplaneio/crossplane-runtime/pkg/test"

"github.com/crossplaneio/stack-gcp/gcp/apis/cache/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/v1alpha2"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp/cloudmemorystore"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp/cloudmemorystore/fake"
"github.com/crossplaneio/stack-gcp/apis/cache/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/apis/v1alpha2"
"github.com/crossplaneio/stack-gcp/pkg/clients/cloudmemorystore"
"github.com/crossplaneio/stack-gcp/pkg/clients/cloudmemorystore/fake"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/crossplaneio/crossplane-runtime/pkg/resource"
computev1alpha1 "github.com/crossplaneio/crossplane/apis/compute/v1alpha1"

"github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
)

// GKEClusterClaimController is responsible for adding the GKECluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/crossplaneio/crossplane-runtime/pkg/test"
computev1alpha1 "github.com/crossplaneio/crossplane/apis/compute/v1alpha1"

"github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
)

var _ resource.ManagedConfigurator = resource.ManagedConfiguratorFn(ConfigureGKECluster)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ import (
"github.com/crossplaneio/crossplane-runtime/pkg/resource"
"github.com/crossplaneio/crossplane-runtime/pkg/util"

gcpcomputev1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/v1alpha2"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp/gke"
gcpcomputev1alpha2 "github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/apis/v1alpha2"
gcp "github.com/crossplaneio/stack-gcp/pkg/clients"
"github.com/crossplaneio/stack-gcp/pkg/clients/gke"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"testing"

"github.com/crossplaneio/stack-gcp/gcp/apis"
"github.com/crossplaneio/stack-gcp/apis"

"github.com/google/go-cmp/cmp"
. "github.com/onsi/gomega"
Expand All @@ -39,9 +39,9 @@ import (
runtimev1alpha1 "github.com/crossplaneio/crossplane-runtime/apis/core/v1alpha1"
"github.com/crossplaneio/crossplane-runtime/pkg/test"

. "github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp/fake"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp/gke"
. "github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
"github.com/crossplaneio/stack-gcp/pkg/clients/fake"
"github.com/crossplaneio/stack-gcp/pkg/clients/gke"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ import (
"github.com/crossplaneio/crossplane-runtime/pkg/meta"
"github.com/crossplaneio/crossplane-runtime/pkg/resource"

"github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/v1alpha2"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp"
"github.com/crossplaneio/stack-gcp/pkg/clients/gcp/globaladdress"
"github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/apis/v1alpha2"
gcp "github.com/crossplaneio/stack-gcp/pkg/clients"
"github.com/crossplaneio/stack-gcp/pkg/clients/globaladdress"
)

// Error strings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import (
"github.com/crossplaneio/crossplane-runtime/pkg/resource"
"github.com/crossplaneio/crossplane-runtime/pkg/test"

"github.com/crossplaneio/stack-gcp/gcp/apis/compute/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/gcp/apis/v1alpha2"
"github.com/crossplaneio/stack-gcp/apis/compute/v1alpha2"
gcpv1alpha2 "github.com/crossplaneio/stack-gcp/apis/v1alpha2"
)

var (
Expand Down
Loading

0 comments on commit bb47431

Please sign in to comment.