Skip to content

Commit fd6af65

Browse files
authored
Merge pull request #294 from replicatedhq/divolgin/no-rrd
Remove RRD dependency and switch to dynamic linking
2 parents 4e74fd2 + 9e669b3 commit fd6af65

File tree

16 files changed

+4
-1696
lines changed

16 files changed

+4
-1696
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ endif
3030
define LDFLAGS
3131
-ldflags "\
3232
-s -w \
33-
-extldflags \"-static\" \
3433
-X ${VERSION_PACKAGE}.version=${VERSION} \
3534
-X ${VERSION_PACKAGE}.gitSHA=${GIT_SHA} \
3635
-X ${VERSION_PACKAGE}.buildTime=${DATE} \

README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,3 @@ For details on creating the custom resource files that drive support-bundle coll
3939
# Community
4040

4141
For questions about using Troubleshoot, there's a [Replicated Community](https://help.replicated.com/community) forum, and a [#app-troubleshoot channel in Kubernetes Slack](https://kubernetes.slack.com/channels/app-troubleshoot).
42-
43-
# Building
44-
45-
The following packages are required for building the project from source code:
46-
47-
pkg-config
48-
librrd-dev
49-
libglib2.0-dev
50-
libcairo2-dev
51-
libpango1.0-dev
52-
libpixman-1-dev
53-
libpng-dev
54-
libsdl-pango-dev
55-
libthai-dev
56-
libpcre3-dev
57-
58-
There are known issues with libc6 2.27-3ubuntu1.2 on Ubuntu 18. Upgrading to 2.27-3ubuntu1.3 (apt-get install libc6) resolves these.

deploy/.goreleaser.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ builds:
1010
goarch:
1111
- amd64
1212
env:
13-
- CGO_ENABLED=1
13+
- CGO_ENABLED=0
1414
- GO111MODULE=on
1515
main: ffi/main.go
1616
flags: -buildmode=c-shared
@@ -23,13 +23,12 @@ builds:
2323
goarch:
2424
- amd64
2525
env:
26-
- CGO_ENABLED=1
26+
- CGO_ENABLED=0
2727
main: cmd/preflight/main.go
2828
ldflags: -s -w
2929
-X github.com/replicatedhq/troubleshoot/pkg/version.version={{.Version}}
3030
-X github.com/replicatedhq/troubleshoot/pkg/version.gitSHA={{.Commit}}
3131
-X github.com/replicatedhq/troubleshoot/pkg/version.buildTime={{.Date}}
32-
-extldflags "-static"
3332
flags: -tags netgo -installsuffix netgo
3433
binary: preflight
3534
hooks: {}
@@ -45,7 +44,6 @@ builds:
4544
-X github.com/replicatedhq/troubleshoot/pkg/version.version={{.Version}}
4645
-X github.com/replicatedhq/troubleshoot/pkg/version.gitSHA={{.Commit}}
4746
-X github.com/replicatedhq/troubleshoot/pkg/version.buildTime={{.Date}}
48-
-extldflags "-static"
4947
flags: -tags netgo -installsuffix netgo
5048
binary: preflight
5149
hooks: {}
@@ -56,13 +54,12 @@ builds:
5654
goarch:
5755
- amd64
5856
env:
59-
- CGO_ENABLED=1
57+
- CGO_ENABLED=0
6058
main: cmd/troubleshoot/main.go
6159
ldflags: -s -w
6260
-X github.com/replicatedhq/troubleshoot/pkg/version.version={{.Version}}
6361
-X github.com/replicatedhq/troubleshoot/pkg/version.gitSHA={{.Commit}}
6462
-X github.com/replicatedhq/troubleshoot/pkg/version.buildTime={{.Date}}
65-
-extldflags "-static"
6663
flags: -tags netgo -installsuffix netgo
6764
binary: support-bundle
6865
hooks: {}
@@ -78,7 +75,6 @@ builds:
7875
-X github.com/replicatedhq/troubleshoot/pkg/version.version={{.Version}}
7976
-X github.com/replicatedhq/troubleshoot/pkg/version.gitSHA={{.Commit}}
8077
-X github.com/replicatedhq/troubleshoot/pkg/version.buildTime={{.Date}}
81-
-extldflags "-static"
8278
flags: -tags netgo -installsuffix netgo
8379
binary: support-bundle
8480
hooks: {}

pkg/analyze/analyzer.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -251,20 +251,6 @@ func Analyze(analyzer *troubleshootv1beta2.Analyze, getFile getCollectedFileCont
251251
}
252252
return []*AnalyzeResult{result}, nil
253253
}
254-
if analyzer.Collectd != nil {
255-
isExcluded, err := isExcluded(analyzer.Collectd.Exclude)
256-
if err != nil {
257-
return nil, err
258-
}
259-
if isExcluded {
260-
return nil, nil
261-
}
262-
result, err := analyzeCollectd(analyzer.Collectd, findFiles)
263-
if err != nil {
264-
return nil, err
265-
}
266-
return []*AnalyzeResult{result}, nil
267-
}
268254
return nil, errors.New("invalid analyzer")
269255

270256
}

0 commit comments

Comments
 (0)