From 8e709e5c428b3797aae6e5730ceb80dd78bb33a3 Mon Sep 17 00:00:00 2001 From: Murilo Pereira Date: Tue, 29 Oct 2019 14:47:42 +0100 Subject: [PATCH] Add initial test structure. (#3) * Create initial testing structure and tests. * Build docker image. * Format with `goimports -w .`. * Get operator name from environment variable. * Script improvements. * Document command for building Docker images. * Add usage to uninstall_operator.sh script. * Add tooling to check formatting and format go code. * Update data-services-kudo module to the latest master. --- .gitignore | 1 + README.md | 20 +- images/build.sh | 26 ++ metadata.sh | 49 ++- operator/operator.yaml | 2 +- run-tests.sh | 34 ++ scripts/README.md | 7 + scripts/uninstall_kudo_cassandra.sh | 63 --- scripts/uninstall_operator.sh | 102 +++++ shared | 2 +- templates/operator/operator.yaml.template | 2 +- tests/go.mod | 20 + tests/go.sum | 398 ++++++++++++++++++ tests/run.sh | 39 ++ tests/suites/simple_install_uninstall_test.go | 68 +++ tests/suites/suites.go | 1 + tests/utils/cmd/cmd.go | 63 +++ tests/utils/k8s/k8s.go | 63 +++ tests/utils/kubectl/kubectl.go | 144 +++++++ tests/utils/kudo/kudo.go | 249 +++++++++++ tests/utils/utils.go | 1 + tools/README.md | 19 + tools/check_files.sh | 21 +- tools/clean_go_caches.sh | 6 + tools/compile_templates.sh | 25 +- tools/format_files.sh | 15 +- 26 files changed, 1346 insertions(+), 94 deletions(-) create mode 100644 .gitignore create mode 100755 images/build.sh create mode 100755 run-tests.sh create mode 100644 scripts/README.md delete mode 100755 scripts/uninstall_kudo_cassandra.sh create mode 100755 scripts/uninstall_operator.sh create mode 100644 tests/go.mod create mode 100644 tests/go.sum create mode 100755 tests/run.sh create mode 100644 tests/suites/simple_install_uninstall_test.go create mode 100644 tests/suites/suites.go create mode 100644 tests/utils/cmd/cmd.go create mode 100644 tests/utils/k8s/k8s.go create mode 100644 tests/utils/kubectl/kubectl.go create mode 100644 tests/utils/kudo/kudo.go create mode 100644 tests/utils/utils.go create mode 100644 tools/README.md create mode 100755 tools/clean_go_caches.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a4054764 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*-junit.xml diff --git a/README.md b/README.md index 612cc744..aeb437c1 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,11 @@ - [Docker daemon running under a non-root user](https://docs.docker.com/install/linux/linux-postinstall/) (only for Linux) -- [KUDO](https://github.com/kudobuilder/kudo/releases) (last tested on 0.7.2) -- Kubernetes cluster (last tested on [Konvoy - v1.1.5](https://github.com/mesosphere/konvoy/releases)) +- [KUDO](https://github.com/kudobuilder/kudo/releases) (check `KUDO_VERSION` in + `metadata.sh` to see the last tested version) +- Kubernetes cluster (last tested on + [Konvoy](https://github.com/mesosphere/konvoy/releases)) (check + `KUBERNETES_VERSION` in `metadata.sh` to see the last tested version) ## Installing @@ -96,16 +98,19 @@ kubectl exec "${kudo_cassandra_pod_0}" \ ### Uninstalling the KUDO Cassandra operator ```bash -./scripts/uninstall_kudo_cassandra.sh \ +./scripts/uninstall_operator.sh \ --instance "${kudo_cassandra_instance_name}" \ --namespace "${kudo_cassandra_instance_namespace}" ``` ## Development -### Requirements +### Additional requirements -- [bash 4](https://www.tldp.org/LDP/abs/html/bashver4.html) +- bash 4+ ([macOS](https://formulae.brew.sh/formula/bash)) +- envsubst ([macOS](https://formulae.brew.sh/formula/gettext)) +- [shellcheck](https://www.shellcheck.net/) +- [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) ### Compiling templates @@ -127,9 +132,10 @@ kubectl exec "${kudo_cassandra_pod_0}" \ ./tools/check_files.sh ``` -### Building Docker image +### Building Docker images ```bash +./images/build.sh ``` ### Running tests diff --git a/images/build.sh b/images/build.sh new file mode 100755 index 00000000..95bb1029 --- /dev/null +++ b/images/build.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2039 + +set -euxo pipefail + +readonly script_directory="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +readonly project_directory="$(readlink -f "${script_directory}/..")" + +# shellcheck source=../metadata.sh +source "${project_directory}/metadata.sh" + +readonly cassandra_docker_image="${CASSANDRA_DOCKER_IMAGE:-}" + +if [[ -z ${cassandra_docker_image} ]]; then + echo "Missing CASSANDRA_DOCKER_IMAGE" >&2 + exit 1 +fi + +docker image build \ + -t "${cassandra_docker_image}" \ + -f "${project_directory}/images/Dockerfile" \ + "${project_directory}/images" + +if [[ "${1:-}" == "push" ]]; then + docker push "${cassandra_docker_image}" +fi diff --git a/metadata.sh b/metadata.sh index b66ef08e..6ae6bcfe 100644 --- a/metadata.sh +++ b/metadata.sh @@ -1,14 +1,55 @@ #!/usr/bin/env bash -# https://github.com/kudobuilder/kudo/releases/tag/v0.6.0 -export KUDO_VERSION="0.7.2" +# This script contains metadata that is either used in other scripts or expanded +# into templates via `tools/compile_templates.sh`. + +# "Shadowing" these two environment variables so that they don't affect +# similarly named environment variables in other scripts loading this script. +_script_directory="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +_project_directory="$(readlink -f "${_script_directory}")" + +################################################################################ +################################# Operator ##################################### +################################################################################ + +# https://github.com/mesosphere/kudo-cassandra-operator + +export PROJECT_NAME="kudo-cassandra-operator" +export OPERATOR_NAME="cassandra" + +# KUDO still doesn't support snapshots, or compound versions yet. Check out: +# - https://github.com/kudobuilder/kudo/pull/889 +# - https://github.com/kudobuilder/kudo/issues/163 +export OPERATOR_VERSION="0.1.0" + +export OPERATOR_DIRECTORY="${_project_directory}/operator" +export VENDOR_DIRECTORY="${_project_directory}/shared/vendor" + +################################################################################ +############################### Dependencies ################################### +################################################################################ # http://www.apache.org/dyn/closer.lua/cassandra/3.11.4 # https://hub.docker.com/_/cassandra # https://github.com/docker-library/cassandra/blob/master/3.11/Dockerfile export CASSANDRA_VERSION="3.11.4" -# https://github.com/mesosphere/kudo-cassandra-operator/releases -export KUDO_CASSANDRA_VERSION="0.1.0" +# https://github.com/kudobuilder/kudo/releases/tag/v0.7.4 +export KUDO_VERSION="0.7.4" export KUBERNETES_VERSION="1.15.0" + +################################################################################ +############################## Docker images ################################### +################################################################################ + +export CASSANDRA_DOCKER_IMAGE_NAMESPACE="mesosphere" +export CASSANDRA_DOCKER_IMAGE_NAME="${OPERATOR_NAME}" +export CASSANDRA_DOCKER_IMAGE_TAG="${OPERATOR_VERSION}-${CASSANDRA_VERSION}" +export CASSANDRA_DOCKER_IMAGE="${CASSANDRA_DOCKER_IMAGE_NAMESPACE}/${CASSANDRA_DOCKER_IMAGE_NAME}:${CASSANDRA_DOCKER_IMAGE_TAG}" + +################################################################################ +################################# Testing ###################################### +################################################################################ + +export INTEGRATION_TESTS_DOCKER_IMAGE="golang:1.13.1-stretch" diff --git a/operator/operator.yaml b/operator/operator.yaml index 8d832bbb..8a0ec4a8 100644 --- a/operator/operator.yaml +++ b/operator/operator.yaml @@ -1,6 +1,6 @@ name: "cassandra" version: "0.1.0" -kudoVersion: "0.7.2" +kudoVersion: "0.7.4" kubernetesVersion: "1.15.0" appVersion: "3.11.4" maintainers: diff --git a/run-tests.sh b/run-tests.sh new file mode 100755 index 00000000..daddb24a --- /dev/null +++ b/run-tests.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2039 + +set -euxo pipefail + +readonly script_directory="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +readonly project_directory="$(readlink -f "${script_directory}")" + +# shellcheck source=metadata.sh +source "${project_directory}/metadata.sh" + +readonly kubeconfig="${KUBECONFIG:-${HOME}/.kube/config}" + +readonly container_kubeconfig="/root/.kube/config" +readonly container_project_directory="/${PROJECT_NAME}" +readonly container_operator_directory="${container_project_directory}/operator" +readonly container_vendor_directory="${container_project_directory}/shared/vendor" + +# Note: DS_KUDO_VERSION is used by the shared data-services-kudo tooling. + +docker run \ + --rm \ + -e "KUBECONFIG=${container_kubeconfig}" \ + -e "KUBECTL_PATH=${container_vendor_directory}/kubectl.sh" \ + -e "DS_KUDO_VERSION=v${KUDO_VERSION}" \ + -e "OPERATOR_DIRECTORY=${container_operator_directory}" \ + -e "VENDOR_DIRECTORY=${container_vendor_directory}" \ + -v "${kubeconfig}:${container_kubeconfig}:ro" \ + -v "${OPERATOR_DIRECTORY}:${container_operator_directory}:ro" \ + -v "${project_directory}:${container_project_directory}" \ + -v "${VENDOR_DIRECTORY}:${container_vendor_directory}" \ + -w "${container_project_directory}" \ + "${INTEGRATION_TESTS_DOCKER_IMAGE}" \ + bash -c "${container_project_directory}/tests/run.sh" diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 00000000..727ad9de --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,7 @@ +# Scripts + +Scripts to be used by operators. + +## `uninstall_operator.sh` + +TODO(mpereira) description. diff --git a/scripts/uninstall_kudo_cassandra.sh b/scripts/uninstall_kudo_cassandra.sh deleted file mode 100755 index 3a686b77..00000000 --- a/scripts/uninstall_kudo_cassandra.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash - -readonly SCRIPT_DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" -readonly PROJECT_DIRECTORY="$(readlink -f "${SCRIPT_DIRECTORY}/..")" - -# shellcheck source=../metadata.sh -source "${PROJECT_DIRECTORY}/metadata.sh" - -kudo_cassandra_version= -kudo_cassandra_instance_name= -kudo_cassandra_instance_namespace= - -while [[ ${#} -gt 0 ]]; do - # TODO(mpereira): handle parameters passed in as "parameter=value"; - parameter="${1}" - - case "${parameter}" in - --version|-v) - kudo_cassandra_version="${2}" - shift - ;; - --instance|-i) - kudo_cassandra_instance_name="${2}" - shift - ;; - --namespace|-n) - kudo_cassandra_instance_namespace="${2}" - shift - ;; - *) - ;; - esac - - shift -done - -kudo_cassandra_version="${kudo_cassandra_version:-0.1.0}" -kudo_cassandra_instance_name="${kudo_cassandra_instance_name:-cassandra}" -kudo_cassandra_instance_namespace="${kudo_cassandra_instance_namespace:-kudo-cassandra}" - -kubectl delete instance \ - "${kudo_cassandra_instance_name}" \ - -n "${kudo_cassandra_instance_namespace}" - -kubectl delete operatorversion \ - "cassandra-${kudo_cassandra_version}" \ - -n "${kudo_cassandra_instance_namespace}" - -kubectl delete operator \ - "cassandra" \ - -n "${kudo_cassandra_instance_namespace}" - -declare -a PVCS -mapfile -t PVCS < <( - kubectl get pvc \ - -n "${kudo_cassandra_instance_namespace}" \ - -o 'jsonpath={.items[*].metadata.name}' \ - | tr ' ' '\n' -) - -for pvc in "${PVCS[@]}"; do - kubectl delete "pvc/${pvc}" -n "${kudo_cassandra_instance_namespace}" -done diff --git a/scripts/uninstall_operator.sh b/scripts/uninstall_operator.sh new file mode 100755 index 00000000..36b2f97a --- /dev/null +++ b/scripts/uninstall_operator.sh @@ -0,0 +1,102 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2039 + +readonly script_directory="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +readonly project_directory="$(readlink -f "${script_directory}/..")" + +# shellcheck source=../metadata.sh +source "${project_directory}/metadata.sh" + +readonly kubectl="${KUBECTL_PATH:-kubectl}" + +operator_name= +operator_version= +operator_instance_name= +operator_instance_namespace= + +usage() { + echo -n "Usage: ${0} " >&2 + echo -n "--operator OPERATOR_NAME " >&2 + echo -n "--version OPERATOR_VERSION " >&2 + echo -n "--instance OPERATOR_INSTANCE_NAME " >&2 + echo -n "--namespace OPERATOR_INSTANCE_NAMESPACE" >&2 + echo >&2 +} + +while [[ ${#} -gt 0 ]]; do + # TODO(mpereira): handle parameters passed in as "parameter=value"; + parameter="${1}" + + case "${parameter}" in + --operator|-o) + operator_name="${2}" + shift + ;; + --version|-v) + operator_version="${2}" + shift + ;; + --instance|-i) + operator_instance_name="${2}" + shift + ;; + --namespace|-n) + operator_instance_namespace="${2}" + shift + ;; + --help|-h) + usage + exit 0 + ;; + *) + echo "Invalid parameter: ${parameter}" >&2 + exit 1 + ;; + esac + + shift +done + +operator_name="${operator_name:-${OPERATOR_NAME}}" +operator_version="${operator_version:-${OPERATOR_VERSION}}" +operator_instance_name="${operator_instance_name:-${OPERATOR_INSTANCE_NAME}}" +operator_instance_namespace="${operator_instance_namespace:-${OPERATOR_INSTANCE_NAMESPACE}}" + +for parameter in operator_name \ + operator_version \ + operator_instance_name \ + operator_instance_namespace; do + if [[ -z ${!parameter} ]]; then + echo "Missing ${parameter}" >&2 + echo >&2 + usage + exit 1 + fi +done + +${kubectl} delete instance \ + "${operator_instance_name}" \ + -n "${operator_instance_namespace}" + +# TODO(mpereira): add a flag to skip operatorversion deletion? +${kubectl} delete operatorversion \ + "${operator_name}-${operator_version}" \ + -n "${operator_instance_namespace}" + +# TODO(mpereira): add a flag to skip operator deletion? +${kubectl} delete operator \ + "${operator_name}" \ + -n "${operator_instance_namespace}" + +# TODO(mpereira): add a flag to skip pvc deletion? +declare -a PVCS +mapfile -t PVCS < <( + ${kubectl} get pvc \ + -n "${operator_instance_namespace}" \ + -o 'jsonpath={.items[*].metadata.name}' \ + | tr ' ' '\n' +) + +for pvc in "${PVCS[@]}"; do + ${kubectl} delete "pvc/${pvc}" -n "${operator_instance_namespace}" +done diff --git a/shared b/shared index f7a9ac93..ee403ec4 160000 --- a/shared +++ b/shared @@ -1 +1 @@ -Subproject commit f7a9ac93be443f753486a1099a3b8f83cdde2070 +Subproject commit ee403ec4dcab05cc945b97169e53d30647c30afb diff --git a/templates/operator/operator.yaml.template b/templates/operator/operator.yaml.template index 0ff87b7d..951d05e3 100644 --- a/templates/operator/operator.yaml.template +++ b/templates/operator/operator.yaml.template @@ -1,5 +1,5 @@ name: "cassandra" -version: "${KUDO_CASSANDRA_VERSION}" +version: "${OPERATOR_VERSION}" kudoVersion: "${KUDO_VERSION}" kubernetesVersion: "${KUBERNETES_VERSION}" appVersion: "${CASSANDRA_VERSION}" diff --git a/tests/go.mod b/tests/go.mod new file mode 100644 index 00000000..b17e469e --- /dev/null +++ b/tests/go.mod @@ -0,0 +1,20 @@ +module github.com/mesosphere/kudo-cassandra-operator/tests + +go 1.13 + +require ( + github.com/avast/retry-go v2.4.1+incompatible + github.com/gogo/protobuf v1.3.1 // indirect + github.com/imdario/mergo v0.3.8 // indirect + github.com/kudobuilder/kudo v0.7.4 + github.com/mitchellh/go-homedir v1.1.0 + github.com/onsi/ginkgo v1.8.0 + github.com/onsi/gomega v1.5.0 + github.com/sirupsen/logrus v1.4.2 + github.com/spf13/pflag v1.0.5 // indirect + golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 // indirect + k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b + k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8 + k8s.io/apimachinery v0.0.0-20190704094520-6f131bee5e2c + k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible +) diff --git a/tests/go.sum b/tests/go.sum new file mode 100644 index 00000000..bcb4c384 --- /dev/null +++ b/tests/go.sum @@ -0,0 +1,398 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= +github.com/Azure/go-autorest/autorest v0.5.0/go.mod h1:9HLKlQjVBH6U3oDfsXOeVc56THsLPw1L03yban4xThw= +github.com/Azure/go-autorest/autorest/adal v0.2.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/avast/retry-go v2.4.1+incompatible h1:WMHc0mwoz20UVmBYK89mUB/KFRlxO0p+s+sgpmJMviY= +github.com/avast/retry-go v2.4.1+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/containerd/containerd v1.2.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v1.4.2-0.20190916154449-92cc603036dd/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustinkirkland/golang-petname v0.0.0-20170921220637-d3c2ba80e75e/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-playground/locales v0.12.1 h1:2FITxuFt/xuCNP1Acdhv62OzaCiviiE4kotfhkmOqEc= +github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= +github.com/go-playground/universal-translator v0.16.0 h1:X++omBR/4cE2MNg91AoC3rmGrCjJ8eAeUP/K/EKx4DM= +github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf/go.mod h1:RpwtwJQFrIEPstU94h88MWPXP2ektJZ8cZ0YntAmXiE= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.0 h1:CcQijm0XKekKjP/YCz28LXVSpgguuB+nCxaSjCe09y0= +github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/gophercloud/gophercloud v0.2.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gosuri/uitable v0.0.3/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= +github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kudobuilder/kudo v0.7.4 h1:APWlig4JaT/LJH4dsyOscLJQNDokapIlE8Bt5g8QkmU= +github.com/kudobuilder/kudo v0.7.4/go.mod h1:yCbGeoq8es5oV3sltMK6bmeGuZpjUMAGbcWPnqOFeTs= +github.com/leodido/go-urn v1.1.0 h1:Sm1gr51B1kKyfD2BlRcLSiEkffoG96g6TPv6eRoEiB8= +github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190620125010-da37f6c1e481/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/masterminds/sprig v2.18.0+incompatible/go.mod h1:MI10VsRNvEV+FKEkd5Ptqq78DEhmrb3fCBgby33c0oY= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mesosphere/kudo-cassandra-operator v0.0.0-20191020164433-05b09e8127c0 h1:jSZcHW5JEb2Zq9YteyND3nNkhGyPmAeJqQOcEpCJ49A= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= +github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 h1:1wopBVtVdWnn03fZelqdXTqk7U7zPQCb+T4rbU9ZEoU= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190429190828-d89cdac9e872/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190621203818-d432491b9138/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190911201528-7ad0cfa0b7b5 h1:SW/0nsKCUaozCUtZTakri5laocGx/5bkDSSLrFUsa5s= +golang.org/x/sys v0.0.0-20190911201528-7ad0cfa0b7b5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= +golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190501045030-23463209683d/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190909030654-5b82db07426d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v9 v9.27.0 h1:wCg/0hk9RzcB0CYw8pYV6FiBYug1on0cpco9YZF8jqA= +gopkg.in/go-playground/validator.v9 v9.27.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/api v0.0.0-20190313235455-40a48860b5ab/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= +k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b h1:aBGgKJUM9Hk/3AE8WaZIApnTxG35kbuQba2w+SXqezo= +k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= +k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= +k8s.io/apimachinery v0.0.0-20190313205120-d7deff9243b1/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/apimachinery v0.0.0-20190704094520-6f131bee5e2c h1:vdEIiO5B0/3EVwZboF6qyYn5kVDdvCbaGSzr7Rcx18A= +k8s.io/apimachinery v0.0.0-20190704094520-6f131bee5e2c/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible h1:U5Bt+dab9K8qaUmXINrkXO135kA11/i5Kg1RUydgaMQ= +k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/code-generator v0.0.0-20181117043124-c2090bec4d9b/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c= +k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= +k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5 h1:VBM/0P5TWxwk+Nw6Z+lAw3DKgO76g90ETOiA6rfLV1Y= +k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +sigs.k8s.io/controller-runtime v0.2.0 h1:5gL30PXOisGZl+Osi4CmLhvMUj77BO3wJeouKF2va50= +sigs.k8s.io/controller-runtime v0.2.0/go.mod h1:ZHqrRDZi3f6BzONcvlUxkqCKgwasGk5FZrnSv9TVZF4= +sigs.k8s.io/controller-tools v0.2.0/go.mod h1:8t/X+FVWvk6TaBcsa+UKUBbn7GMtvyBKX30SGl4em6Y= +sigs.k8s.io/kind v0.5.1/go.mod h1:L+Kcoo83/D1+ryU5P2VFbvYm0oqbkJn9zTZq0KNxW68= +sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= +sigs.k8s.io/kustomize/v3 v3.1.1-0.20190821175718-4b67a6de1296/go.mod h1:ztX4zYc/QIww3gSripwF7TBOarBTm5BvyAMem0kCzOE= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/tests/run.sh b/tests/run.sh new file mode 100755 index 00000000..732ebee6 --- /dev/null +++ b/tests/run.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +readonly script_directory="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +readonly project_directory="$(readlink -f "${script_directory}/..")" + +# shellcheck source=../metadata.sh +source "${project_directory}/metadata.sh" + +# Note: the following environment variables are required by the shared +# data-services-kudo tooling. +export DS_KUDO_VERSION="${DS_KUDO_VERSION:-v${KUDO_VERSION}}" +export KUBECONFIG="${KUBECONFIG:-${HOME}/.kube/config}" +export KUBECTL_PATH="${KUBECTL_PATH:-${VENDOR_DIRECTORY}/kubectl.sh}" +export OPERATOR_DIRECTORY="${OPERATOR_DIRECTORY:-${project_directory}/operator}" +export VENDOR_DIRECTORY="${VENDOR_DIRECTORY:-${project_directory}/shared/vendor}" + +if [ -n "${GOPATH:-}" ]; then + export GINKGO_PATH="${GOPATH}/bin/ginkgo" +else + export GINKGO_PATH="${HOME}/go/bin/ginkgo" +fi + +# https://github.com/golang/go/wiki/Modules. +# FIXME(mpereira): is this necessary? Leaving it commented for now. +# export GO111MODULE=on + +# Give more priority to vendored executables. +export PATH=${VENDOR_DIRECTORY}:${PATH} + +cd "${project_directory}/tests" + +go mod edit -require "github.com/kudobuilder/kudo@${DS_KUDO_VERSION}" +go install github.com/onsi/ginkgo/ginkgo + +${KUBECTL_PATH} kudo version + +${GINKGO_PATH} ./suites/... ${TESTS_FOCUS:+--ginkgo.focus=${TESTS_FOCUS}} diff --git a/tests/suites/simple_install_uninstall_test.go b/tests/suites/simple_install_uninstall_test.go new file mode 100644 index 00000000..a155d64d --- /dev/null +++ b/tests/suites/simple_install_uninstall_test.go @@ -0,0 +1,68 @@ +package suites + +import ( + "fmt" + "os" + "testing" + + . "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/reporters" + . "github.com/onsi/gomega" + + // log "github.com/sirupsen/logrus" + + k8s "github.com/mesosphere/kudo-cassandra-operator/tests/utils/k8s" + kubectl "github.com/mesosphere/kudo-cassandra-operator/tests/utils/kubectl" + kudo "github.com/mesosphere/kudo-cassandra-operator/tests/utils/kudo" +) + +var ( + TestName = "simple-install-uninstall-test" + OperatorName = os.Getenv("OPERATOR_NAME") + TestNamespace = fmt.Sprintf("%s-namespace", TestName) + TestInstance = fmt.Sprintf("%s-instance", OperatorName) + KubeConfigPath = os.Getenv("KUBECONFIG") + KubectlPath = os.Getenv("KUBECTL_PATH") + OperatorDirectory = os.Getenv("OPERATOR_DIRECTORY") + KubectlOptions = kubectl.NewKubectlOptions( + KubectlPath, + KubeConfigPath, + TestNamespace, + "", + ) +) + +var _ = Describe(TestName, func() { + It("Installs the operator from a directory", func() { + // TODO(mpereira) Assert that it isn't running. + err := kudo.InstallOperatorFromDirectory( + OperatorDirectory, TestNamespace, TestInstance, []string{}, + ) + Expect(err).To(BeNil()) + // TODO(mpereira) Assert that it is running. + }) + It("Uninstalls the operator", func() { + err := kudo.UninstallOperator(OperatorName, TestNamespace, TestInstance) + Expect(err).To(BeNil()) + // TODO(mpereira) Assert that it isn't running. + }) +}) + +var _ = BeforeSuite(func() { + k8s.Init(KubectlOptions) + kudo.Init(KubectlOptions) + kudo.UninstallOperator(OperatorName, TestNamespace, TestInstance) + k8s.CreateNamespace(TestNamespace) +}) + +var _ = AfterSuite(func() { + k8s.DeleteNamespace(TestNamespace) +}) + +func TestService(t *testing.T) { + RegisterFailHandler(Fail) + junitReporter := reporters.NewJUnitReporter(fmt.Sprintf( + "%s-junit.xml", TestName, + )) + RunSpecsWithDefaultAndCustomReporters(t, TestName, []Reporter{junitReporter}) +} diff --git a/tests/suites/suites.go b/tests/suites/suites.go new file mode 100644 index 00000000..1c56f4e8 --- /dev/null +++ b/tests/suites/suites.go @@ -0,0 +1 @@ +package suites diff --git a/tests/utils/cmd/cmd.go b/tests/utils/cmd/cmd.go new file mode 100644 index 00000000..2c7f8611 --- /dev/null +++ b/tests/utils/cmd/cmd.go @@ -0,0 +1,63 @@ +package cmd + +import ( + "bytes" + "os" + "os/exec" + "syscall" + + log "github.com/sirupsen/logrus" +) + +func Exec( + command string, arguments []string, environment []string, +) (int, *bytes.Buffer, *bytes.Buffer, error) { + if arguments == nil { + arguments = []string{} + } + + if environment == nil { + environment = []string{} + } + + _environment := os.Environ() + for _, e := range environment { + _environment = append(_environment, e) + } + + var exitStatus int + var stdout, stderr bytes.Buffer + + cmd := exec.Command(command, arguments...) + cmd.Env = _environment + cmd.Stdout = &stdout + cmd.Stderr = &stderr + + err := cmd.Run() + if err != nil { + if exitErr, ok := err.(*exec.ExitError); ok { + if status, ok := exitErr.Sys().(syscall.WaitStatus); ok { + log.Errorf("ExitError while running '%s':\n%s", cmd, exitErr.Stderr) + exitStatus = status.ExitStatus() + log.Errorf("'%s' exited with '%d'", cmd, exitStatus) + } else { + exitStatus = -1 + } + } + + exitStatus = -1 + log.Errorf("Error while running '%s': %s", cmd, err) + log.Errorf( + "exit status: %d\nstdout:\n%s\nstderr:\n%s", + exitStatus, stdout.String(), stderr.String(), + ) + return exitStatus, &stdout, &stderr, err + } + + exitStatus = 0 + log.Infof( + "exit status: %d\nstdout:\n%s\nstderr:\n%s", + exitStatus, stdout.String(), stderr.String(), + ) + return exitStatus, &stdout, &stderr, nil +} diff --git a/tests/utils/k8s/k8s.go b/tests/utils/k8s/k8s.go new file mode 100644 index 00000000..4f0e2b20 --- /dev/null +++ b/tests/utils/k8s/k8s.go @@ -0,0 +1,63 @@ +package k8s + +import ( + log "github.com/sirupsen/logrus" + + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + + kubectl "github.com/mesosphere/kudo-cassandra-operator/tests/utils/kubectl" +) + +var ( + clientset *kubernetes.Clientset + kubectlOptions *kubectl.KubectlOptions +) + +// TODO(mpereira) return error? +func Init(_kubectlOptions *kubectl.KubectlOptions) { + kubectlOptions = _kubectlOptions + // TODO(mpereira) handle error. + clientset, _ = kubectl.GetKubernetesClientFromOptions(_kubectlOptions) +} + +func CreateNamespace(namespaceName string) error { + namespace := corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: namespaceName, + }, + } + + log.Infof("Creating namespace '%s'", namespaceName) + _, err := clientset.CoreV1().Namespaces().Create(&namespace) + + if err != nil { + if apierrors.IsAlreadyExists(err) { + log.Warnf("Namespace '%s' already exists, skipping", namespaceName) + } else { + log.Errorf("Error creating namespace '%s': %v", namespaceName, err) + } + return err + } + + log.Infof("Created namespace '%s'", namespaceName) + return err +} + +func DeleteNamespace(namespaceName string) error { + log.Infof("Deleting namespace '%s'", namespaceName) + + err := clientset.CoreV1().Namespaces().Delete( + namespaceName, + &metav1.DeleteOptions{}, + ) + if err != nil { + log.Warnf("Error deleting namespace '%s': %s", namespaceName, err) + return err + } + + log.Infof("Deleted namespace '%s'", namespaceName) + return nil +} diff --git a/tests/utils/kubectl/kubectl.go b/tests/utils/kubectl/kubectl.go new file mode 100644 index 00000000..5462ec96 --- /dev/null +++ b/tests/utils/kubectl/kubectl.go @@ -0,0 +1,144 @@ +package kubectl + +import ( + "fmt" + "os" + "path/filepath" + + homedir "github.com/mitchellh/go-homedir" + log "github.com/sirupsen/logrus" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" +) + +type KubectlOptions struct { + KubectlPath string + ConfigPath string + Namespace string + Env map[string]string + ContextName string +} + +func GetFirstNonEmptyEnvVarOrEmptyString(envVarNames []string) string { + for _, name := range envVarNames { + if value := os.Getenv(name); value != "" { + return value + } + } + + return "" +} + +func KubeConfigPathFromHomeDir() (string, error) { + home, err := homedir.Dir() + if err != nil { + return "", err + } + configPath := filepath.Join(home, ".kube", "config") + return configPath, err +} + +func GetKubeConfigPath() (string, error) { + kubeConfigPath := GetFirstNonEmptyEnvVarOrEmptyString([]string{"KUBECONFIG"}) + if kubeConfigPath == "" { + configPath, err := KubeConfigPathFromHomeDir() + if err != nil { + return "", err + } + kubeConfigPath = configPath + } + return kubeConfigPath, nil +} + +func (kubectlOptions *KubectlOptions) GetConfigPath() (string, error) { + var err error + + kubeConfigPath := kubectlOptions.ConfigPath + if kubeConfigPath == "" { + kubeConfigPath, err = GetKubeConfigPath() + if err != nil { + return "", err + } + } + return kubeConfigPath, nil +} + +func LoadApiClientConfig( + configPath string, contextName string, +) (*rest.Config, error) { + overrides := clientcmd.ConfigOverrides{} + if contextName != "" { + overrides.CurrentContext = contextName + } + config := clientcmd.NewNonInteractiveDeferredLoadingClientConfig( + &clientcmd.ClientConfigLoadingRules{ExplicitPath: configPath}, + &overrides, + ) + return config.ClientConfig() +} + +func GetKubernetesClientFromOptions( + options *KubectlOptions, +) (*kubernetes.Clientset, error) { + var err error + + kubeConfigPath, err := options.GetConfigPath() + if err != nil { + return nil, err + } + + log.Info(fmt.Sprintf( + "Configuring kubectl using config file '%s' with context '%s'", + kubeConfigPath, + options.ContextName, + )) + + config, err := LoadApiClientConfig(kubeConfigPath, options.ContextName) + if err != nil { + return nil, err + } + + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return nil, err + } + + return clientset, nil +} + +func NewKubectlOptions( + kubectlPath string, + configPath string, + namespace string, + contextName string, +) *KubectlOptions { + return &KubectlOptions{ + KubectlPath: kubectlPath, + ConfigPath: configPath, + Namespace: namespace, + Env: map[string]string{}, + ContextName: contextName, + } +} + +func BuildKubeConfig(kubeConfigPath string) (*rest.Config, error) { + if kubeConfigPath != "" { + log.Infof("Using kubeconfig at '%s'", kubeConfigPath) + client, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath) + if err != nil { + log.Errorf("Error creating kubeconfig from %s: %v", kubeConfigPath, err) + return nil, err + } + return client, err + } + + config, err := rest.InClusterConfig() + if err != nil { + log.Errorf("Error getting kubeconfig from InClusterConfig: %v", err) + return nil, err + } + + log.Infof("Using kubeconfig from InClusterConfig.") + return config, err +} diff --git a/tests/utils/kudo/kudo.go b/tests/utils/kudo/kudo.go new file mode 100644 index 00000000..cf2058be --- /dev/null +++ b/tests/utils/kudo/kudo.go @@ -0,0 +1,249 @@ +package kudo + +import ( + "errors" + "fmt" + "time" + + "github.com/avast/retry-go" + log "github.com/sirupsen/logrus" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/client/clientset/versioned" + + cmd "github.com/mesosphere/kudo-cassandra-operator/tests/utils/cmd" + kubectl "github.com/mesosphere/kudo-cassandra-operator/tests/utils/kubectl" +) + +var ( + kubectlOptions *kubectl.KubectlOptions + kudo *versioned.Clientset +) + +// TODO(mpereira) return err? +func Init(_kubectlOptions *kubectl.KubectlOptions) { + kubectlOptions = _kubectlOptions + // TODO(mpereira) handle err. + kubeconfig, _ := kubectl.BuildKubeConfig(kubectlOptions.ConfigPath) + // TODO(mpereira) handle err. + kudo, _ = versioned.NewForConfig(kubeconfig) +} + +func GetInstance( + namespaceName string, instanceName string, +) (*v1alpha1.Instance, error) { + instances := kudo.KudoV1alpha1().Instances(namespaceName) + instance, err := instances.Get(instanceName, metav1.GetOptions{}) + + if err != nil { + log.Errorf( + "Error getting KUDO instance (namespace='%s', name='%s'): %v", + namespaceName, + instanceName, + err, + ) + return nil, err + } + + if instance == nil { + log.Warnf( + "No KUDO instance found (namespace='%s', name='%s')", + namespaceName, + instanceName, + ) + return nil, err + } + + return instance, nil +} + +func GetInstanceAggregatedStatus( + namespaceName string, instanceName string, +) (*v1alpha1.ExecutionStatus, error) { + instance, err := GetInstance(namespaceName, instanceName) + + if err != nil { + return nil, err + } + + if instance == nil { + return nil, err + } + + return &instance.Status.AggregatedStatus.Status, err +} + +func WaitForOperatorDeployStatus( + expectedStatus v1alpha1.ExecutionStatus, + namespaceName string, + instanceName string, + retryDelay time.Duration, + retryAttempts uint, +) error { + return retry.Do( + func() error { + status, err := GetInstanceAggregatedStatus(namespaceName, instanceName) + + if err != nil { + log.Errorf( + "Error attempting to get operator (instance='%s', namespace='%s') "+ + "deploy status: %s", + instanceName, + namespaceName, + err, + ) + return errors.New("") + } + + if status == nil { + log.Warnf( + "Waiting for operator (instance='%s', namespace='%s') deploy status "+ + "to be '%s', is not available", + instanceName, + namespaceName, + expectedStatus, + ) + return errors.New("") + } + + if expectedStatus != *status { + log.Infof( + "Waiting for operator (instance='%s', namespace='%s') deploy status "+ + "to be '%s', is '%s'", + instanceName, + namespaceName, + expectedStatus, + *status, + ) + return errors.New("") + } + + log.Infof( + "Operator (instance='%s', namespace='%s') deploy status is '%s'", + instanceName, + namespaceName, + *status, + ) + return nil + }, + retry.DelayType(retry.FixedDelay), + retry.Delay(retryDelay), + retry.Attempts(retryAttempts), + ) +} + +func WaitForOperatorDeployInProgress( + namespaceName string, instanceName string, +) error { + // 30 seconds. + retryDelay := time.Second * 3 + var retryAttempts uint = 10 + + return WaitForOperatorDeployStatus( + v1alpha1.ExecutionInProgress, + namespaceName, + instanceName, + retryDelay, + retryAttempts, + ) +} + +func WaitForOperatorDeployComplete( + namespaceName string, instanceName string, +) error { + // 5 minutes. + retryDelay := time.Second * 10 + var retryAttempts uint = 30 + + return WaitForOperatorDeployStatus( + v1alpha1.ExecutionComplete, + namespaceName, + instanceName, + retryDelay, + retryAttempts, + ) +} + +func InstallOperatorFromDirectory( + directory string, namespace string, instance string, parameters []string, +) error { + log.Infof( + "Installing operator from path: '%s' (instance='%s', namespace='%s')", + directory, instance, namespace, + ) + + kubectlParameters := []string{ + "kudo", + "install", + directory, + fmt.Sprintf("--namespace=%s", namespace), + fmt.Sprintf("--instance=%s", instance), + } + + for _, parameter := range parameters { + kubectlParameters = append( + kubectlParameters, "--parameter", string(parameter), + ) + } + + _, _, _, err := cmd.Exec(kubectlOptions.KubectlPath, kubectlParameters, nil) + if err != nil { + log.Errorf("Error trying to install operator from path: %s", err) + return err + } + + log.Infof( + "Started operator installation from path: '%s' (instance='%s', namespace='%s')", + directory, instance, namespace, + ) + + err = WaitForOperatorDeployInProgress(namespace, instance) + if err != nil { + log.Errorf("Error waiting for operator deploy to be in-progress: %s", err) + return err + } + + err = WaitForOperatorDeployComplete(namespace, instance) + if err != nil { + log.Errorf("Error waiting for operator deploy to complete: %s", err) + return err + } + + return nil +} + +func UninstallOperator( + operatorName string, namespaceName string, instanceName string, +) error { + uninstallScript := "../../scripts/uninstall_operator.sh" + uninstallScriptParameters := []string{ + "--operator", operatorName, + "--instance", instanceName, + "--namespace", namespaceName, + } + + log.Infof( + "Uninstalling '%s' (instance='%s', namespace='%s')", + operatorName, instanceName, namespaceName, + ) + + _, _, _, err := cmd.Exec(uninstallScript, uninstallScriptParameters, + []string{fmt.Sprintf("KUBECTL_PATH=%s", kubectlOptions.KubectlPath)}, + ) + if err != nil { + log.Errorf( + "Error trying to uninstall '%s' (instance='%s', namespace='%s'): %s", + operatorName, instanceName, namespaceName, err, + ) + return err + } + + log.Infof( + "Successfully uninstalled '%s' (instance='%s', namespace='%s')", + operatorName, instanceName, namespaceName, + ) + + return nil +} diff --git a/tests/utils/utils.go b/tests/utils/utils.go new file mode 100644 index 00000000..d4b585bf --- /dev/null +++ b/tests/utils/utils.go @@ -0,0 +1 @@ +package utils diff --git a/tools/README.md b/tools/README.md new file mode 100644 index 00000000..9e1595be --- /dev/null +++ b/tools/README.md @@ -0,0 +1,19 @@ +# Tools + +Scripts to be used in development or CI environments. + +## `check_files.sh` + +TODO(mpereira) description. + +## `clean_go_caches.sh` + +TODO(mpereira) description. + +## `compile_templates.sh` + +TODO(mpereira) description. + +## `format_files.sh` + +TODO(mpereira) description. diff --git a/tools/check_files.sh b/tools/check_files.sh index c158b79d..0bbe33f7 100755 --- a/tools/check_files.sh +++ b/tools/check_files.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash # shellcheck disable=SC2039 +# Dependencies: +# - prettier +# - goimports + readonly DEBUG="${DEBUG:=false}" readonly COLOR="${COLOR:=true}" @@ -25,6 +29,9 @@ fi # readonly yaml_exit_code=$? +# FIXME(mpereira): see FIXME above. +readonly yaml_exit_code=0 + # Shell scripts ################################################################ declare -a shellcheck_options @@ -35,10 +42,20 @@ fi # Get all files with a shebang. mapfile -t shell_scripts < <(git ls-files -- ':!:shared' | xargs -I{} grep -El '^#!.+(sh|bash)' {}) -shellcheck "${shellcheck_options[@]}" "${shell_scripts[@]}" +shellcheck -ax -e SC1091 "${shellcheck_options[@]}" "${shell_scripts[@]}" readonly shell_scripts_exit_code=$? +# Go ########################################################################### + +readonly goimports_output="$(goimports -l -d .)" +go_exit_code=0 + +if [[ "${goimports_output}" != "" ]]; then + echo "${goimports_output}" + go_exit_code=1 +fi + ################################################################################ -! ((shell_scripts_exit_code)) +! ((yaml_exit_code | shell_scripts_exit_code | go_exit_code)) diff --git a/tools/clean_go_caches.sh b/tools/clean_go_caches.sh new file mode 100755 index 00000000..225e1c5d --- /dev/null +++ b/tools/clean_go_caches.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2039 + +set -euxo pipefail + +go clean -cache -testcache -modcache diff --git a/tools/compile_templates.sh b/tools/compile_templates.sh index a2f2ea2b..7b137c76 100755 --- a/tools/compile_templates.sh +++ b/tools/compile_templates.sh @@ -1,8 +1,11 @@ #!/usr/bin/env bash # shellcheck disable=SC2039 -readonly SCRIPT_DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" -readonly PROJECT_DIRECTORY="$(readlink -f "${SCRIPT_DIRECTORY}/..")" +readonly script_directory="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +readonly project_directory="$(readlink -f "${script_directory}/..")" + +# shellcheck source=../metadata.sh +source "${project_directory}/metadata.sh" readonly DEBUG="${DEBUG:=false}" readonly VERBOSE="${VERBOSE:=false}" @@ -17,19 +20,13 @@ log () { fi } -# Add more environment variables to be available in templates here. -env_vars=( - CASSANDRA_VERSION - KUBERNETES_VERSION - KUDO_CASSANDRA_VERSION - KUDO_VERSION -) +declare -a env_vars +mapfile -t env_vars < <(sed -E \ + 's/export[[:space:]]+([[:alnum:]_]+)=.*/\1/g' \ + "${project_directory}/metadata.sh" ) declare -a templates -mapfile -t templates < <(find "${PROJECT_DIRECTORY}/templates" -type f) - -# shellcheck source=../metadata.sh -source "${PROJECT_DIRECTORY}/metadata.sh" +mapfile -t templates < <(find "${project_directory}/templates" -type f) for i in "${!env_vars[@]}" ; do env_vars[$i]="\${${env_vars[$i]}}" @@ -40,7 +37,7 @@ join () { local IFS="${1}"; shift; echo "${*}"; } readonly ENV_VARS_STRING="$(join , "${env_vars[@]}")" for template in "${templates[@]}"; do - output_file_directory="$(dirname "${template}" | sed -e "s|${PROJECT_DIRECTORY}/templates|${PROJECT_DIRECTORY}|")" + output_file_directory="$(dirname "${template}" | sed -e "s|${project_directory}/templates|${project_directory}|")" output_file="${output_file_directory}/$(basename "${template}" .template)" log "compiling '${template}' to '${output_file}'" envsubst "${ENV_VARS_STRING}" < "${template}" > "${output_file}" diff --git a/tools/format_files.sh b/tools/format_files.sh index 27c7da3b..b5a0e011 100755 --- a/tools/format_files.sh +++ b/tools/format_files.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash # shellcheck disable=SC2039 +# Dependencies: +# - prettier +# - goimports + # YAML ######################################################################### # FIXME(mpereira): can't use Prettier for now since it doesn't support templated @@ -14,6 +18,15 @@ # readonly yaml_exit_code=$? +# FIXME(mpereira): see FIXME above. +readonly yaml_exit_code=0 + +# Go ########################################################################### + +goimports -l -w . + +readonly go_exit_code=$? + ################################################################################ -# ! ((yaml_exit_code)) +! ((yaml_exit_code | go_exit_code))