forked from LaconicNetwork/kompose
fix goimports (#1372)
This commit is contained in:
parent
0036f0c32b
commit
d1e538e2d4
@ -17,6 +17,9 @@ limitations under the License.
|
|||||||
package kobject
|
package kobject
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"path/filepath"
|
||||||
|
"time"
|
||||||
|
|
||||||
dockerCliTypes "github.com/docker/cli/cli/compose/types"
|
dockerCliTypes "github.com/docker/cli/cli/compose/types"
|
||||||
"github.com/docker/libcompose/yaml"
|
"github.com/docker/libcompose/yaml"
|
||||||
deployapi "github.com/openshift/api/apps/v1"
|
deployapi "github.com/openshift/api/apps/v1"
|
||||||
@ -25,8 +28,6 @@ import (
|
|||||||
v1 "k8s.io/api/apps/v1"
|
v1 "k8s.io/api/apps/v1"
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
"path/filepath"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// KomposeObject holds the generic struct of Kompose transformation
|
// KomposeObject holds the generic struct of Kompose transformation
|
||||||
|
|||||||
@ -21,16 +21,11 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
api "k8s.io/api/core/v1"
|
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
|
||||||
|
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
@ -39,14 +34,16 @@ import (
|
|||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
"github.com/kubernetes/kompose/pkg/kobject"
|
"github.com/kubernetes/kompose/pkg/kobject"
|
||||||
"github.com/kubernetes/kompose/pkg/transformer"
|
"github.com/kubernetes/kompose/pkg/transformer"
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"gopkg.in/yaml.v3"
|
|
||||||
|
|
||||||
appsv1 "k8s.io/api/apps/v1"
|
|
||||||
"sort"
|
|
||||||
|
|
||||||
deployapi "github.com/openshift/api/apps/v1"
|
deployapi "github.com/openshift/api/apps/v1"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
"gopkg.in/yaml.v3"
|
||||||
|
appsv1 "k8s.io/api/apps/v1"
|
||||||
|
api "k8s.io/api/core/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -17,20 +17,17 @@ limitations under the License.
|
|||||||
package kubernetes
|
package kubernetes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
appsv1 "k8s.io/api/apps/v1"
|
"os"
|
||||||
corev1 "k8s.io/api/core/v1"
|
"path/filepath"
|
||||||
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
|
|
||||||
"github.com/kubernetes/kompose/pkg/kobject"
|
"github.com/kubernetes/kompose/pkg/kobject"
|
||||||
"github.com/kubernetes/kompose/pkg/testutils"
|
"github.com/kubernetes/kompose/pkg/testutils"
|
||||||
|
|
||||||
"reflect"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
appsv1 "k8s.io/api/apps/v1"
|
||||||
|
corev1 "k8s.io/api/core/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -18,36 +18,33 @@ package kubernetes
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/fatih/structs"
|
|
||||||
"github.com/kubernetes/kompose/pkg/kobject"
|
|
||||||
"github.com/kubernetes/kompose/pkg/transformer"
|
|
||||||
deployapi "github.com/openshift/api/apps/v1"
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
api "k8s.io/api/core/v1"
|
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
|
||||||
|
|
||||||
buildapi "github.com/openshift/api/build/v1"
|
|
||||||
appsv1 "k8s.io/api/apps/v1"
|
|
||||||
networkingv1 "k8s.io/api/networking/v1"
|
|
||||||
networkingv1beta1 "k8s.io/api/networking/v1beta1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
|
|
||||||
"sort"
|
"sort"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"path/filepath"
|
"github.com/fatih/structs"
|
||||||
|
"github.com/kubernetes/kompose/pkg/kobject"
|
||||||
"github.com/kubernetes/kompose/pkg/loader/compose"
|
"github.com/kubernetes/kompose/pkg/loader/compose"
|
||||||
|
"github.com/kubernetes/kompose/pkg/transformer"
|
||||||
|
deployapi "github.com/openshift/api/apps/v1"
|
||||||
|
buildapi "github.com/openshift/api/build/v1"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
|
appsv1 "k8s.io/api/apps/v1"
|
||||||
|
api "k8s.io/api/core/v1"
|
||||||
|
networkingv1 "k8s.io/api/networking/v1"
|
||||||
|
networkingv1beta1 "k8s.io/api/networking/v1beta1"
|
||||||
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Kubernetes implements Transformer interface and represents Kubernetes transformer
|
// Kubernetes implements Transformer interface and represents Kubernetes transformer
|
||||||
|
|||||||
@ -19,23 +19,20 @@ package kubernetes
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
appsv1 "k8s.io/api/apps/v1"
|
|
||||||
networkingv1beta1 "k8s.io/api/networking/v1beta1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
|
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/kubernetes/kompose/pkg/kobject"
|
"github.com/kubernetes/kompose/pkg/kobject"
|
||||||
"github.com/kubernetes/kompose/pkg/transformer"
|
"github.com/kubernetes/kompose/pkg/transformer"
|
||||||
deployapi "github.com/openshift/api/apps/v1"
|
deployapi "github.com/openshift/api/apps/v1"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
appsv1 "k8s.io/api/apps/v1"
|
||||||
api "k8s.io/api/core/v1"
|
api "k8s.io/api/core/v1"
|
||||||
|
networkingv1beta1 "k8s.io/api/networking/v1beta1"
|
||||||
"strings"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newServiceConfig() kobject.ServiceConfig {
|
func newServiceConfig() kobject.ServiceConfig {
|
||||||
|
|||||||
@ -18,27 +18,22 @@ package openshift
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
|
||||||
"os"
|
"os"
|
||||||
|
"sort"
|
||||||
|
|
||||||
"github.com/kubernetes/kompose/pkg/kobject"
|
"github.com/kubernetes/kompose/pkg/kobject"
|
||||||
|
"github.com/kubernetes/kompose/pkg/transformer"
|
||||||
"github.com/kubernetes/kompose/pkg/transformer/kubernetes"
|
"github.com/kubernetes/kompose/pkg/transformer/kubernetes"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
deployapi "github.com/openshift/api/apps/v1"
|
deployapi "github.com/openshift/api/apps/v1"
|
||||||
buildapi "github.com/openshift/api/build/v1"
|
buildapi "github.com/openshift/api/build/v1"
|
||||||
imageapi "github.com/openshift/api/image/v1"
|
imageapi "github.com/openshift/api/image/v1"
|
||||||
routeapi "github.com/openshift/api/route/v1"
|
routeapi "github.com/openshift/api/route/v1"
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
kapi "k8s.io/apimachinery/pkg/apis/meta/v1"
|
kapi "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"sort"
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
|
|
||||||
"github.com/kubernetes/kompose/pkg/transformer"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// OpenShift implements Transformer interface and represents OpenShift transformer
|
// OpenShift implements Transformer interface and represents OpenShift transformer
|
||||||
|
|||||||
@ -17,9 +17,6 @@ limitations under the License.
|
|||||||
package openshift
|
package openshift
|
||||||
|
|
||||||
import (
|
import (
|
||||||
deployapi "github.com/openshift/api/apps/v1"
|
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
@ -29,9 +26,10 @@ import (
|
|||||||
"github.com/kubernetes/kompose/pkg/testutils"
|
"github.com/kubernetes/kompose/pkg/testutils"
|
||||||
"github.com/kubernetes/kompose/pkg/transformer"
|
"github.com/kubernetes/kompose/pkg/transformer"
|
||||||
"github.com/kubernetes/kompose/pkg/transformer/kubernetes"
|
"github.com/kubernetes/kompose/pkg/transformer/kubernetes"
|
||||||
|
deployapi "github.com/openshift/api/apps/v1"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newServiceConfig() kobject.ServiceConfig {
|
func newServiceConfig() kobject.ServiceConfig {
|
||||||
|
|||||||
@ -18,14 +18,15 @@ package docker
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
dockerlib "github.com/fsouza/go-dockerclient"
|
|
||||||
"github.com/kubernetes/kompose/pkg/utils/archive"
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
dockerlib "github.com/fsouza/go-dockerclient"
|
||||||
|
"github.com/kubernetes/kompose/pkg/utils/archive"
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Build will provide methods for interaction with API regarding building images
|
// Build will provide methods for interaction with API regarding building images
|
||||||
|
|||||||
@ -17,8 +17,9 @@ limitations under the License.
|
|||||||
package docker
|
package docker
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/fsouza/go-dockerclient"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
docker "github.com/fsouza/go-dockerclient"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Client connects to Docker client on host
|
// Client connects to Docker client on host
|
||||||
|
|||||||
@ -18,8 +18,9 @@ package docker
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
dockerlib "github.com/fsouza/go-dockerclient"
|
dockerlib "github.com/fsouza/go-dockerclient"
|
||||||
"github.com/novln/docker-parser"
|
dockerparser "github.com/novln/docker-parser"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user