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

Commit

Permalink
Revert "Merge pull request vitessio#5703 from carsonoid/kubernetestopo"
Browse files Browse the repository at this point in the history
This reverts commit f97eef3, reversing
changes made to 9e74b07.

Signed-off-by: Andrew Mason <amason@slack-corp.com>
  • Loading branch information
ajm188 committed Jun 22, 2020
1 parent fd3d73f commit 257355a
Show file tree
Hide file tree
Showing 57 changed files with 213 additions and 3,587 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/local_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ on: [push, pull_request]
jobs:

build:
name: Local example using ${{ matrix.topo }} on ${{ matrix.os }}
name: Local Example on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
topo: [etcd,k8s]

steps:

Expand Down Expand Up @@ -45,7 +44,6 @@ jobs:
- name: local_example
timeout-minutes: 30
run: |
export TOPO=${{matrix.topo}}
if [ ${{matrix.os}} = "macos-latest" ]; then
export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
fi
Expand Down
22 changes: 0 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -314,25 +314,3 @@ minimaltools:

dependency_check:
./tools/dependency_check.sh

GEN_BASE_DIR ?= ./go/vt/topo/k8stopo

client_go_gen:
echo $$(date): Regenerating client-go code
# Delete and re-generate the deepcopy types
find $(GEN_BASE_DIR)/apis/topo/v1beta1 -type f -name 'zz_generated*' -exec rm '{}' \;
deepcopy-gen -i $(GEN_BASE_DIR)/apis/topo/v1beta1 -O zz_generated.deepcopy -o ./ --bounding-dirs $(GEN_BASE_DIR)/apis --go-header-file $(GEN_BASE_DIR)/boilerplate.go.txt

# Delete, generate, and move the client libraries
rm -rf go/vt/topo/k8stopo/client

# There is no way to get client-gen to automatically put files in the right place and still have the right import path so we generate and move them

# Generate client, informers, and listers
client-gen -o ./ --input 'topo/v1beta1' --clientset-name versioned --input-base 'vitess.io/vitess/go/vt/topo/k8stopo/apis/' -i vitess.io/vitess --output-package vitess.io/vitess/go/vt/topo/k8stopo/client/clientset --go-header-file $(GEN_BASE_DIR)/boilerplate.go.txt
lister-gen -o ./ --input-dirs vitess.io/vitess/go/vt/topo/k8stopo/apis/topo/v1beta1 --output-package vitess.io/vitess/go/vt/topo/k8stopo/client/listers --go-header-file $(GEN_BASE_DIR)/boilerplate.go.txt
informer-gen -o ./ --input-dirs vitess.io/vitess/go/vt/topo/k8stopo/apis/topo/v1beta1 --versioned-clientset-package vitess.io/vitess/go/vt/topo/k8stopo/client/clientset/versioned --listers-package vitess.io/vitess/go/vt/topo/k8stopo/client/listers --output-package vitess.io/vitess/go/vt/topo/k8stopo/client/informers --go-header-file $(GEN_BASE_DIR)/boilerplate.go.txt

# Move and cleanup
mv vitess.io/vitess/go/vt/topo/k8stopo/client go/vt/topo/k8stopo/
rmdir -p vitess.io/vitess/go/vt/topo/k8stopo/
26 changes: 0 additions & 26 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,32 +166,6 @@ function install_etcd() {
command -v etcd && echo "etcd already installed" || install_dep "etcd" "v3.3.10" "$VTROOT/dist/etcd" install_etcd


# Download and install k3s, link k3s binary into our root
function install_k3s() {
local version="$1"
local dist="$2"

case $(uname) in
Linux) local platform=linux;;
*) echo "WARNING: unsupported platform. K3s only supports running on Linux, the k8s topology will not be available for local examples."; return;;
esac

case $(get_arch) in
aarch64) local target="-arm64";;
x86_64) local target="";;
*) echo "WARNING: unsupported architecture, the k8s topology will not be available for local examples."; return;;
esac

download_url=https://github.com/rancher/k3s/releases/download
file="k3s${target}"

local dest="$dist/k3s${target}-${version}-${platform}"
wget -O $dest "$download_url/$version/$file"
chmod +x $dest
ln -snf $dest "$VTROOT/bin/k3s"
}
command -v k3s || install_dep "k3s" "v1.0.0" "$VTROOT/dist/k3s" install_k3s

# Download and install consul, link consul binary into our root.
function install_consul() {
local version="$1"
Expand Down
4 changes: 1 addition & 3 deletions examples/local/101_initial_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ source ./env.sh

# start topo server
if [ "${TOPO}" = "zk2" ]; then
CELL=zone1 ./scripts/zk-up.sh
elif [ "${TOPO}" = "k8s" ]; then
CELL=zone1 ./scripts/k3s-up.sh
CELL=zone1 ./scripts/zk-up.sh
else
CELL=zone1 ./scripts/etcd-up.sh
fi
Expand Down
4 changes: 1 addition & 3 deletions examples/local/401_teardown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ done
./scripts/vtctld-down.sh

if [ "${TOPO}" = "zk2" ]; then
CELL=zone1 ./scripts/zk-down.sh
elif [ "${TOPO}" = "k8s" ]; then
CELL=zone1 ./scripts/k3s-down.sh
CELL=zone1 ./scripts/zk-down.sh
else
CELL=zone1 ./scripts/etcd-down.sh
fi
Expand Down
10 changes: 2 additions & 8 deletions examples/local/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,12 @@ if [ "${TOPO}" = "zk2" ]; then
# shellcheck disable=SC2034
TOPOLOGY_FLAGS="-topo_implementation zk2 -topo_global_server_address ${ZK_SERVER} -topo_global_root /vitess/global"

mkdir -p "${VTDATAROOT}/tmp"
elif [ "${TOPO}" = "k8s" ]; then
# Set topology environment parameters.
K8S_ADDR="localhost"
K8S_PORT="8443"
K8S_KUBECONFIG=$VTDATAROOT/tmp/k8s.kubeconfig
# shellcheck disable=SC2034
TOPOLOGY_FLAGS="-topo_implementation k8s -topo_k8s_kubeconfig ${K8S_KUBECONFIG} -topo_global_server_address ${K8S_ADDR}:${K8S_PORT} -topo_global_root /vitess/global"
mkdir -p $VTDATAROOT/tmp
else
ETCD_SERVER="localhost:2379"
TOPOLOGY_FLAGS="-topo_implementation etcd2 -topo_global_server_address $ETCD_SERVER -topo_global_root /vitess/global"

mkdir -p "${VTDATAROOT}/tmp"
mkdir -p "${VTDATAROOT}/etcd"
fi

Expand Down
30 changes: 0 additions & 30 deletions examples/local/scripts/k3s-down.sh

This file was deleted.

60 changes: 0 additions & 60 deletions examples/local/scripts/k3s-up.sh

This file was deleted.

21 changes: 0 additions & 21 deletions examples/local/topo-k8s.sh

This file was deleted.

45 changes: 20 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ require (
github.com/Azure/azure-storage-blob-go v0.8.0
github.com/Azure/go-autorest/autorest/adal v0.8.1 // indirect
github.com/GeertJohan/go.rice v1.0.0
github.com/PuerkitoBio/goquery v1.5.1
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 // indirect
github.com/aws/aws-sdk-go v1.28.8
github.com/buger/jsonparser v0.0.0-20200322175846-f7e751efca13
github.com/bombsimon/wsl v1.2.8 // indirect
github.com/cespare/xxhash/v2 v2.1.1
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd // indirect
github.com/coreos/bbolt v1.3.2 // indirect
github.com/coreos/etcd v3.3.10+incompatible
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/corpix/uarand v0.1.1 // indirect
github.com/dchest/safefile v0.0.0-20151022103144-855e8d98f185 // indirect
github.com/evanphx/json-patch v4.5.0+incompatible
github.com/go-critic/go-critic v0.4.0 // indirect
github.com/go-sql-driver/mysql v1.5.0
github.com/gogo/protobuf v1.3.1
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
Expand All @@ -27,31 +28,24 @@ require (
github.com/golang/protobuf v1.3.2
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db
github.com/google/go-cmp v0.4.0
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf // indirect
github.com/gorilla/websocket v1.4.0
github.com/gostaticanalysis/analysisutil v0.0.3 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/hashicorp/consul v1.5.1
github.com/hashicorp/consul/api v1.1.0
github.com/hashicorp/go-msgpack v0.5.5 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/hashicorp/memberlist v0.1.4 // indirect
github.com/hashicorp/serf v0.8.5 // indirect
github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428
github.com/imdario/mergo v0.3.6 // indirect
github.com/klauspost/compress v1.4.1 // indirect
github.com/klauspost/cpuid v1.2.0 // indirect
github.com/klauspost/crc32 v1.2.0 // indirect
github.com/klauspost/pgzip v1.2.4
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/krishicks/yaml-patch v0.0.10
github.com/magiconair/properties v1.8.1
github.com/mattn/go-isatty v0.0.11 // indirect
github.com/mattn/go-runewidth v0.0.1 // indirect
github.com/minio/minio-go v0.0.0-20190131015406-c8a261de75c1
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.0 // indirect
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5
github.com/onsi/ginkgo v1.10.3 // indirect
github.com/onsi/gomega v1.7.1 // indirect
github.com/olekukonko/tablewriter v0.0.0-20160115111002-cca8bbc07984
github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02
github.com/opentracing/opentracing-go v1.1.0
github.com/pborman/uuid v1.2.0
Expand All @@ -61,7 +55,11 @@ require (
github.com/prometheus/client_golang v1.4.1
github.com/prometheus/common v0.9.1
github.com/satori/go.uuid v0.0.0-20160713180306-0aa62d5ddceb // indirect
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/securego/gosec v0.0.0-20191217083152-cb4f343eaff1 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.6.1 // indirect
github.com/stretchr/testify v1.4.0
github.com/tchap/go-patricia v0.0.0-20160729071656-dd168db6051b
github.com/tebeka/selenium v0.9.9
Expand All @@ -71,10 +69,11 @@ require (
github.com/uber/jaeger-client-go v2.16.0+incompatible
github.com/uber/jaeger-lib v2.0.0+incompatible // indirect
github.com/ugorji/go v1.1.7 // indirect
github.com/uudashr/gocognit v1.0.1 // indirect
github.com/z-division/go-zookeeper v0.0.0-20190128072838-6d7457066b9b
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
golang.org/x/lint v0.0.0-20190409202823-959b441ac422
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
golang.org/x/net v0.0.0-20190926025831-c00fd9afed17
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/text v0.3.2
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
Expand All @@ -83,13 +82,9 @@ require (
google.golang.org/genproto v0.0.0-20190926190326-7ee9db18f195 // indirect
google.golang.org/grpc v1.24.0
gopkg.in/DataDog/dd-trace-go.v1 v1.17.0
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/ini.v1 v1.51.0 // indirect
gopkg.in/ldap.v2 v2.5.0
gotest.tools v2.2.0+incompatible
honnef.co/go/tools v0.0.1-2019.2.3
k8s.io/apiextensions-apiserver v0.17.3
k8s.io/apimachinery v0.17.3
k8s.io/client-go v0.17.3
sigs.k8s.io/yaml v1.1.0
mvdan.cc/unparam v0.0.0-20191111180625-960b1ec0f2c2 // indirect
sourcegraph.com/sqs/pbtypes v1.0.0 // indirect
vitess.io/vitess/examples/are-you-alive v0.0.0-20200302220708-6b7695375ce9 // indirect
)
Loading

0 comments on commit 257355a

Please sign in to comment.