Skip to content

Commit 144fb4b

Browse files
committed
rename everything
1 parent d840f08 commit 144fb4b

12 files changed

+31
-31
lines changed

.github/workflows/checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Cabbage
1+
name: rkubelog
22
on:
33
push:
44
branches:

.github/workflows/docker.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Publish to Registry
1313
uses: elgohr/Publish-Docker-Github-Action@master
1414
with:
15-
name: quay.io/solarwinds/cabbage
15+
name: quay.io/solarwinds/rkubelog
1616
workdir: .
1717
username: turbo
1818
password: ${{ secrets.QUAY_PASSWORD }}

Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
FROM golang:1.15.0-alpine as main
22
RUN apk update && apk add --no-cache git ca-certificates wget && update-ca-certificates
33
RUN wget -O /etc/ssl/certs/papertrail-bundle.pem https://papertrailapp.com/tools/papertrail-bundle.pem
4-
WORKDIR /github.com/solarwinds/cabbage
4+
WORKDIR /github.com/solarwinds/rkubelog
55
ADD . .
6-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags='-w -s -extldflags "-static"' -a -o /cabbage .
6+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags='-w -s -extldflags "-static"' -a -o /rkubelog .
77

88
FROM alpine
99
COPY --from=main /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
1010
COPY --from=main /etc/ssl/certs/papertrail-bundle.pem /etc/ssl/certs/
11-
COPY --from=main /cabbage /app/cabbage
11+
COPY --from=main /rkubelog /app/rkubelog
1212
RUN chmod -R 777 /app
1313
USER 1001
1414
WORKDIR /app
15-
ENTRYPOINT ./cabbage
15+
ENTRYPOINT ./rkubelog

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tests:
88
go test -v ./...
99

1010
build:
11-
go build -o bin/cabbage
11+
go build -o bin/rkubelog
1212

1313
docker:
14-
DOCKER_BUILDKIT=1 docker build -t quay.io/solarwinds/cabbage .
14+
DOCKER_BUILDKIT=1 docker build -t quay.io/solarwinds/rkubelog .

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# Cabbage
1+
# rkubelog
22

3-
Cabbage is the easiest way to get logs out of your k8s cluster and into [Papertrail](https://www.papertrail.com/) and [Loggly](https://www.loggly.com/). Because it doesn't require DaemonSets, sidecars, fluentd or persistent claims, it's one of the only solutions for logging in nodeless clusters, such as EKS on Fargate. But it's also perfect for smaller, local dev clusters to setup logging within seconds.
3+
rkubelog is the easiest way to get logs out of your k8s cluster and into [Papertrail](https://www.papertrail.com/) and [Loggly](https://www.loggly.com/). Because it doesn't require DaemonSets, sidecars, fluentd or persistent claims, it's one of the only solutions for logging in nodeless clusters, such as EKS on Fargate. But it's also perfect for smaller, local dev clusters to setup logging within seconds.
44

55
## Usage
66

77
> __Warning:__ You need a pull secret for quay.io/solarwinds in your cluster! If you don't have access to quay, build the image yourself and push it to your registry.
88
9-
By default, cabbage runs in the `kube-system` namespace and will observe all logs from all pods in all namespaces except from itself or any other service in `kube-system`.
9+
By default, rkubelog runs in the `kube-system` namespace and will observe all logs from all pods in all namespaces except from itself or any other service in `kube-system`.
1010

1111
In `logging-config-patch.yaml` follow the comments to setup the connection to the syslog sink (Papertrail in this example) and set a system tag for the syslog messages.
1212

1313
That's it. Preview with `kubectl apply -k . --dry-run -o yaml` and remove `--dry-run` to apply.
1414

1515
## How it works
1616

17-
Cabbage deploys a customized `kail` in an alpine container, using it to query the k8s API for pods (and keeping the pod list in sync) and their logs. Kail is a command line k8s logging client that lives at the opposite end of the specificity spectrum from `kubectl logs ...`. You can run kail yourself by cloning this repo and running `go run main.go`. This will give you all logs from all pods in all namespaces.
17+
rkubelog deploys a customized `kail` in an alpine container, using it to query the k8s API for pods (and keeping the pod list in sync) and their logs. Kail is a command line k8s logging client that lives at the opposite end of the specificity spectrum from `kubectl logs ...`. You can run kail yourself by cloning this repo and running `go run main.go`. This will give you all logs from all pods in all namespaces.
1818
To learn more about filters, read the [kail usage guide](https://github.com/boz/kail/tree/eb6734178238dc794641e82779855fabc2071e23#usage).
1919

2020
### Papertrail
@@ -58,7 +58,7 @@ make build
5858

5959
To run the code:
6060
```
61-
bin/cabbage
61+
bin/rkubelog
6262
```
6363

6464
You are free to set the described environment variables or pass run time arguments described above and/or follow [kail usage guide](https://github.com/boz/kail/tree/eb6734178238dc794641e82779855fabc2071e23#usage).
@@ -79,4 +79,4 @@ make docker
7979
```
8080

8181
# Questions/Comments?
82-
Please [open an issue](https://github.com/solarwinds/cabbage/issues/new), we'd love to hear from you. As a SolarWinds Project, it is supported in a best-effort fashion.
82+
Please [open an issue](https://github.com/solarwinds/rkubelog/issues/new), we'd love to hear from you. As a SolarWinds Project, it is supported in a best-effort fashion.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/solarwinds/cabbage
1+
module github.com/solarwinds/rkubelog
22

33
go 1.15
44

kustomization.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33

44
bases:
5-
- ./cabbage
5+
- ./rkubelog
66

77
namespace: kube-system
88

@@ -23,12 +23,12 @@ patchesJSON6902:
2323
group: apps
2424
version: v1
2525
kind: Deployment
26-
name: cabbage
26+
name: rkubelog
2727
path: logging-config-patch.yaml
2828

2929
- target:
3030
group: rbac.authorization.k8s.io
3131
version: v1
3232
kind: ClusterRoleBinding
33-
name: cabbage-reader-binding
33+
name: rkubelog-reader-binding
3434
path: namespace-binding-config.yaml

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/boz/kail"
1616
"github.com/boz/kcache/nsname"
1717
"github.com/sirupsen/logrus"
18-
"github.com/solarwinds/cabbage/logshipper"
18+
"github.com/solarwinds/rkubelog/logshipper"
1919
kingpin "gopkg.in/alecthomas/kingpin.v2"
2020
apierrors "k8s.io/apimachinery/pkg/api/errors"
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

cabbage/clusterrole.yaml renamed to rkubelog/clusterrole.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
22
kind: ClusterRole
33
metadata:
44
namespace: default
5-
name: cabbage-reader
5+
name: rkubelog-reader
66
rules:
77
- apiGroups: [""] # "" indicates the core API group
88
resources: ["pods", "pods/log"]
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
apiVersion: v1
22
kind: ServiceAccount
33
metadata:
4-
name: cabbage-sa
4+
name: rkubelog-sa
55
---
66
apiVersion: rbac.authorization.k8s.io/v1
77
kind: ClusterRoleBinding
88
metadata:
9-
name: cabbage-reader-binding
9+
name: rkubelog-reader-binding
1010
roleRef:
1111
apiGroup: rbac.authorization.k8s.io
1212
kind: ClusterRole
13-
name: cabbage-reader
13+
name: rkubelog-reader
1414
subjects:
1515
- kind: ServiceAccount
16-
name: cabbage-sa
16+
name: rkubelog-sa
1717
namespace: kube-system
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: "cabbage"
4+
name: "rkubelog"
55
namespace: "default"
66
labels:
7-
app: cabbage
7+
app: rkubelog
88
spec:
99
replicas: 1
1010
selector:
1111
matchLabels:
12-
app: cabbage
12+
app: rkubelog
1313
template:
1414
metadata:
1515
labels:
1616
kail.ignore: "true"
17-
app: cabbage
17+
app: rkubelog
1818
spec:
19-
serviceAccountName: cabbage-sa
19+
serviceAccountName: rkubelog-sa
2020
containers:
21-
- image: quay.io/solarwinds/cabbage
21+
- image: quay.io/solarwinds/rkubelog
2222
imagePullPolicy: Always
23-
name: "cabbage"
23+
name: "rkubelog"
File renamed without changes.

0 commit comments

Comments
 (0)