mirror of https://github.com/kubernetes/kops.git
Merge pull request #3764 from chrislovecnm/goimports-cleanup
Automatic merge from submit-queue. goimports cleanup && basel files This is a dry PR. Only goimports updates and gazelle fixes.
This commit is contained in:
commit
88984d4b47
|
@ -18,8 +18,9 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"k8s.io/kops/channels/pkg/cmd"
|
||||
"os"
|
||||
|
||||
"k8s.io/kops/channels/pkg/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -18,11 +18,12 @@ package channels
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/kops/channels/pkg/api"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// Addon is a wrapper around a single version of an addon
|
||||
|
|
|
@ -18,13 +18,14 @@ package channels
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/blang/semver"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/channels/pkg/api"
|
||||
"k8s.io/kops/upup/pkg/fi/utils"
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
"net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Addons struct {
|
||||
|
|
|
@ -17,9 +17,10 @@ limitations under the License.
|
|||
package channels
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/blang/semver"
|
||||
"k8s.io/kops/channels/pkg/api"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_Filtering(t *testing.T) {
|
||||
|
|
|
@ -18,13 +18,14 @@ package channels
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"io/ioutil"
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
)
|
||||
|
||||
// Apply calls kubectl apply to apply the manifest.
|
||||
|
|
|
@ -19,13 +19,14 @@ package channels
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/blang/semver"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const AnnotationPrefix = "addons.k8s.io/"
|
||||
|
|
|
@ -17,8 +17,9 @@ limitations under the License.
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"io"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func NewCmdApply(f Factory, out io.Writer) *cobra.Command {
|
||||
|
|
|
@ -18,14 +18,15 @@ package cmd
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/blang/semver"
|
||||
"github.com/spf13/cobra"
|
||||
"io"
|
||||
"k8s.io/kops/channels/pkg/channels"
|
||||
"k8s.io/kops/util/pkg/tables"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/blang/semver"
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/channels/pkg/channels"
|
||||
"k8s.io/kops/util/pkg/tables"
|
||||
)
|
||||
|
||||
type ApplyChannelOptions struct {
|
||||
|
|
|
@ -17,8 +17,9 @@ limitations under the License.
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"io"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func NewCmdGet(f Factory, out io.Writer) *cobra.Command {
|
||||
|
|
|
@ -34,13 +34,14 @@ package cmd
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/spf13/cobra"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kops/channels/pkg/channels"
|
||||
"k8s.io/kops/util/pkg/tables"
|
||||
"os"
|
||||
)
|
||||
|
||||
type GetAddonsOptions struct {
|
||||
|
|
|
@ -20,9 +20,10 @@ import (
|
|||
goflag "flag"
|
||||
"fmt"
|
||||
|
||||
"io"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"io"
|
||||
)
|
||||
|
||||
type CmdRootOptions struct {
|
||||
|
|
|
@ -19,10 +19,11 @@ package mockec2
|
|||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/golang/glog"
|
||||
"net"
|
||||
)
|
||||
|
||||
func (m *MockEC2) AllocateAddressRequest(*ec2.AllocateAddressInput) (*request.Request, *ec2.AllocateAddressOutput) {
|
||||
|
|
|
@ -18,11 +18,12 @@ package mockec2
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/golang/glog"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (m *MockEC2) DescribeImageAttributeRequest(*ec2.DescribeImageAttributeInput) (*request.Request, *ec2.DescribeImageAttributeOutput) {
|
||||
|
|
|
@ -18,6 +18,7 @@ package mockec2
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
|
|
|
@ -18,10 +18,11 @@ package mockec2
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/golang/glog"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (m *MockEC2) CreateSecurityGroupRequest(*ec2.CreateSecurityGroupInput) (*request.Request, *ec2.CreateSecurityGroupOutput) {
|
||||
|
|
|
@ -18,10 +18,11 @@ package mockec2
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/golang/glog"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (m *MockEC2) DescribeVolumeAttributeRequest(*ec2.DescribeVolumeAttributeInput) (*request.Request, *ec2.DescribeVolumeAttributeOutput) {
|
||||
|
|
|
@ -18,11 +18,12 @@ package mockec2
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/golang/glog"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type vpcInfo struct {
|
||||
|
|
|
@ -17,10 +17,11 @@ limitations under the License.
|
|||
package mockroute53
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/route53"
|
||||
"github.com/aws/aws-sdk-go/service/route53/route53iface"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type zoneInfo struct {
|
||||
|
|
|
@ -18,6 +18,7 @@ package mockroute53
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/route53"
|
||||
|
|
|
@ -18,6 +18,7 @@ package mockroute53
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/route53"
|
||||
"github.com/golang/glog"
|
||||
|
|
|
@ -21,11 +21,12 @@ import (
|
|||
"os"
|
||||
"runtime"
|
||||
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/apiserver/pkg/util/logs"
|
||||
"k8s.io/kops/pkg/apiserver/cmd/server"
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -21,6 +21,7 @@ import (
|
|||
"io"
|
||||
|
||||
"bytes"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
|
|
@ -18,6 +18,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup"
|
||||
|
|
|
@ -18,9 +18,10 @@ package dns
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kubernetes/federation/pkg/dnsprovider"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type ZoneSpec struct {
|
||||
|
|
|
@ -19,9 +19,10 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
)
|
||||
|
||||
// registryBase is the base path where state files are kept (the state store)
|
||||
|
|
|
@ -19,6 +19,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
||||
api "k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/client/simple/vfsclientset"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
|
|
|
@ -18,6 +18,7 @@ package federation
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/api/core/v1"
|
||||
k8sapiv1 "k8s.io/api/core/v1"
|
||||
|
|
|
@ -18,6 +18,7 @@ package federation
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/api/core/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
|
|
|
@ -18,6 +18,7 @@ package federation
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/api/core/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
|
|
|
@ -18,6 +18,7 @@ package kubernetestarget
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/client-go/kubernetes"
|
||||
kopsapi "k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/client/simple"
|
||||
|
|
|
@ -18,6 +18,7 @@ package tasks
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
"k8s.io/kops/federation/targets/kubernetestarget"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
|
|
|
@ -18,11 +18,12 @@ package distros
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// FindDistribution identifies the distribution on which we are running
|
||||
|
|
|
@ -17,11 +17,12 @@ limitations under the License.
|
|||
package model
|
||||
|
||||
import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/flagbuilder"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"path"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDockerBuilder_Simple(t *testing.T) {
|
||||
|
|
|
@ -25,6 +25,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"fmt"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/kops/nodeup/pkg/distros"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
|
|
|
@ -18,9 +18,10 @@ package model
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/nodeup/nodetasks"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// NetworkBuilder writes CNI assets
|
||||
|
|
|
@ -18,13 +18,14 @@ package kops
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"github.com/blang/semver"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kops/pkg/apis/kops/util"
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
var DefaultChannelBase = "https://raw.githubusercontent.com/kubernetes/kops/master/channels/"
|
||||
|
|
|
@ -18,6 +18,7 @@ package model
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
)
|
||||
|
|
|
@ -17,9 +17,10 @@ limitations under the License.
|
|||
package model
|
||||
|
||||
import (
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
)
|
||||
|
||||
// Test_FindSubnet tests FindSubnet
|
||||
|
|
|
@ -18,6 +18,7 @@ package registry
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
api "k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/client/simple"
|
||||
)
|
||||
|
|
|
@ -18,6 +18,7 @@ package registry
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
api "k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
|
|
|
@ -17,8 +17,9 @@ limitations under the License.
|
|||
package kops
|
||||
|
||||
import (
|
||||
"github.com/blang/semver"
|
||||
"testing"
|
||||
|
||||
"github.com/blang/semver"
|
||||
)
|
||||
|
||||
// Test_SemverOrdering is a test of semver ordering, but highlights the case that trips everyone one:
|
||||
|
|
|
@ -17,8 +17,9 @@ limitations under the License.
|
|||
package util
|
||||
|
||||
import (
|
||||
"k8s.io/api/core/v1"
|
||||
"strings"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
func GetNodeRole(node *v1.Node) string {
|
||||
|
|
|
@ -18,11 +18,12 @@ package v1alpha1
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"k8s.io/apimachinery/pkg/conversion"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"k8s.io/apimachinery/pkg/conversion"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
)
|
||||
|
||||
func Convert_v1alpha1_BastionSpec_To_kops_BastionSpec(in *BastionSpec, out *kops.BastionSpec, s conversion.Scope) error {
|
||||
|
|
|
@ -17,9 +17,10 @@ limitations under the License.
|
|||
package validation
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
"net"
|
||||
"net/url"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
)
|
||||
|
||||
// isSubnet checks if child is a subnet of parent
|
||||
|
|
|
@ -18,6 +18,7 @@ package validation
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/apis/kops/util"
|
||||
|
|
|
@ -17,10 +17,11 @@ limitations under the License.
|
|||
package validation
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
)
|
||||
|
||||
func TestDefaultTaintsEnforcedBefore160(t *testing.T) {
|
||||
|
|
|
@ -18,6 +18,7 @@ package apiserver
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/apimachinery/pkg/apimachinery/announced"
|
||||
"k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
|
@ -19,6 +19,7 @@ package vfsclientset
|
|||
// These imports are the API groups the client will support.
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/kops/pkg/kopscodecs"
|
||||
)
|
||||
|
||||
|
|
|
@ -18,8 +18,9 @@ package vfsclientset
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
"os"
|
||||
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
)
|
||||
|
||||
func listChildNames(vfsPath vfs.Path) ([]string, error) {
|
||||
|
|
|
@ -17,8 +17,9 @@ limitations under the License.
|
|||
package diff
|
||||
|
||||
import (
|
||||
"github.com/sergi/go-diff/diffmatchpatch"
|
||||
"testing"
|
||||
|
||||
"github.com/sergi/go-diff/diffmatchpatch"
|
||||
)
|
||||
|
||||
func Test_Diff_1(t *testing.T) {
|
||||
|
|
|
@ -18,6 +18,7 @@ package edit
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/kops/pkg/diff"
|
||||
"k8s.io/kops/pkg/kopscodecs"
|
||||
|
|
|
@ -17,9 +17,10 @@ limitations under the License.
|
|||
package featureflag
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
func TestFlagToFalse(t *testing.T) {
|
||||
|
|
|
@ -17,10 +17,11 @@ limitations under the License.
|
|||
package formatter
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/apis/kops/model"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// InstanceGroupRenderFunction is a render function for an InstanceGroup
|
||||
|
|
|
@ -17,8 +17,9 @@ limitations under the License.
|
|||
package formatter
|
||||
|
||||
import (
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"testing"
|
||||
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
)
|
||||
|
||||
func TestRenderInstanceGroupZones(t *testing.T) {
|
||||
|
|
|
@ -19,6 +19,8 @@ package k8scodecs
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/golang/glog"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/apimachinery/announced"
|
||||
|
@ -27,7 +29,6 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
"os"
|
||||
)
|
||||
|
||||
var Scheme = runtime.NewScheme()
|
||||
|
|
|
@ -17,14 +17,15 @@ limitations under the License.
|
|||
package k8scodecs
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/MakeNowJust/heredoc"
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/kops/pkg/diff"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
// An arbitrary timestamp for testing
|
||||
|
|
|
@ -19,6 +19,8 @@ package kopscodecs
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/apimachinery/pkg/apimachinery/announced"
|
||||
"k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||
|
@ -29,7 +31,6 @@ import (
|
|||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/apis/kops/install"
|
||||
"k8s.io/kops/pkg/apis/kops/v1alpha2"
|
||||
"os"
|
||||
)
|
||||
|
||||
var Scheme = runtime.NewScheme()
|
||||
|
|
|
@ -17,14 +17,15 @@ limitations under the License.
|
|||
package kopscodecs
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/MakeNowJust/heredoc"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/kops/pkg/apis/kops/v1alpha2"
|
||||
"k8s.io/kops/pkg/diff"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
// An arbitrary timestamp for testing
|
||||
|
|
|
@ -18,11 +18,12 @@ package kubeconfig
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/dns"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"sort"
|
||||
)
|
||||
|
||||
func BuildKubecfg(cluster *kops.Cluster, keyStore fi.Keystore, secretStore fi.SecretStore, status kops.StatusStore) (*KubeconfigBuilder, error) {
|
||||
|
|
|
@ -18,8 +18,9 @@ package kubemanifest
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
type ImageRemapFunction func(image string) (string, error)
|
||||
|
|
|
@ -19,6 +19,7 @@ package kubemanifest
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
|
|
@ -18,8 +18,9 @@ package kubemanifest
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
type visitorBase struct {
|
||||
|
|
|
@ -17,11 +17,12 @@ limitations under the License.
|
|||
package awsmodel
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/model"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/awstasks"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func buildMinimalCluster() *kops.Cluster {
|
||||
|
|
|
@ -18,6 +18,7 @@ package components
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/loader"
|
||||
|
|
|
@ -17,9 +17,10 @@ limitations under the License.
|
|||
package model
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_GetELBName32(t *testing.T) {
|
||||
|
|
|
@ -18,11 +18,12 @@ package model
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/dns"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/awstasks"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// DNSModelBuilder builds DNS related model objects
|
||||
|
|
|
@ -18,6 +18,7 @@ package gcemodel
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/gcetasks"
|
||||
|
|
|
@ -18,6 +18,7 @@ package model
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/awstasks"
|
||||
|
|
|
@ -20,8 +20,9 @@ import (
|
|||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"text/template"
|
||||
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
)
|
||||
|
||||
type templateResource struct {
|
||||
|
|
|
@ -25,8 +25,9 @@ import (
|
|||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"io"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
type Certificate struct {
|
||||
|
|
|
@ -26,8 +26,9 @@ import (
|
|||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"io"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
func ParsePEMPrivateKey(data []byte) (*PrivateKey, error) {
|
||||
|
|
|
@ -18,8 +18,9 @@ package pretty
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/MakeNowJust/heredoc"
|
||||
"strings"
|
||||
|
||||
"github.com/MakeNowJust/heredoc"
|
||||
)
|
||||
|
||||
// Bash markdown-quotes a bash command for insertion into help text.
|
||||
|
|
|
@ -19,14 +19,15 @@ package templates
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"io"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
"os"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/util/pkg/vfs"
|
||||
)
|
||||
|
||||
type Templates struct {
|
||||
|
|
|
@ -18,6 +18,7 @@ package aws
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
|
||||
|
|
|
@ -18,12 +18,13 @@ package dns
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const GUARD_BEGIN = "# Begin host entries managed by kops - do not edit"
|
||||
|
|
|
@ -18,6 +18,7 @@ package provider
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/kops/protokube/pkg/gossip/dns"
|
||||
"k8s.io/kubernetes/federation/pkg/dnsprovider"
|
||||
"k8s.io/kubernetes/federation/pkg/dnsprovider/rrstype"
|
||||
|
|
|
@ -18,6 +18,7 @@ package provider
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/kops/protokube/pkg/gossip/dns"
|
||||
"k8s.io/kubernetes/federation/pkg/dnsprovider"
|
||||
)
|
||||
|
|
|
@ -18,10 +18,11 @@ package gce
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
compute "google.golang.org/api/compute/v0.beta"
|
||||
"k8s.io/kops/protokube/pkg/gossip"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type SeedProvider struct {
|
||||
|
|
|
@ -18,12 +18,13 @@ package mesh
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"github.com/weaveworks/mesh"
|
||||
"k8s.io/kops/protokube/pkg/gossip"
|
||||
"net"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/weaveworks/mesh"
|
||||
"k8s.io/kops/protokube/pkg/gossip"
|
||||
)
|
||||
|
||||
type MeshGossiper struct {
|
||||
|
|
|
@ -18,11 +18,12 @@ package mesh
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/weaveworks/mesh"
|
||||
"k8s.io/kops/protokube/pkg/gossip"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// state is an implementation of a LWW map
|
||||
|
|
|
@ -17,9 +17,10 @@ limitations under the License.
|
|||
package protokube
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/dns-controller/pkg/dns"
|
||||
"time"
|
||||
)
|
||||
|
||||
const defaultTTL = time.Minute
|
||||
|
|
|
@ -17,10 +17,11 @@ limitations under the License.
|
|||
package protokube
|
||||
|
||||
import (
|
||||
"k8s.io/kops/protokube/pkg/etcd"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"k8s.io/kops/protokube/pkg/etcd"
|
||||
)
|
||||
|
||||
func getIDs(volumes []*Volume) string {
|
||||
|
|
|
@ -21,14 +21,15 @@ package protokube
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"io/ioutil"
|
||||
etcdmanager "k8s.io/kops/protokube/pkg/etcd"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/vsphere"
|
||||
"net"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
etcdmanager "k8s.io/kops/protokube/pkg/etcd"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/vsphere"
|
||||
)
|
||||
|
||||
const VolumeMetaDataFile = "/vol-metadata/metadata.json"
|
||||
|
|
|
@ -17,10 +17,11 @@ limitations under the License.
|
|||
package codecs
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"k8s.io/kops/pkg/apis/kops/v1alpha2"
|
||||
"k8s.io/kops/pkg/diff"
|
||||
"k8s.io/kops/pkg/kopscodecs"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSerializeEmptyCluster(t *testing.T) {
|
||||
|
|
|
@ -17,11 +17,12 @@ limitations under the License.
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/blang/semver"
|
||||
"io/ioutil"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/blang/semver"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
)
|
||||
|
||||
// TestKopsUpgrades tests the version logic for kops versions
|
||||
|
|
|
@ -19,6 +19,10 @@ package main
|
|||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"path"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
|
@ -26,9 +30,6 @@ import (
|
|||
"k8s.io/kops/pkg/apis/kops/v1alpha2"
|
||||
"k8s.io/kops/pkg/diff"
|
||||
"k8s.io/kops/pkg/kopscodecs"
|
||||
"path"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestConversionMinimal runs the test on a minimum configuration, similar to kops create cluster minimal.example.com --zones us-west-1a
|
||||
|
|
|
@ -18,8 +18,9 @@ package assettasks
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"os/exec"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// dockerCLI encapsulates access to docker via the CLI
|
||||
|
|
|
@ -17,8 +17,9 @@ limitations under the License.
|
|||
package fi
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"reflect"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// An important part of our state synchronization is to compare two tasks, to see what has changed
|
||||
|
|
|
@ -17,8 +17,9 @@ limitations under the License.
|
|||
package awstasks
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"sort"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
)
|
||||
|
||||
type cloudformationTag struct {
|
||||
|
|
|
@ -19,6 +19,8 @@ package awstasks
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/golang/glog"
|
||||
|
@ -26,7 +28,6 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/cloudformation"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/terraform"
|
||||
"strings"
|
||||
)
|
||||
|
||||
//go:generate fitask -type=DHCPOptions
|
||||
|
|
|
@ -19,6 +19,11 @@ package awstasks
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"math/rand"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/route53"
|
||||
"github.com/golang/glog"
|
||||
|
@ -26,10 +31,6 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/cloudformation"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/terraform"
|
||||
"math/rand"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// DNSZone is a zone object in a dns provider
|
||||
|
|
|
@ -21,6 +21,9 @@ import (
|
|||
|
||||
"encoding/json"
|
||||
|
||||
"net/url"
|
||||
"reflect"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/service/iam"
|
||||
|
@ -30,8 +33,6 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/cloudformation"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/terraform"
|
||||
"net/url"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
//go:generate fitask -type=IAMRole
|
||||
|
|
|
@ -20,6 +20,8 @@ import (
|
|||
"fmt"
|
||||
|
||||
"encoding/json"
|
||||
"net/url"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/service/iam"
|
||||
|
@ -29,7 +31,6 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/cloudformation"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/terraform"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
//go:generate fitask -type=IAMRolePolicy
|
||||
|
|
|
@ -20,13 +20,14 @@ import (
|
|||
"fmt"
|
||||
|
||||
"encoding/base64"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/terraform"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const MaxUserDataSize = 16384
|
||||
|
|
|
@ -19,6 +19,10 @@ package awstasks
|
|||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/autoscaling"
|
||||
"github.com/golang/glog"
|
||||
|
@ -27,9 +31,6 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/cloudformation"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/terraform"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
//go:generate fitask -type=LaunchConfiguration
|
||||
|
|
|
@ -19,6 +19,8 @@ package awstasks
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/golang/glog"
|
||||
|
@ -27,7 +29,6 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/cloudformation"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/terraform"
|
||||
"strings"
|
||||
)
|
||||
|
||||
//go:generate fitask -type=SecurityGroupRule
|
||||
|
|
|
@ -18,6 +18,8 @@ package awsup
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
|
@ -26,7 +28,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go/service/elb"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"os"
|
||||
)
|
||||
|
||||
// allRegions is the list of all regions; tests will set the values
|
||||
|
|
|
@ -17,10 +17,11 @@ limitations under the License.
|
|||
package awsup
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestValidateRegion(t *testing.T) {
|
||||
|
|
|
@ -18,6 +18,7 @@ package awsup
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
)
|
||||
|
|
|
@ -18,10 +18,11 @@ package awsup
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/golang/glog"
|
||||
"time"
|
||||
)
|
||||
|
||||
// LoggingRetryer adds some logging when we are retrying, so we have some idea what is happening
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue