diff --git a/cli/command/stack/kubernetes/check.go b/cli/command/stack/kubernetes/check.go index 9e5c7e6ef2..55411b3dd3 100644 --- a/cli/command/stack/kubernetes/check.go +++ b/cli/command/stack/kubernetes/check.go @@ -3,7 +3,7 @@ package kubernetes import ( "fmt" - apiv1beta1 "github.com/docker/cli/cli/command/stack/kubernetes/api/compose/v1beta1" + apiv1beta1 "github.com/docker/cli/kubernetes/compose/v1beta1" log "github.com/sirupsen/logrus" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" diff --git a/cli/command/stack/kubernetes/cmd.go b/cli/command/stack/kubernetes/cmd.go index f65caabff8..55406e2ba3 100644 --- a/cli/command/stack/kubernetes/cmd.go +++ b/cli/command/stack/kubernetes/cmd.go @@ -5,7 +5,7 @@ import ( "path/filepath" "github.com/docker/cli/cli/command" - composev1beta1 "github.com/docker/cli/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1" + composev1beta1 "github.com/docker/cli/kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1" "github.com/docker/docker/pkg/homedir" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cli/command/stack/kubernetes/collision.go b/cli/command/stack/kubernetes/collision.go index 6dd13eb202..8421e07f2f 100644 --- a/cli/command/stack/kubernetes/collision.go +++ b/cli/command/stack/kubernetes/collision.go @@ -4,10 +4,10 @@ import ( "fmt" "sort" - apiv1beta1 "github.com/docker/cli/cli/command/stack/kubernetes/api/compose/v1beta1" - "github.com/docker/cli/cli/command/stack/kubernetes/api/labels" "github.com/docker/cli/cli/compose/loader" "github.com/docker/cli/cli/compose/types" + apiv1beta1 "github.com/docker/cli/kubernetes/compose/v1beta1" + "github.com/docker/cli/kubernetes/labels" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" ) diff --git a/cli/command/stack/kubernetes/conversion.go b/cli/command/stack/kubernetes/conversion.go index f8b085b45d..9c5eccd820 100644 --- a/cli/command/stack/kubernetes/conversion.go +++ b/cli/command/stack/kubernetes/conversion.go @@ -5,7 +5,7 @@ import ( "time" "github.com/docker/cli/cli/command/formatter" - "github.com/docker/cli/cli/command/stack/kubernetes/api/labels" + "github.com/docker/cli/kubernetes/labels" "github.com/docker/docker/api/types/swarm" appsv1beta2 "k8s.io/api/apps/v1beta2" apiv1 "k8s.io/api/core/v1" diff --git a/cli/command/stack/kubernetes/convert.go b/cli/command/stack/kubernetes/convert.go index 231b0135b4..a483609449 100644 --- a/cli/command/stack/kubernetes/convert.go +++ b/cli/command/stack/kubernetes/convert.go @@ -1,7 +1,7 @@ package kubernetes import ( - "github.com/docker/cli/cli/command/stack/kubernetes/api/labels" + "github.com/docker/cli/kubernetes/labels" apiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/cli/command/stack/kubernetes/loader.go b/cli/command/stack/kubernetes/loader.go index 7b0d89b267..b4da2bfb01 100644 --- a/cli/command/stack/kubernetes/loader.go +++ b/cli/command/stack/kubernetes/loader.go @@ -7,10 +7,10 @@ import ( "path/filepath" "strings" - apiv1beta1 "github.com/docker/cli/cli/command/stack/kubernetes/api/compose/v1beta1" "github.com/docker/cli/cli/compose/loader" "github.com/docker/cli/cli/compose/template" composetypes "github.com/docker/cli/cli/compose/types" + apiv1beta1 "github.com/docker/cli/kubernetes/compose/v1beta1" "github.com/pkg/errors" yaml "gopkg.in/yaml.v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/cli/command/stack/kubernetes/services.go b/cli/command/stack/kubernetes/services.go index a59fe2ac33..9cc82f1cb2 100644 --- a/cli/command/stack/kubernetes/services.go +++ b/cli/command/stack/kubernetes/services.go @@ -6,7 +6,7 @@ import ( "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/formatter" - "github.com/docker/cli/cli/command/stack/kubernetes/api/labels" + "github.com/docker/cli/kubernetes/labels" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/cli/command/stack/kubernetes/watcher.go b/cli/command/stack/kubernetes/watcher.go index 016458b1ee..eef2ec8281 100644 --- a/cli/command/stack/kubernetes/watcher.go +++ b/cli/command/stack/kubernetes/watcher.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - apiv1beta1 "github.com/docker/cli/cli/command/stack/kubernetes/api/compose/v1beta1" - "github.com/docker/cli/cli/command/stack/kubernetes/api/labels" + apiv1beta1 "github.com/docker/cli/kubernetes/compose/v1beta1" + "github.com/docker/cli/kubernetes/labels" apiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" diff --git a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/clientset.go b/kubernetes/client/clientset_generated/clientset/clientset.go similarity index 94% rename from cli/command/stack/kubernetes/api/client/clientset_generated/clientset/clientset.go rename to kubernetes/client/clientset_generated/clientset/clientset.go index a60985c490..93815b6855 100644 --- a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/clientset.go +++ b/kubernetes/client/clientset_generated/clientset/clientset.go @@ -1,7 +1,7 @@ package clientset import ( - composev1beta1 "github.com/docker/cli/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1" + composev1beta1 "github.com/docker/cli/kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1" glog "github.com/golang/glog" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" diff --git a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/doc.go b/kubernetes/client/clientset_generated/clientset/doc.go similarity index 100% rename from cli/command/stack/kubernetes/api/client/clientset_generated/clientset/doc.go rename to kubernetes/client/clientset_generated/clientset/doc.go diff --git a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/scheme/doc.go b/kubernetes/client/clientset_generated/clientset/scheme/doc.go similarity index 100% rename from cli/command/stack/kubernetes/api/client/clientset_generated/clientset/scheme/doc.go rename to kubernetes/client/clientset_generated/clientset/scheme/doc.go diff --git a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/scheme/register.go b/kubernetes/client/clientset_generated/clientset/scheme/register.go similarity index 92% rename from cli/command/stack/kubernetes/api/client/clientset_generated/clientset/scheme/register.go rename to kubernetes/client/clientset_generated/clientset/scheme/register.go index 44f025dc9d..99ab1bccbb 100644 --- a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/scheme/register.go +++ b/kubernetes/client/clientset_generated/clientset/scheme/register.go @@ -1,7 +1,7 @@ package scheme import ( - composev1beta1 "github.com/docker/cli/cli/command/stack/kubernetes/api/compose/v1beta1" + composev1beta1 "github.com/docker/cli/kubernetes/compose/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1/compose_client.go b/kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1/compose_client.go similarity index 90% rename from cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1/compose_client.go rename to kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1/compose_client.go index b3831487ad..dcc0241429 100644 --- a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1/compose_client.go +++ b/kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1/compose_client.go @@ -1,8 +1,8 @@ package v1beta1 import ( - "github.com/docker/cli/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/scheme" - v1beta1 "github.com/docker/cli/cli/command/stack/kubernetes/api/compose/v1beta1" + "github.com/docker/cli/kubernetes/client/clientset_generated/clientset/scheme" + v1beta1 "github.com/docker/cli/kubernetes/compose/v1beta1" serializer "k8s.io/apimachinery/pkg/runtime/serializer" rest "k8s.io/client-go/rest" ) diff --git a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1/doc.go b/kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1/doc.go similarity index 100% rename from cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1/doc.go rename to kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1/doc.go diff --git a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1/generated_expansion.go b/kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1/generated_expansion.go similarity index 100% rename from cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1/generated_expansion.go rename to kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1/generated_expansion.go diff --git a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1/stack.go b/kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1/stack.go similarity index 95% rename from cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1/stack.go rename to kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1/stack.go index 616b6393a4..fa4daa82c6 100644 --- a/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/typed/compose/v1beta1/stack.go +++ b/kubernetes/client/clientset_generated/clientset/typed/compose/v1beta1/stack.go @@ -1,8 +1,8 @@ package v1beta1 import ( - scheme "github.com/docker/cli/cli/command/stack/kubernetes/api/client/clientset_generated/clientset/scheme" - v1beta1 "github.com/docker/cli/cli/command/stack/kubernetes/api/compose/v1beta1" + scheme "github.com/docker/cli/kubernetes/client/clientset_generated/clientset/scheme" + v1beta1 "github.com/docker/cli/kubernetes/compose/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/cli/command/stack/kubernetes/api/compose/doc.go b/kubernetes/compose/doc.go similarity index 100% rename from cli/command/stack/kubernetes/api/compose/doc.go rename to kubernetes/compose/doc.go diff --git a/cli/command/stack/kubernetes/api/compose/register.go b/kubernetes/compose/register.go similarity index 100% rename from cli/command/stack/kubernetes/api/compose/register.go rename to kubernetes/compose/register.go diff --git a/cli/command/stack/kubernetes/api/compose/types.go b/kubernetes/compose/types.go similarity index 100% rename from cli/command/stack/kubernetes/api/compose/types.go rename to kubernetes/compose/types.go diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/doc.go b/kubernetes/compose/v1beta1/doc.go similarity index 66% rename from cli/command/stack/kubernetes/api/compose/v1beta1/doc.go rename to kubernetes/compose/v1beta1/doc.go index 000f6c7d19..e54b03cc66 100644 --- a/cli/command/stack/kubernetes/api/compose/v1beta1/doc.go +++ b/kubernetes/compose/v1beta1/doc.go @@ -5,7 +5,7 @@ // // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/docker/cli/cli/command/stack/kubernetes/api/compose +// +k8s:conversion-gen=github.com/docker/cli/kubernetes/compose // +k8s:defaulter-gen=TypeMeta // +groupName=compose.docker.com -package v1beta1 // import "github.com/docker/cli/cli/command/stack/kubernetes/api/compose/v1beta1" +package v1beta1 // import "github.com/docker/cli/kubernetes/compose/v1beta1" diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/owner_stack_types.go b/kubernetes/compose/v1beta1/owner_stack_types.go similarity index 89% rename from cli/command/stack/kubernetes/api/compose/v1beta1/owner_stack_types.go rename to kubernetes/compose/v1beta1/owner_stack_types.go index 8f297b7964..470926d13d 100644 --- a/cli/command/stack/kubernetes/api/compose/v1beta1/owner_stack_types.go +++ b/kubernetes/compose/v1beta1/owner_stack_types.go @@ -3,7 +3,7 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/docker/cli/cli/command/stack/kubernetes/api/compose" + "github.com/docker/cli/kubernetes/compose" ) // Owner defines the owner of a stack. It is used to impersonate the controller calls diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/register.go b/kubernetes/compose/v1beta1/register.go similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/register.go rename to kubernetes/compose/v1beta1/register.go diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/stack_types.go b/kubernetes/compose/v1beta1/stack_types.go similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/stack_types.go rename to kubernetes/compose/v1beta1/stack_types.go diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-nginx.input.yaml b/kubernetes/compose/v1beta1/testdata/redis-nginx.input.yaml similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-nginx.input.yaml rename to kubernetes/compose/v1beta1/testdata/redis-nginx.input.yaml diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-nginx.output.yaml b/kubernetes/compose/v1beta1/testdata/redis-nginx.output.yaml similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-nginx.output.yaml rename to kubernetes/compose/v1beta1/testdata/redis-nginx.output.yaml diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-with-memory.input.yaml b/kubernetes/compose/v1beta1/testdata/redis-with-memory.input.yaml similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-with-memory.input.yaml rename to kubernetes/compose/v1beta1/testdata/redis-with-memory.input.yaml diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-with-memory.output.yaml b/kubernetes/compose/v1beta1/testdata/redis-with-memory.output.yaml similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-with-memory.output.yaml rename to kubernetes/compose/v1beta1/testdata/redis-with-memory.output.yaml diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-with-replicas.input.yaml b/kubernetes/compose/v1beta1/testdata/redis-with-replicas.input.yaml similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-with-replicas.input.yaml rename to kubernetes/compose/v1beta1/testdata/redis-with-replicas.input.yaml diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-with-replicas.output.yaml b/kubernetes/compose/v1beta1/testdata/redis-with-replicas.output.yaml similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/testdata/redis-with-replicas.output.yaml rename to kubernetes/compose/v1beta1/testdata/redis-with-replicas.output.yaml diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/testdata/single-redis.input.yaml b/kubernetes/compose/v1beta1/testdata/single-redis.input.yaml similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/testdata/single-redis.input.yaml rename to kubernetes/compose/v1beta1/testdata/single-redis.input.yaml diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/testdata/single-redis.output.yaml b/kubernetes/compose/v1beta1/testdata/single-redis.output.yaml similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/testdata/single-redis.output.yaml rename to kubernetes/compose/v1beta1/testdata/single-redis.output.yaml diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/zz_generated.conversion.go b/kubernetes/compose/v1beta1/zz_generated.conversion.go similarity index 98% rename from cli/command/stack/kubernetes/api/compose/v1beta1/zz_generated.conversion.go rename to kubernetes/compose/v1beta1/zz_generated.conversion.go index ab1abbdac1..3aad7000e7 100644 --- a/cli/command/stack/kubernetes/api/compose/v1beta1/zz_generated.conversion.go +++ b/kubernetes/compose/v1beta1/zz_generated.conversion.go @@ -5,7 +5,7 @@ package v1beta1 import ( - compose "github.com/docker/cli/cli/command/stack/kubernetes/api/compose" + compose "github.com/docker/cli/kubernetes/compose" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -53,7 +53,6 @@ func Convert_compose_Owner_To_v1beta1_Owner(in *compose.Owner, out *Owner, s con return autoConvert_compose_Owner_To_v1beta1_Owner(in, out, s) } - func autoConvert_v1beta1_Stack_To_compose_Stack(in *Stack, out *compose.Stack, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_StackSpec_To_compose_StackSpec(&in.Spec, &out.Spec, s); err != nil { @@ -136,6 +135,7 @@ func autoConvert_v1beta1_StackSpec_To_compose_StackSpec(in *StackSpec, out *comp func Convert_compose_StackSpec_To_v1beta1_StackSpec(in *compose.StackSpec, out *StackSpec, s conversion.Scope) error { return autoConvert_compose_StackSpec_To_v1beta1_StackSpec(in, out, s) } + // Convert_v1beta1_StackSpec_To_compose_StackSpec is an autogenerated conversion function. func Convert_v1beta1_StackSpec_To_compose_StackSpec(in *StackSpec, out *compose.StackSpec, s conversion.Scope) error { return autoConvert_v1beta1_StackSpec_To_compose_StackSpec(in, out, s) diff --git a/cli/command/stack/kubernetes/api/compose/v1beta1/zz_generated.deepcopy.go b/kubernetes/compose/v1beta1/zz_generated.deepcopy.go similarity index 100% rename from cli/command/stack/kubernetes/api/compose/v1beta1/zz_generated.deepcopy.go rename to kubernetes/compose/v1beta1/zz_generated.deepcopy.go diff --git a/cli/command/stack/kubernetes/api/compose/zz_generated.deepcopy.go b/kubernetes/compose/zz_generated.deepcopy.go similarity index 100% rename from cli/command/stack/kubernetes/api/compose/zz_generated.deepcopy.go rename to kubernetes/compose/zz_generated.deepcopy.go diff --git a/cli/command/stack/kubernetes/api/doc.go b/kubernetes/doc.go similarity index 57% rename from cli/command/stack/kubernetes/api/doc.go rename to kubernetes/doc.go index 4b648ce8d5..b50d402ee2 100644 --- a/cli/command/stack/kubernetes/api/doc.go +++ b/kubernetes/doc.go @@ -1,4 +1,4 @@ // // +domain=docker.com -package apis +package kubernetes diff --git a/cli/command/stack/kubernetes/api/labels/labels.go b/kubernetes/labels/labels.go similarity index 100% rename from cli/command/stack/kubernetes/api/labels/labels.go rename to kubernetes/labels/labels.go diff --git a/cli/command/stack/kubernetes/api/labels/labels_test.go b/kubernetes/labels/labels_test.go similarity index 100% rename from cli/command/stack/kubernetes/api/labels/labels_test.go rename to kubernetes/labels/labels_test.go