Skip to content

Commit

Permalink
Merge pull request #51 from siemens/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
thediveo authored Apr 22, 2024
2 parents 87f5733 + fd8221c commit b7d60e1
Show file tree
Hide file tree
Showing 25 changed files with 966 additions and 247 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
![goroutines](https://img.shields.io/badge/go%20routines-not%20leaking-success)
![file descriptors](https://img.shields.io/badge/file%20descriptors-not%20leaking-success)
[![Go Report Card](https://goreportcard.com/badge/github.com/siemens/ghostwire/v2)](https://goreportcard.com/report/github.com/siemens/ghostwire/v2)
![Coverage](https://img.shields.io/badge/Coverage-72.6%25-yellow)
![Coverage](https://img.shields.io/badge/Coverage-77.4%25-yellow)

**G(h)ostwire** discovers the virtual (or not) network configuration inside
_Linux_ hosts – and can be deployed as a REST service or consumed as a Go
Expand Down
2 changes: 1 addition & 1 deletion deployments/gostwire/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# image versions.
ARG ALPINE_VERSION=3.19
ARG ALPINE_PATCH=1
ARG GO_VERSION=1.21.7
ARG GO_VERSION=1.22.2
ARG NODE_VERSION=21

# Go build settings
Expand Down
11 changes: 6 additions & 5 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,12 @@ container engine, such as the engine's `ID`, `Type` and `API` endpoint path.
## Turtle Finder

Gostwire's unique `turtlefinder.TurtleFinder` auto-detects container engines in
the process tree and then continously watches their container workload in the
background. Additionally, the hierarchy of container engines is detected, such
as when operating a container engine inside a container in case of [Kubernetes
in Docker (KinD)](https://github.com/kubernetes-sigs/kind).
Gostwire leverages the [turtlefinder](https://github.com/siemens/turtlefinder)
package to auto-detect container engines in the process tree and then
continously watching their container workload in the background. Additionally,
the hierarchy of container engines is detected, such as when operating a
container engine inside a container in case of [Kubernetes in Docker
(KinD)](https://github.com/kubernetes-sigs/kind).

The `TurtleFinder` implements the lxkns interface `containerizer.Containerizer`
with the logic to auto-detect container engine processes and then querying their
Expand Down
9 changes: 6 additions & 3 deletions docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ highly recommend at least kernel version 5.6 or later.
## Name and Mascot

The name "G(h)ostwire" sprang from the view of virtual (VETH) wires somehow
belonging to the (\*cough\*, _ethereal_) world of ghosts. As a nod to the
implementation language our mascot is a Go Gopher under a fake Ghost (Specte)
blanket.
belonging to the (*_cough_*,
[ethereal](https://www.wireshark.org/news/20060607.html)) world of ghosts. As a
nod to the implementation language our mascot is a Go Gopher under a fake Ghost
(Specte) blanket. [Spectre
v1](https://en.wikipedia.org/wiki/Spectre_(security_vulnerability)) might have
been influential, too.
7 changes: 4 additions & 3 deletions docs/terminology.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The engine detection bases on daemon process names.

#### Detector

A Gostwire plugin that detects if a given process is a particular container
engine and then contacts its API for discovering the containers this particular
engine manages. The Detector plugin group name is `"turtlefinders"`.
A [turtlefinder](https://github.com/siemens/turtlefinder) plugin that detects if
a given process is a particular container engine and then contacts its API for
discovering the containers this particular engine manages. The Detector plugin
group name is `"turtlefinders"`.
69 changes: 35 additions & 34 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,43 @@ go 1.21
replace github.com/mattn/go-sqlite3 => github.com/mattn/go-sqlite3 v1.14.12

require (
github.com/cenkalti/backoff/v4 v4.2.1
github.com/containernetworking/cni v1.1.2
github.com/docker/docker v25.0.3+incompatible
github.com/cenkalti/backoff/v4 v4.3.0
github.com/containernetworking/cni v1.2.0
github.com/docker/docker v26.0.2+incompatible
github.com/dustinkirkland/golang-petname v0.0.0-20231002161417-6a283f1aaaf2
github.com/getkin/kin-openapi v0.123.0
github.com/google/nftables v0.1.0
github.com/getkin/kin-openapi v0.124.0
github.com/google/nftables v0.2.1-0.20240422065334-aa8348f7904c
github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.1
github.com/jinzhu/copier v0.4.0
github.com/ohler55/ojg v1.21.3
github.com/onsi/ginkgo/v2 v2.15.0
github.com/onsi/gomega v1.31.1
github.com/ohler55/ojg v1.21.5
github.com/onsi/ginkgo/v2 v2.17.1
github.com/onsi/gomega v1.33.0
github.com/ory/dockertest v3.3.5+incompatible
github.com/ory/dockertest/v3 v3.10.0
github.com/siemens/ieddata v1.0.0
github.com/siemens/mobydig v1.0.0
github.com/siemens/mobydig v1.1.0
github.com/siemens/turtlefinder v1.1.3
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
github.com/thediveo/deferrer v0.1.0
github.com/thediveo/fdooze v0.3.1
github.com/thediveo/go-plugger/v3 v3.1.0
github.com/thediveo/ioctl v0.9.3
github.com/thediveo/lxkns v0.32.4
github.com/thediveo/lxkns v0.33.1
github.com/thediveo/namspill v0.1.6
github.com/thediveo/netdb v1.1.0
github.com/thediveo/notwork v1.4.1
github.com/thediveo/nufftables v0.8.0
github.com/thediveo/netdb v1.1.2
github.com/thediveo/notwork v1.5.0
github.com/thediveo/nufftables v0.9.0
github.com/thediveo/osrelease v1.0.2
github.com/thediveo/procfsroot v1.0.1
github.com/thediveo/spaserve v1.0.2
github.com/thediveo/success v1.0.2
github.com/thediveo/testbasher v1.0.8
github.com/thediveo/whalewatcher v0.11.2
github.com/thediveo/whalewatcher v0.11.3
github.com/vishvananda/netlink v1.2.1-beta.2.0.20240223175432-6ab7f5a3765c
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
golang.org/x/sys v0.17.0
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f
golang.org/x/sys v0.19.0
golang.org/x/text v0.14.0
sigs.k8s.io/kind v0.22.0
)
Expand All @@ -52,21 +52,22 @@ require (
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20231105174938-2b5cbb29f3e2 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.11.4 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/containerd v1.7.13 // indirect
github.com/containerd/containerd v1.7.14 // indirect
github.com/containerd/continuity v0.4.3 // indirect
github.com/containerd/fifo v1.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/ttrpc v1.2.2 // indirect
github.com/containerd/ttrpc v1.2.3 // indirect
github.com/containerd/typeurl/v2 v2.1.1 // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/cli v25.0.3+incompatible // indirect
github.com/docker/cli v25.0.4+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
github.com/docker/go-units v0.5.0 // indirect
Expand All @@ -78,11 +79,10 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/swag v0.22.8 // indirect
github.com/go-ping/ping v1.1.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 // indirect
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
Expand All @@ -93,15 +93,16 @@ require (
github.com/invopop/yaml v0.2.0 // indirect
github.com/jmoiron/sqlx v1.3.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 // indirect
github.com/josharian/native v1.1.0 // indirect
github.com/klauspost/compress v1.17.5 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-sqlite3 v1.14.17 // indirect
github.com/mdlayher/netlink v1.4.2 // indirect
github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb // indirect
github.com/miekg/dns v1.1.55 // indirect
github.com/mdlayher/netlink v1.7.2 // indirect
github.com/mdlayher/socket v0.5.0 // indirect
github.com/miekg/dns v1.1.59 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/sys/mountinfo v0.7.1 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
Expand All @@ -117,9 +118,10 @@ require (
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus-community/pro-bing v0.4.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/thediveo/go-mntinfo v1.0.2 // indirect
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
github.com/vishvananda/netns v0.0.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
Expand All @@ -128,18 +130,17 @@ require (
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/tools v0.18.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/grpc v1.62.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/grpc v1.62.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools v2.2.0+incompatible // indirect
honnef.co/go/tools v0.2.2 // indirect
k8s.io/cri-api v0.29.2 // indirect
k8s.io/cri-api v0.29.3 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit b7d60e1

Please sign in to comment.