Skip to content

Commit a8e81c9

Browse files
committed
feat: Add k9s integration for mittens plugin
- Implemented a k9s plugin for mittens to enable service tapping directly from the k9s terminal UI. - Added installation instructions and usage examples in the documentation. - Created a YAML configuration file for the k9s plugin. - Updated the README with development guidelines and contribution instructions. - Added scripts for building and managing the project. - Introduced a new entrypoint script for the mitmproxy container to facilitate interactive sessions. - Implemented comprehensive unit tests for the new functionality in `tap_test.go`.
1 parent 93a1c67 commit a8e81c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1771
-856
lines changed

.github/ISSUE_TEMPLATE/bug_report_kubetap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
name: Bug Report
3-
about: Create a bug report for kubetap
3+
about: Create a bug report for mittens
44
title: ''
5-
labels: 'bug/kubetap'
5+
labels: 'bug/mittens'
66
assignees: ''
77

88
---

.github/workflows/build.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [master]
6+
tags: [v*.*.*]
7+
8+
permissions:
9+
contents: write # for releases and tags
10+
packages: write # for GHCR push
11+
12+
jobs:
13+
lint-test:
14+
name: Lint and Test
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 10
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- uses: actions/setup-go@v6
21+
with:
22+
go-version: "1.25"
23+
24+
- name: golangci-lint
25+
uses: golangci/golangci-lint-action@v9
26+
with:
27+
version: latest
28+
args: --timeout 5m
29+
30+
- name: Run tests
31+
run: go test -count=1 -race -coverprofile=coverage.txt ./...
32+
33+
- name: Upload coverage
34+
uses: codecov/codecov-action@v3
35+
with:
36+
files: ./coverage.txt
37+
38+
build:
39+
name: Build Binaries
40+
needs: lint-test
41+
runs-on: ubuntu-latest
42+
timeout-minutes: 15
43+
steps:
44+
- uses: actions/checkout@v6
45+
46+
- uses: actions/setup-go@v6
47+
with:
48+
go-version: "1.25"
49+
50+
- name: Build
51+
run: go install -trimpath -ldflags="-s -w" ./cmd/kubectl-mittens
52+
53+
docker:
54+
name: Build Docker Images
55+
needs: lint-test
56+
runs-on: ubuntu-latest
57+
timeout-minutes: 20
58+
steps:
59+
- uses: actions/checkout@v6
60+
61+
- uses: docker/setup-buildx-action@v3
62+
63+
- uses: docker/login-action@v3
64+
with:
65+
registry: ghcr.io
66+
username: ${{ github.actor }}
67+
password: ${{ secrets.GITHUB_TOKEN }}
68+
69+
- uses: docker/build-push-action@v6
70+
with:
71+
context: .
72+
push: true
73+
tags: |
74+
ghcr.io/${{ github.repository_owner }}/mittens-mitmproxy:latest
75+
ghcr.io/${{ github.repository_owner }}/mittens-mitmproxy:${{ github.sha }}
76+
77+
- uses: docker/build-push-action@v6
78+
with:
79+
context: .
80+
dockerfile: Dockerfile.alpine
81+
push: true
82+
tags: |
83+
ghcr.io/${{ github.repository_owner }}/mittens-mitmproxy:alpine
84+
ghcr.io/${{ github.repository_owner }}/mittens-mitmproxy:alpine-${{ github.sha }}
85+
86+
release:
87+
name: Release
88+
if: startsWith(github.ref, 'refs/tags/')
89+
needs: [lint-test, build, docker]
90+
runs-on: ubuntu-latest
91+
timeout-minutes: 15
92+
steps:
93+
- uses: actions/checkout@v6
94+
with:
95+
fetch-depth: 0
96+
97+
- uses: actions/setup-go@v6
98+
with:
99+
go-version: "1.25"
100+
101+
- name: Run GoReleaser
102+
uses: goreleaser/goreleaser-action@v6
103+
with:
104+
version: latest
105+
args: release --clean
106+
env:
107+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108+
109+
- name: Update krew plugin
110+
if: "!contains(github.ref, '-')"
111+
uses: rajatjindal/krew-release-bot@v0.0.47

.github/workflows/docs.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
1-
name: Docs
1+
name: docs
22

33
on:
44
push:
5-
branches: [ master ]
6-
paths:
7-
- 'docs/**'
5+
branches: [master]
6+
paths: [docs/**, mkdocs.yml]
87

98
jobs:
109
deploy:
10+
name: Build and Deploy Docs
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v6
13+
- uses: actions/checkout@v6
1514
with:
1615
fetch-depth: 0
17-
18-
- name: Set up Python
19-
uses: actions/setup-python@v6
16+
17+
- uses: actions/setup-python@v5
2018
with:
21-
python-version: '3.x'
22-
23-
- name: Install mkdocs
19+
python-version: "3.x"
20+
21+
- name: Install dependencies
2422
run: |
25-
python -m pip install --upgrade pip setuptools wheel
23+
pip install --upgrade pip setuptools wheel
2624
pip install mkdocs mkdocs-material
27-
25+
2826
- name: Build site
2927
run: mkdocs build
30-
28+
3129
- name: Deploy to GitHub Pages
3230
uses: peaceiris/actions-gh-pages@v4
3331
with:
3432
github_token: ${{ secrets.GITHUB_TOKEN }}
3533
publish_dir: ./site
3634
publish_branch: gh-pages
37-
user_name: kubetap-bot
35+
user_name: mittens-bot
3836
user_email: noreply@github.com
3937

.github/workflows/kubectl-tap-pr.yml

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)