GithubHelp home page GithubHelp logo

jpbetz / auger Goto Github PK

View Code? Open in Web Editor NEW
374.0 374.0 61.0 151 KB

Directly access data objects stored in etcd by kubernetes.

License: Apache License 2.0

Go 96.46% Makefile 2.34% Dockerfile 1.20%

auger's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auger's Issues

README.md should talk about how to install the software

Hi there!

Since I am not very well versed with go, as much as I would love to use this software, I have no idea how. I first tried:

go get github.com/jpbetz/auger

which gave me this error message:

# cd .; git clone https://github.com/kubernetes-incubator/auger /Users/anasharm/workspace/go-apps/src/github.com/kubernetes-incubator/auger
Cloning into '/Users/anasharm/workspace/go-apps/src/github.com/kubernetes-incubator/auger'...
remote: Repository not found.
fatal: repository 'https://github.com/kubernetes-incubator/auger/' not found
package github.com/kubernetes-incubator/auger/cmd: exit status 128

I cloned the repo. Tried running the following:

make build

and it gave this error:

ARCH=amd64 go build -o build/auger
main.go:22:2: cannot find package "github.com/kubernetes-incubator/auger/cmd" in any of:
	/usr/local/Cellar/go/1.9.4/libexec/src/github.com/kubernetes-incubator/auger/cmd (from $GOROOT)
	/Users/anasharm/workspace/go-apps/src/github.com/kubernetes-incubator/auger/cmd (from $GOPATH)
make: *** [build] Error 1

Sure would be nice to add a section in README.md that talks about how to install this software. I will be happy to do it, and open a PR, if I knew how to make it work ๐Ÿ˜‰

Donate auger to sig-etcd

The auger utility was discussed at the recent sig-etcd meeting, recording (https://youtu.be/M4r6aM45zEk?t=61).

It was proposed the auger utility be adopted by sig-etcd given it is a useful utility that is regularly used by the community[1][2] and specifically the kubernetes etcd user community.

Historically in #30 it was proposed that sig-instrumentation take over ownership for auger however that was prior to sig-etcd existing and sig-etcd is the more natural fit moving forward.

During the sig-etcd meeting both co chairs (@jmhbnz, @wenjiaswe) expressed support, +1s noted in meeting doc.

This issue is intended to confirm repo owner (@jpbetz), sig tech lead (@ahrtr, @serathius) and wider community consensus to proceed and then track work required.


There is some administrivia that needs to be sorted out before the project can be donated:

  • All contributors must have signed the CNCF CLA. This was confirmed in #30.
  • Project must have an acceptable licence - Apache 2.0 is fine.
  • We need an official sig-etcd owner - @siyuanfoundation, @jmhbnz
  • Additions of the standard Kubernetes header to code created by the contributors can occur post-transfer, but should ideally occur shortly thereafter.
  • Repo should contain template files as per the kubernetes-template-project.

cc @logicalhan

have a error in auger analyze

โžœ  auger git:(master) โœ— build/auger analyze -f temp1.db
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xd4efe4]
goroutine 1 [running]:
github.com/coreos/bbolt.(*Bucket).Cursor(...)
        /go/pkg/mod/github.com/coreos/[email protected]/bucket.go:84
github.com/jpbetz/auger/pkg/data.walk.func1(0xc00022c000, 0xf7ea98, 0xc00022c000)
        /go/src/github.com/jpbetz/auger/pkg/data/data.go:421 +0x84
github.com/coreos/bbolt.(*DB).View(0xc000158d20, 0xc0000e1818, 0x0, 0x0)
        /go/pkg/mod/github.com/coreos/[email protected]/db.go:698 +0x90
github.com/jpbetz/auger/pkg/data.walk(0xc000158d20, 0xc0000e18f0, 0x0, 0x0)
        /go/src/github.com/jpbetz/auger/pkg/data/data.go:419 +0x53
github.com/jpbetz/auger/pkg/data.ListKeySummaries(0x7ffedd2842bd, 0x8, 0xc0000e1a78, 0x0, 0x0, 0xc0000e1a7e, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/github.com/jpbetz/auger/pkg/data/data.go:231 +0x27b
github.com/jpbetz/auger/cmd.analyzeValidateAndRun(0x0, 0x0)
        /go/src/github.com/jpbetz/auger/cmd/analyze.go:31 +0x81
github.com/jpbetz/auger/cmd.glob..func1(0x17d1140, 0xc0001576e0, 0x0, 0x2, 0x0, 0x0)
        /go/src/github.com/jpbetz/auger/cmd/analyze.go:15 +0x22
github.com/spf13/cobra.(*Command).execute(0x17d1140, 0xc0001576c0, 0x2, 0x2, 0x17d1140, 0xc0001576c0)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:698 +0x431
github.com/spf13/cobra.(*Command).ExecuteC(0x17d0f20, 0x37, 0xc0000e1f88, 0x4074af)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:783 +0x2ca
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:736
main.main()
        /go/src/github.com/jpbetz/auger/main.go:26 +0x32

Introduce auger 'releases' for each kubernetes version

As @caesarxuchao pointed out to me, auger builds are paired specific kubernetes versions. Each auger build uses the types of exactly one kubernetes version, and the types supported change with each kubernetes version. So we should release auger versions in a way that clearly document which kubernetes versions they are for. A version scheme like 'auger--' might make the most sense. Ideally we would cross build auger against all currently supported kubernetes versions for each auger release and publish releases for all of these.

Donate auger to sig-instrumentation

SIG Instrumentation has expressed interest in owning auger.

I fully support this.

xref: kubernetes/org#2839

There is some administrivia that needs to be sorted out before the project can be donated:

cc @logicalhan

Use with Openshift ?

Would it be possible to use auger on Openshift objects such as Builds, BuildConfigs, DeploymentConfigs etc ?

If I try to decode I get the following error:
cat test.data | auger decode Error: error decoding from application/vnd.kubernetes.storagebinary: no kind "Build" is registered for version "v1"

Improve readability of Makefile

Improve readability of Makefile

Add spaces around ?= and := to improve code readability in the Makefile.

auger/Makefile

Lines 1 to 6 in d41ab0c

NAME?=auger
PKG?=github.com/jpbetz/$(NAME)
GO_VERSION?=1.16.5
GOOS?=linux
GOARCH?=amd64
TEMP_DIR:=$(shell mktemp -d)

Issues at "make release"

Tried to install auger on my linux machine. Did the steps in the instructions until "make release".

$ make release
Building release in temp directory /tmp/tmp.el6JOnIEwF
docker run
-v /tmp/tmp.el6JOnIEwF/auger:/go/src/github.com/jpbetz/auger
-w /go/src/github.com/jpbetz/auger
golang:1.16.5
/bin/bash -c "make -f /go/src/github.com/jpbetz/auger/Makefile release-docker-build GOARCH=amd64 GOOS=linux"
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
export GOPATH=/go
GOOS=linux GOARCH=amd64 GO111MODULE=on go build
go: github.com/google/[email protected] requires
github.com/niemeyer/[email protected]: missing go.sum entry; to add it:
go mod download github.com/niemeyer/pretty
make: *** [/go/src/github.com/jpbetz/auger/Makefile:53: release-docker-build] Error 1
make: *** [Makefile:41: release] Error 2

I checked if pretty is in the go.sum file and it is. Also checked if the module is listed at the go mods.

$ go list -m all | grep pretty
github.com/kr/pretty v0.2.1
github.com/niemeyer/pretty

What can be the problem here?

Thanks for your help :-)

Issue decoding ingress v1

It seems auger is not aware of ingress v1

Error: error decoding from application/vnd.kubernetes.storagebinary: no kind "Ingress" is registered for version "networking.k8s.io/v1"

Error: proto: wrong wireType = 5 for field TypeMeta

Kubernetes cluster: v1.11.6
Auger built from master with go get

Get Error: proto: wrong wireType = 5 for field TypeMeta instead of decoded output from etcdctl command.

Session output:

$ go get -u github.com/jpbetz/auger
$ which auger
/Users/kes/go/bin/auger
$ kubectl exec etcd-kubernetes --namespace=kube-system -i -t -- sh -c 'ETCDCTL_API=3 etcdctl --cacert=/etc/kubernetes/pki/etcd/ca.crt --key=/etc/kubernetes/pki/etcd/healthcheck-client.key --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt get /registry/pods/kube-system/kube-proxy-5vg8r --print-value-only' | auger decode
Error: proto: wrong wireType = 5 for field TypeMeta
Usage:
  auger decode [flags]

Examples:

        ETCDCTL_API=3 etcdctl get /registry/pods/default/<pod-name> \
        --print-value-only | auger decode

Flags:
      --batch-process   If set, deccode batch of objects from os.Stdin
      --file string     Filename to read storage encoded data from
  -h, --help            help for decode
      --meta-only       Output only content type and metadata fields
  -o, --output string   Output format. One of: json|yaml|proto (default "yaml")

proto: wrong wireType = 5 for field TypeMeta
$ 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.