Skip to content

Commit

Permalink
Moving to KUTTL (#1435)
Browse files Browse the repository at this point in the history
Signed-off-by: Ken Sipe <kensipe@gmail.com>
  • Loading branch information
kensipe committed Mar 30, 2020
1 parent 8827aa0 commit 9a8b2ae
Show file tree
Hide file tree
Showing 101 changed files with 228 additions and 5,553 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ reports/
config/manager_image_patch.yaml-e
# created by /hack/generate_krew.sh during release
kudo.yaml
kudo-e2e-test.yaml
kind-logs-*
operators

### mac
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ builds:
- -s -w -X github.com/kudobuilder/kudo/pkg/version.gitVersion={{ .Version }} -X github.com/kudobuilder/kudo/pkg/version.gitCommit={{ .ShortCommit }} -X github.com/kudobuilder/kudo/pkg/version.buildDate={{ .Date }}
goos:
- linux
- darwin
goarch:
- 386
- amd64
Expand Down
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ endif

# Run e2e tests
.PHONY: e2e-test
e2e-test: cli-fast
e2e-test: cli-fast manager-fast
./hack/run-e2e-tests.sh

.PHONY: integration-test
# Run integration tests
integration-test: cli-fast
integration-test: cli-fast manager-fast
./hack/run-integration-tests.sh

.PHONY: test-clean
Expand All @@ -59,12 +59,17 @@ download:
.PHONY: prebuild
prebuild: generate lint

.PHONY: manager

# Build manager binary
manager: prebuild manager-fast

.PHONY: manager-fast
# Build manager binary
manager: prebuild
manager-fast:
# developer convenience for platform they are running
go build -ldflags "${LDFLAGS}" -o bin/$(EXECUTABLE) github.com/kudobuilder/kudo/cmd/manager


.PHONY: manager-clean
# Clean manager build
manager-clean:
Expand Down Expand Up @@ -104,7 +109,6 @@ endif
generate-clean:
rm -rf hack/code-gen

.PHONY: cli-fast
# Build CLI but don't lint or run code generation first.
cli-fast:
go build -ldflags "${LDFLAGS}" -o bin/${CLI} ./cmd/kubectl-kudo
Expand Down
4 changes: 2 additions & 2 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"github.com/kudobuilder/kudo/pkg/controller/instance"
"github.com/kudobuilder/kudo/pkg/controller/operator"
"github.com/kudobuilder/kudo/pkg/controller/operatorversion"
"github.com/kudobuilder/kudo/pkg/test/utils"
"github.com/kudobuilder/kudo/pkg/kubernetes"
"github.com/kudobuilder/kudo/pkg/version"
kudohook "github.com/kudobuilder/kudo/pkg/webhook"
)
Expand Down Expand Up @@ -112,7 +112,7 @@ func main() {
}
log.Print("OperatorVersion controller set up")

discoveryClient, err := utils.GetDiscoveryClient(mgr)
discoveryClient, err := kubernetes.GetDiscoveryClient(mgr)
if err != nil {
log.Println(err)
os.Exit(1)
Expand Down
24 changes: 1 addition & 23 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,12 @@ module github.com/kudobuilder/kudo
go 1.13

require (
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.5.0
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/containerd/containerd v1.2.9 // indirect
github.com/docker/docker v1.4.2-0.20190916154449-92cc603036dd
github.com/docker/go-connections v0.4.0 // indirect
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0
github.com/emicklei/go-restful v2.9.6+incompatible // indirect
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/gogo/protobuf v1.3.1 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/gophercloud/gophercloud v0.2.0 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/mux v1.6.2 // indirect
github.com/gosuri/uitable v0.0.4
github.com/huandu/xstrings v1.2.0 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/kudobuilder/kuttl v0.1.0
github.com/manifoldco/promptui v0.6.0
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0
github.com/spf13/afero v1.2.2
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.5
Expand All @@ -37,7 +17,6 @@ require (
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
golang.org/x/tools v0.0.0-20191025023517-2077df36852e // indirect
gopkg.in/yaml.v2 v2.2.8
gotest.tools v2.2.0+incompatible
k8s.io/api v0.17.3
Expand All @@ -49,7 +28,6 @@ require (
k8s.io/kubectl v0.17.3
sigs.k8s.io/controller-runtime v0.5.1
sigs.k8s.io/controller-tools v0.2.6
sigs.k8s.io/kind v0.6.1
sigs.k8s.io/yaml v1.1.0
)

Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46O
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
Expand All @@ -321,6 +322,11 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kudobuilder/code-generator v0.17.4-beta.0.0.20200316162450-cc91a9201457 h1:f1H3Jw07meAETjS9uXbHwOW3m93ZRaweRR1hWerxS4k=
github.com/kudobuilder/code-generator v0.17.4-beta.0.0.20200316162450-cc91a9201457/go.mod h1:l8BLVwASXQZTo2xamW5mQNFCe1XPiAesVq7Y1t7PiQQ=
github.com/kudobuilder/kudo v0.11.1/go.mod h1:iBsOEGm11oNsVNAyhLSYfXGKI/vqyTl3z7k8T5twKqQ=
github.com/kudobuilder/kuttl v0.0.0-20200325200947-889c2a9b7a99 h1:/npnMym9ko9UJ/JP0ua9cFuc7kvzOetVmiNpX6QxerU=
github.com/kudobuilder/kuttl v0.0.0-20200325200947-889c2a9b7a99/go.mod h1:XH4r1WLh7rzZ4ECv9QIyxJm5AY8UqnsTZRz2RSarTRc=
github.com/kudobuilder/kuttl v0.1.0 h1:uTNH5my7ueSbryA/LyrhwHwJNnx6SOFvD8SaPv8lOIc=
github.com/kudobuilder/kuttl v0.1.0/go.mod h1:XH4r1WLh7rzZ4ECv9QIyxJm5AY8UqnsTZRz2RSarTRc=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
Expand Down
2 changes: 2 additions & 0 deletions hack/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ then
git clone https://github.com/kudobuilder/operators
mkdir operators/bin/
cp ./bin/kubectl-kudo operators/bin/
cp ./bin/manager operators/bin/
cd operators && ./bin/kubectl-kudo test 2>&1 \
| tee /dev/fd/2 \
| go-junit-report -set-exit-code \
Expand All @@ -47,5 +48,6 @@ else
git clone https://github.com/kudobuilder/operators
mkdir operators/bin/
cp ./bin/kubectl-kudo operators/bin/
cp ./bin/manager operators/bin/
cd operators && ./bin/kubectl-kudo test
fi
7 changes: 0 additions & 7 deletions hack/update_codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ mkdir -p "$(dirname "${FAKE_REPOPATH}")" && ln -s "${REPO_ROOT}" "${FAKE_REPOPAT
export GOPATH="${FAKE_GOPATH}"
cd "${FAKE_REPOPATH}"

"${CODE_GEN_DIR}"/generate-groups.sh \
deepcopy \
github.com/kudobuilder/kudo/pkg/client \
github.com/kudobuilder/kudo/pkg/apis \
"testharness:v1beta1" \
--go-header-file hack/boilerplate.go.txt # must be last for some reason

"${CODE_GEN_DIR}"/generate-groups.sh \
all \
github.com/kudobuilder/kudo/pkg/client \
Expand Down
1 change: 0 additions & 1 deletion kudo-e2e-test.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ testDirs:
startKIND: true
kindContainers:
- kudobuilder/controller:%version%
startKUDO: false
timeout: 300
4 changes: 3 additions & 1 deletion kudo-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ manifestDirs:
- ./test/manifests/
testDirs:
- ./test/integration
startKUDO: true
commands:
- command: ./bin/manager
background: true
startControlPlane: true
parallel: 4
21 changes: 0 additions & 21 deletions pkg/apis/testharness/v1beta1/doc.go

This file was deleted.

112 changes: 0 additions & 112 deletions pkg/apis/testharness/v1beta1/test_types.go

This file was deleted.

Loading

0 comments on commit 9a8b2ae

Please sign in to comment.