Skip to content

Commit

Permalink
initial project move from kudo into its own project
Browse files Browse the repository at this point in the history
Signed-off-by: Ken Sipe <kensipe@gmail.com>
  • Loading branch information
kensipe committed Feb 11, 2020
1 parent ae3179d commit 667a669
Show file tree
Hide file tree
Showing 71 changed files with 6,235 additions and 1 deletion.
53 changes: 52 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,63 @@
### Project specific
bin/
vendor/
hack/code-gen
hack/controller-gen
test/.git-credentials
reports/
config/manager_image_patch.yaml-e

### mac
.DS_Store

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`

### Go tooling
# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out


### Goland IDEA
.idea/

### gorelease
dist/

### VS Code
.vscode/
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json


### vim
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
kubeconfig
.kube
31 changes: 31 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
linters:
auto-fix: false
enable:
- errcheck
- goimports
- golint
- gosec
- misspell
- scopelint
- unconvert
- unparam
- interfacer
- nakedret
- gocyclo
- dupl
- goconst
- lll
run:
skip-dirs:
# autogenerated clientset by client-gen
- pkg/client
linters-settings:
errcheck:
check-type-assertions: true
lll:
line-length: 250
dupl:
threshold: 400
goimports:
# Don't use 'github.com/kudobuilder/kudo', it'll result in unreliable output!
local-prefixes: github.com/kudobuilder
71 changes: 71 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
SHELL=/bin/bash -o pipefail

export GO111MODULE=on

.PHONY: all
all: test

# Run unit tests
.PHONY: test
test:
ifdef _INTELLIJ_FORCE_SET_GOFLAGS
# Run tests from a Goland terminal. Goland already set '-mod=readonly'
go test ./pkg/... -v -coverprofile cover.out
else
go test ./pkg/... -v -mod=readonly -coverprofile cover.out
endif

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


.PHONY: lint
lint:
ifeq (, $(shell which golangci-lint))
./hack/install-golangcilint.sh
endif
golangci-lint run

.PHONY: download
download:
go mod download

.PHONY: prebuild
prebuild: generate lint

.PHONY: generate
# Generate code
generate:
ifeq (, $(shell which controller-gen))
go get sigs.k8s.io/controller-tools/cmd/controller-gen@$$(go list -f '{{.Version}}' -m sigs.k8s.io/controller-tools)
endif
controller-gen crd paths=./pkg/apis/... output:crd:dir=config/crds output:stdout
./hack/update_codegen.sh

.PHONY: generate-clean
generate-clean:
rm -rf hack/code-gen

.PHONY: clean
# Clean all
clean: test-clean

.PHONY: imports
# used to update imports on project. NOT a linter.
imports:
ifeq (, $(shell which golangci-lint))
./hack/install-golangcilint.sh
endif
golangci-lint run --disable-all -E goimports --fix

.PHONY: todo
# Show to-do items per file.
todo:
@grep \
--exclude-dir=hack \
--exclude=Makefile \
--text \
--color \
-nRo -E ' TODO:.*|SkipNow' .
48 changes: 48 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module github.com/kudobuilder/kuttl

go 1.13

require (
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/containerd/containerd v1.2.9 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v1.4.2-0.20190916154449-92cc603036dd
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/mux v1.6.2 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/json-iterator/go v1.1.8 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/onsi/ginkgo v1.10.1 // indirect
github.com/onsi/gomega v1.7.1 // indirect
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0
github.com/prometheus/client_golang v1.0.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.4.0
github.com/thoas/go-funk v0.5.0
go.uber.org/atomic v1.4.0 // indirect
go.uber.org/zap v1.10.0 // indirect
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392 // indirect
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
golang.org/x/tools v0.0.0-20191025023517-2077df36852e // indirect
gopkg.in/yaml.v2 v2.2.7
k8s.io/api v0.16.6
k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783
k8s.io/apimachinery v0.16.6
k8s.io/client-go v0.16.6
k8s.io/code-generator v0.16.6
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a // indirect
sigs.k8s.io/controller-runtime v0.4.0
sigs.k8s.io/controller-tools v0.2.4
sigs.k8s.io/kind v0.6.1
)
Loading

0 comments on commit 667a669

Please sign in to comment.