Skip to content

Commit afd2ee9

Browse files
committed
Merge remote-tracking branch 'origin/master' into laverya/redactor-reformat
2 parents e66d12d + d98172e commit afd2ee9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1379
-761
lines changed

.github/workflows/build-test-deploy.yaml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,42 @@ jobs:
5656
path: bin/
5757
- uses: engineerd/[email protected]
5858
- run: chmod +x bin/preflight
59-
- run: bin/preflight --interactive=false --format=json https://preflight.replicated.com
59+
- run: ./bin/preflight --interactive=false --format=json https://preflight.replicated.com
60+
61+
compile-supportbundle:
62+
runs-on: ubuntu-latest
63+
needs: build
64+
steps:
65+
- uses: actions/setup-go@v1
66+
with:
67+
go-version: '1.14'
68+
- name: setup env
69+
run: |
70+
echo "::set-env name=GOPATH::$(go env GOPATH)"
71+
echo "::add-path::$(go env GOPATH)/bin"
72+
shell: bash
73+
- uses: actions/checkout@master
74+
- run: make support-bundle
75+
- uses: actions/upload-artifact@v1
76+
with:
77+
name: support-bundle
78+
path: bin/support-bundle
79+
80+
validate-supportbundle:
81+
runs-on: ubuntu-latest
82+
needs: compile-supportbundle
83+
steps:
84+
- uses: actions/checkout@v1
85+
- name: Download support-bundle binary
86+
uses: actions/download-artifact@v1
87+
with:
88+
name: support-bundle
89+
path: bin/
90+
- uses: engineerd/[email protected]
91+
- run: chmod +x bin/support-bundle
92+
- run: ./bin/support-bundle ./examples/troubleshoot/sample-collectors.yaml
93+
- run: ./bin/support-bundle ./examples/troubleshoot/sample-supportbundle.yaml
94+
- run: ./bin/support-bundle https://kots.io
6095

6196
goreleaser:
6297
runs-on: ubuntu-latest

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ vet:
6767

6868
.PHONY: generate
6969
generate: controller-gen client-gen
70-
$(shell go env GOPATH)/bin/controller-gen object:headerFile=./hack/boilerplate.go.txt paths=./pkg/apis/...
71-
$(shell go env GOPATH)/bin/client-gen \
70+
$(CONTROLLER_GEN) \
71+
object:headerFile=./hack/boilerplate.go.txt paths=./pkg/apis/...
72+
$(CLIENT_GEN) \
7273
--output-package=github.com/replicatedhq/troubleshoot/pkg/client \
7374
--clientset-name troubleshootclientset \
7475
--input-base github.com/replicatedhq/troubleshoot/pkg/apis \
@@ -84,8 +85,7 @@ schemas: fmt vet openapischema
8485
go build ${LDFLAGS} -o bin/schemagen github.com/replicatedhq/troubleshoot/cmd/schemagen
8586
./bin/schemagen --output-dir ./schemas
8687

87-
# find or download controller-gen
88-
# download controller-gen if necessary
88+
.PHONY: contoller-gen
8989
controller-gen:
9090
ifeq (, $(shell which controller-gen))
9191
go get sigs.k8s.io/controller-tools/cmd/[email protected]
@@ -94,10 +94,10 @@ else
9494
CONTROLLER_GEN=$(shell which controller-gen)
9595
endif
9696

97-
# find or download client-gen
97+
.PHONY: client-gen
9898
client-gen:
9999
ifeq (, $(shell which client-gen))
100-
go get k8s.io/code-generator/cmd/client-gen@kubernetes-1.16.4
100+
go get k8s.io/code-generator/cmd/client-gen@kubernetes-1.18.0
101101
CLIENT_GEN=$(shell go env GOPATH)/bin/client-gen
102102
else
103103
CLIENT_GEN=$(shell which client-gen)
@@ -128,7 +128,7 @@ run-preflight: preflight
128128

129129
.PHONY: run-troubleshoot
130130
run-troubleshoot: support-bundle
131-
./bin/support-bundle ./examples/troubleshoot/sample-troubleshoot.yaml
131+
./bin/support-bundle ./examples/troubleshoot/sample-supportbundle.yaml
132132

133133
.PHONY: run-analyze
134134
run-analyze: analyze

cmd/preflight/cli/root.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,10 @@ that a cluster meets the requirements to run an application.`,
3636

3737
cmd.Flags().Bool("interactive", true, "interactive preflights")
3838
cmd.Flags().String("format", "human", "output format, one of human, json, yaml. only used when interactive is set to false")
39-
cmd.Flags().String("preflight", "", "name of the preflight to use")
40-
cmd.Flags().String("image", "", "the full name of the preflight image to use")
41-
cmd.Flags().String("pullpolicy", "", "the pull policy of the preflight image")
4239
cmd.Flags().String("collector-image", "", "the full name of the collector image to use")
4340
cmd.Flags().String("collector-pullpolicy", "", "the pull policy of the collector image")
4441
cmd.Flags().Bool("collect-without-permissions", false, "always run preflight checks even if some require permissions that preflight does not have")
4542

46-
cmd.Flags().String("serviceaccount", "", "name of the service account to use. if not provided, one will be created")
47-
4843
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
4944

5045
KubernetesConfigFlags = genericclioptions.NewConfigFlags(false)

cmd/preflight/cli/serviceaccount.go

Lines changed: 0 additions & 151 deletions
This file was deleted.

0 commit comments

Comments
 (0)