Skip to content

Commit

Permalink
Implement velero debug
Browse files Browse the repository at this point in the history
This PR added a subcommand `velero debug`, which leverages `crashd` to
collect logs and specs of velero server components and bundle them in a
tarball.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
  • Loading branch information
reasonerjt committed Aug 23, 2021
1 parent 94549ab commit f8cabd3
Show file tree
Hide file tree
Showing 13 changed files with 298 additions and 45 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/crds-verify-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
build-cli:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
# Look for a CLI that's made for this PR
- name: Fetch built CLI
id: cache
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/e2e-test-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
# Look for a CLI that's made for this PR
- name: Fetch built CLI
id: cli-cache
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ _testmain.go
*.test
*.prof

debug

/velero
.idea/

Expand All @@ -49,4 +47,4 @@ tilt-resources/tilt-settings.json
tilt-resources/velero_v1_backupstoragelocation.yaml
tilt-resources/deployment.yaml
tilt-resources/restic.yaml
tilt-resources/cloud
tilt-resources/cloud
1 change: 1 addition & 0 deletions changelogs/unreleased/4022-reasonerjt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Implement velero debug
4 changes: 1 addition & 3 deletions config/crd/v1/bases/velero.io_restores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1242,9 +1242,7 @@ spec:
lifecycle, when it might take a long time
to load data or warm a cache, than during
steady-state operation. This cannot be
updated. This is a beta feature enabled
by the StartupProbe feature flag. More
info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
properties:
exec:
description: One and only one of the
Expand Down
2 changes: 1 addition & 1 deletion config/crd/v1/crds/crds.go

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions config/crd/v1beta1/bases/velero.io_restores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1220,9 +1220,8 @@ spec:
at the beginning of a Pod''s lifecycle,
when it might take a long time to load data
or warm a cache, than during steady-state
operation. This cannot be updated. This
is a beta feature enabled by the StartupProbe
feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
operation. This cannot be updated. More
info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
properties:
exec:
description: One and only one of the following
Expand Down
2 changes: 1 addition & 1 deletion config/crd/v1beta1/crds/crds.go

Large diffs are not rendered by default.

21 changes: 8 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
github.com/Azure/azure-sdk-for-go v42.0.0+incompatible
github.com/Azure/go-autorest/autorest v0.9.6
github.com/Azure/go-autorest/autorest v0.11.1
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2
github.com/Azure/go-autorest/autorest/to v0.3.0
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
Expand All @@ -14,9 +14,8 @@ require (
github.com/fatih/color v1.10.0
github.com/gobwas/glob v0.2.3
github.com/gofrs/uuid v3.2.0+incompatible
github.com/golang/protobuf v1.4.2
github.com/golang/protobuf v1.4.3
github.com/google/uuid v1.1.2
github.com/googleapis/gnostic v0.5.2 // indirect
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd
github.com/hashicorp/go-plugin v0.0.0-20190610192547-a1bc61569a26
github.com/joho/godotenv v1.3.0
Expand All @@ -30,22 +29,18 @@ require (
github.com/spf13/afero v1.2.2
github.com/spf13/cobra v1.1.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.5.1
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee // indirect
github.com/stretchr/testify v1.6.1
github.com/vmware-tanzu/crash-diagnostics v0.3.4
golang.org/x/mod v0.3.0
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/grpc v1.31.0
k8s.io/api v0.19.12
k8s.io/api v0.20.9
k8s.io/apiextensions-apiserver v0.19.12
k8s.io/apimachinery v0.19.12
k8s.io/cli-runtime v0.19.12
k8s.io/client-go v0.19.12
k8s.io/apimachinery v0.20.9
k8s.io/cli-runtime v0.20.9
k8s.io/client-go v0.20.9
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.3.0 // indirect
k8s.io/kube-aggregator v0.19.12
k8s.io/utils v0.0.0-20201005171033-6301aaf42dc7 // indirect
sigs.k8s.io/cluster-api v0.3.11-0.20210106212952-b6c1b5b3db3d
sigs.k8s.io/controller-runtime v0.7.1-0.20201215171748-096b2e07c091
)
Expand Down
Loading

0 comments on commit f8cabd3

Please sign in to comment.