Skip to content

Commit

Permalink
store podbee as a configmap -- removed flask server
Browse files Browse the repository at this point in the history
  • Loading branch information
YoucefGuichi committed Aug 30, 2024
1 parent a8cfa01 commit bc479b5
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 55 deletions.
7 changes: 0 additions & 7 deletions .dockerignore

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

26 changes: 15 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
FROM python:3.11.9-slim

WORKDIR /podbee/

RUN apt update && apt install -y curl wireshark tcpdump nmap iputils-ping traceroute iftop mtr iperf dnsutils telnet

COPY . .

RUN pip install -r requirements.txt

CMD uvicorn server:app --host 0.0.0.0 --port 80
FROM debian:stable-slim

RUN apt update && apt install -y \
curl \
wireshark \
tcpdump \
nmap \
iputils-ping \
traceroute \
iftop \
mtr \
iperf \
dnsutils \
telnet \
&& rm -rf /var/lib/apt/lists/*
68 changes: 55 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,64 @@

PodBee is an open-source debugging pod that collects a curated stack of tools for everyday debugging needs.

Version `0.1.1` includes the subsequent tools
---
- `wireshark`
- `tcpdump`
- `nmap`
- `iputils-ping`
- `traceroute`
- `iftop`
- `mtr`
- `iperf`
- `dnsutils`
## Usage

```bash
kubectl run podbee --image ghcr.io/biznesbees/podbee:v0.1.1
We recommend to store the pod configuration in a ConfigMap, and run the pod whenever you need it.

```
# podbee.yaml
apiVersion: v1
data:
pod: |
apiVersion: v1
kind: Pod
metadata:
name: podbee
annotations:
linkerd.io/inject: disabled // if you have linkerd
spec:
containers:
- image: ghcr.io/biznesbees/podbee:v0.1.3
name: podbee
command:
- /bin/bash
- -c
- |
while true; do date; sleep 2; done
resources:
limits:
cpu: 2
memory: 250Mi
requests:
cpu: 10m
memory: 250Mi
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 10001
capabilities:
add: ["NET_ADMIN", "SYS_TIME"]
dnsPolicy: ClusterFirst
restartPolicy: Always
kind: ConfigMap
metadata:
name: podbee
namespace: default
```

Save the configuration into a ConfigMap.
```
kubectl apply -f podbee.yaml
```

Whenever you need it, run:
```
kubectl get cm podbee -o jsonpath='{.data.pod}' | kubectl apply -f -
```
Voilaa, Happy debugging!

## Contributing

Contributions are welcome! Whether it's bug fixes, feature enhancements, or documentation improvements, feel free to submit a pull request.
13 changes: 0 additions & 13 deletions requirements.txt

This file was deleted.

10 changes: 0 additions & 10 deletions server.py

This file was deleted.

0 comments on commit bc479b5

Please sign in to comment.