Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Rewrite kope.io/etcd-manager to sigs.k8s.io/etcdadm/etcd-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsb committed Sep 2, 2020
1 parent 02c718d commit 2397769
Show file tree
Hide file tree
Showing 344 changed files with 447 additions and 447 deletions.
2 changes: 1 addition & 1 deletion etcd-manager/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@bazel_gazelle//:def.bzl", "gazelle")
gazelle(
name = "gazelle",
external = "vendored",
prefix = "kope.io/etcd-manager",
prefix = "sigs.k8s.io/etcdadm/etcd-manager",
)

[genrule(
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/cmd/etcd-backup-ctl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "kope.io/etcd-manager/cmd/etcd-backup-ctl",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/cmd/etcd-backup-ctl",
visibility = ["//visibility:private"],
deps = [
"//pkg/backup:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/cmd/etcd-backup-ctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"os"

"k8s.io/klog"
"kope.io/etcd-manager/pkg/backup"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/backup"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/cmd/etcd-backup/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "kope.io/etcd-manager/cmd/etcd-backup",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/cmd/etcd-backup",
visibility = ["//visibility:private"],
deps = [
"//pkg/backup:go_default_library",
Expand Down
4 changes: 2 additions & 2 deletions etcd-manager/cmd/etcd-backup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"time"

"k8s.io/klog"
"kope.io/etcd-manager/pkg/backup"
"kope.io/etcd-manager/pkg/backupcontroller"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/backup"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/backupcontroller"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/cmd/etcd-dump/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "kope.io/etcd-manager/cmd/etcd-dump",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/cmd/etcd-dump",
visibility = ["//visibility:private"],
deps = [
"//pkg/backup:go_default_library",
Expand Down
8 changes: 4 additions & 4 deletions etcd-manager/cmd/etcd-dump/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
"time"

"k8s.io/klog"
"kope.io/etcd-manager/pkg/backup"
"kope.io/etcd-manager/pkg/etcd"
"kope.io/etcd-manager/pkg/etcd/dump"
"kope.io/etcd-manager/pkg/etcdclient"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/backup"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/etcd/dump"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/etcdclient"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/cmd/etcd-manager-ctl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "kope.io/etcd-manager/cmd/etcd-manager-ctl",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/cmd/etcd-manager-ctl",
visibility = ["//visibility:private"],
deps = [
"//pkg/apis/etcd:go_default_library",
Expand Down
6 changes: 3 additions & 3 deletions etcd-manager/cmd/etcd-manager-ctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (

"github.com/golang/protobuf/proto"
"k8s.io/klog"
protoetcd "kope.io/etcd-manager/pkg/apis/etcd"
"kope.io/etcd-manager/pkg/backup"
"kope.io/etcd-manager/pkg/commands"
protoetcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/backup"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/commands"
)

const DefaultEtcdVersion = "3.2.24"
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/cmd/etcd-manager/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "kope.io/etcd-manager/cmd/etcd-manager",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/cmd/etcd-manager",
visibility = ["//visibility:private"],
deps = [
"//pkg/apis/etcd:go_default_library",
Expand Down
42 changes: 21 additions & 21 deletions etcd-manager/cmd/etcd-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,27 @@ import (

"k8s.io/klog"
"k8s.io/kops/util/pkg/vfs"
apis_etcd "kope.io/etcd-manager/pkg/apis/etcd"
"kope.io/etcd-manager/pkg/backup"
"kope.io/etcd-manager/pkg/commands"
"kope.io/etcd-manager/pkg/controller"
"kope.io/etcd-manager/pkg/etcd"
"kope.io/etcd-manager/pkg/hosts"
"kope.io/etcd-manager/pkg/legacy"
"kope.io/etcd-manager/pkg/locking"
"kope.io/etcd-manager/pkg/pki"
"kope.io/etcd-manager/pkg/privateapi"
"kope.io/etcd-manager/pkg/privateapi/discovery"
vfsdiscovery "kope.io/etcd-manager/pkg/privateapi/discovery/vfs"
"kope.io/etcd-manager/pkg/tlsconfig"
"kope.io/etcd-manager/pkg/urls"
"kope.io/etcd-manager/pkg/volumes"
"kope.io/etcd-manager/pkg/volumes/alicloud"
"kope.io/etcd-manager/pkg/volumes/aws"
"kope.io/etcd-manager/pkg/volumes/do"
"kope.io/etcd-manager/pkg/volumes/external"
"kope.io/etcd-manager/pkg/volumes/gce"
"kope.io/etcd-manager/pkg/volumes/openstack"
apis_etcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/backup"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/commands"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/controller"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/hosts"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/legacy"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/locking"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/pki"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/privateapi"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/privateapi/discovery"
vfsdiscovery "sigs.k8s.io/etcdadm/etcd-manager/pkg/privateapi/discovery/vfs"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/tlsconfig"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/urls"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/volumes"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/volumes/alicloud"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/volumes/aws"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/volumes/do"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/volumes/external"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/volumes/gce"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/volumes/openstack"
)

type stringSliceFlag []string
Expand Down
4 changes: 2 additions & 2 deletions etcd-manager/dev/add-symlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#!/bin/bash -e

pushd pkg/privateapi/
ln -sf ../../bazel-bin/pkg/privateapi/linux_amd64_stripped/privateapi_go_proto~/kope.io/etcd-manager/pkg/privateapi/cluster.pb.go
ln -sf ../../bazel-bin/pkg/privateapi/linux_amd64_stripped/privateapi_go_proto~/sigs.k8s.io/etcdadm/etcd-manager/pkg/privateapi/cluster.pb.go
popd

pushd pkg/apis/etcd/
ln -sf ../../../bazel-bin/pkg/apis/etcd/linux_amd64_stripped/etcd_go_proto~/kope.io/etcd-manager/pkg/apis/etcd/etcdapi.pb.go
ln -sf ../../../bazel-bin/pkg/apis/etcd/linux_amd64_stripped/etcd_go_proto~/sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd/etcdapi.pb.go
popd
2 changes: 1 addition & 1 deletion etcd-manager/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module kope.io/etcd-manager
module sigs.k8s.io/etcdadm/etcd-manager

go 1.12

Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/pkg/apis/etcd/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go_library(
"etcdapi.pb.go",
"json.go",
],
importpath = "kope.io/etcd-manager/pkg/apis/etcd",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd",
visibility = ["//visibility:public"],
deps = [
"//vendor/github.com/golang/protobuf/jsonpb:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/pkg/apis/etcd/etcdapi.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package etcd;

option go_package = "kope.io/etcd-manager/pkg/apis/etcd";
option go_package = "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd";

message ClusterSpec {
int32 member_count = 1;
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/pkg/backup/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go_library(
"store.go",
"vfs.go",
],
importpath = "kope.io/etcd-manager/pkg/backup",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/pkg/backup",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/etcd:go_default_library",
Expand Down
6 changes: 3 additions & 3 deletions etcd-manager/pkg/backup/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
"time"

"k8s.io/klog"
"kope.io/etcd-manager/pkg/apis/etcd"
protoetcd "kope.io/etcd-manager/pkg/apis/etcd"
"kope.io/etcd-manager/pkg/ioutils"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
protoetcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/ioutils"
)

func NewFilesystemStore(u *url.URL) (*filesystemStore, error) {
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/pkg/backup/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package backup

import (
"k8s.io/kops/util/pkg/vfs"
"kope.io/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
)

const MetaFilename = "_etcd_backup.meta"
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/pkg/backup/vfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"k8s.io/klog"
"k8s.io/kops/util/pkg/vfs"
"kope.io/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
)

func NewVFSStore(p vfs.Path) (Store, error) {
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/pkg/backupcontroller/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go_library(
"controller.go",
"parse.go",
],
importpath = "kope.io/etcd-manager/pkg/backupcontroller",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/pkg/backupcontroller",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/etcd:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/pkg/backupcontroller/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"k8s.io/klog"

"kope.io/etcd-manager/pkg/backup"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/backup"
)

// HourlyBackupsRetention controls how long hourly backups are kept.
Expand Down
10 changes: 5 additions & 5 deletions etcd-manager/pkg/backupcontroller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"time"

"k8s.io/klog"
protoetcd "kope.io/etcd-manager/pkg/apis/etcd"
"kope.io/etcd-manager/pkg/backup"
"kope.io/etcd-manager/pkg/contextutil"
"kope.io/etcd-manager/pkg/etcd"
"kope.io/etcd-manager/pkg/etcdclient"
protoetcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/backup"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/contextutil"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/etcdclient"
)

const loopInterval = time.Minute
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/pkg/commands/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go_library(
"store.go",
"vfs.go",
],
importpath = "kope.io/etcd-manager/pkg/commands",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/pkg/commands",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/etcd:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/pkg/commands/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package commands

import (
"k8s.io/kops/util/pkg/vfs"
protoetcd "kope.io/etcd-manager/pkg/apis/etcd"
protoetcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
)

const CommandFilename = "_command.json"
Expand Down
4 changes: 2 additions & 2 deletions etcd-manager/pkg/commands/vfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (

"k8s.io/klog"
"k8s.io/kops/util/pkg/vfs"
"kope.io/etcd-manager/pkg/apis/etcd"
protoetcd "kope.io/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
protoetcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
)

const EtcdClusterCreated = "etcd-cluster-created"
Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/pkg/contextutil/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["poll.go"],
importpath = "kope.io/etcd-manager/pkg/contextutil",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/pkg/contextutil",
visibility = ["//visibility:public"],
deps = ["//vendor/k8s.io/klog:go_default_library"],
)
2 changes: 1 addition & 1 deletion etcd-manager/pkg/controller/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ go_library(
"upgrade.go",
"utils.go",
],
importpath = "kope.io/etcd-manager/pkg/controller",
importpath = "sigs.k8s.io/etcdadm/etcd-manager/pkg/controller",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/etcd:go_default_library",
Expand Down
4 changes: 2 additions & 2 deletions etcd-manager/pkg/controller/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"time"

"k8s.io/klog"
protoetcd "kope.io/etcd-manager/pkg/apis/etcd"
"kope.io/etcd-manager/pkg/commands"
protoetcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/commands"
)

func (m *EtcdController) InvalidateControlStore() error {
Expand Down
24 changes: 12 additions & 12 deletions etcd-manager/pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ import (

"github.com/golang/protobuf/proto"
"k8s.io/klog"
protoetcd "kope.io/etcd-manager/pkg/apis/etcd"
"kope.io/etcd-manager/pkg/backup"
"kope.io/etcd-manager/pkg/backupcontroller"
"kope.io/etcd-manager/pkg/commands"
"kope.io/etcd-manager/pkg/contextutil"
"kope.io/etcd-manager/pkg/etcd"
"kope.io/etcd-manager/pkg/etcdclient"
"kope.io/etcd-manager/pkg/etcdversions"
"kope.io/etcd-manager/pkg/locking"
"kope.io/etcd-manager/pkg/pki"
"kope.io/etcd-manager/pkg/privateapi"
"kope.io/etcd-manager/pkg/urls"
protoetcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/backup"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/backupcontroller"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/commands"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/contextutil"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/etcdclient"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/etcdversions"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/locking"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/pki"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/privateapi"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/urls"
)

const removeUnhealthyDeadline = time.Minute // TODO: increase
Expand Down
6 changes: 3 additions & 3 deletions etcd-manager/pkg/controller/etcdclusterstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"fmt"

"k8s.io/klog"
protoetcd "kope.io/etcd-manager/pkg/apis/etcd"
"kope.io/etcd-manager/pkg/etcdclient"
"kope.io/etcd-manager/pkg/privateapi"
protoetcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/etcdclient"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/privateapi"
)

type EtcdMemberId string
Expand Down
4 changes: 2 additions & 2 deletions etcd-manager/pkg/controller/newcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

"github.com/golang/protobuf/proto"
"k8s.io/klog"
protoetcd "kope.io/etcd-manager/pkg/apis/etcd"
"kope.io/etcd-manager/pkg/urls"
protoetcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/urls"
)

// createNewCluster starts a new etcd cluster.
Expand Down
4 changes: 2 additions & 2 deletions etcd-manager/pkg/controller/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"context"
"fmt"

protoetcd "kope.io/etcd-manager/pkg/apis/etcd"
"kope.io/etcd-manager/pkg/privateapi"
protoetcd "sigs.k8s.io/etcdadm/etcd-manager/pkg/apis/etcd"
"sigs.k8s.io/etcdadm/etcd-manager/pkg/privateapi"
)

type peer struct {
Expand Down
Loading

0 comments on commit 2397769

Please sign in to comment.