Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ __pycache__/
nohup.out
/tmp
*.db
zig-out/
.zig-cache/
docs/
30 changes: 0 additions & 30 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,14 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: detect-private-key
- id: check-merge-conflict
- id: check-docstring-first
- id: check-ast
- id: check-added-large-files
- id: check-yaml
- id: no-commit-to-branch
args:
- --branch=main
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/python-poetry/poetry
rev: '2.0.1'
hooks:
- id: poetry-check
- id: poetry-lock
- repo: https://github.com/PyCQA/isort
rev: '6.0.0'
hooks:
- id: isort
- repo: https://github.com/PyCQA/bandit
rev: '1.8.2'
hooks:
- id: bandit
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.15.0'
hooks:
- id: mypy
args: [--strict]
additional_dependencies: [rich]
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# kubectlgetall 0.5.0 (2026-02-01)

## Features

- Version flag, `--version` flag can be used to get the current version of the application.
- Zig port. This release has moved the application to zig 0.15.2.
This has the added advantage of shipping binaries for cross-platform.
Only Linux x86_64 has being tested locally.

## Misc

- Add release scripts to build the different platform releases.
- Configure changelog to be a zig build command


# Kubectlgetall 0.4.0 (2025-02-09)

### Features
Expand Down
92 changes: 55 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,79 @@ List all CR's for all CRD types on a cluster in a given namespace.
**Requires kubectl to be installed.**

## Installation
Installing with no external dependencies.
Install it to a user-writable directory like `~/.local/bin` and ensure it is on your `PATH`.

### Prebuilt release
Download the matching archive from the GitHub Releases page, then extract and
install it:

```shell
pipx install kubectallgetall
tar -xzf kubectlgetall_<version>_<os>_<arch>.tar.gz
mkdir -p ~/.local/bin
cp kubectlgetall ~/.local/bin/
```

Install with nice formatting.
### Build from source
```shell
pipx install kubectallgetall[rich]
zig build -Doptimize=ReleaseSmall -p ~/.local
```

Make sure `~/.local/bin` is on your `PATH`.

## Usage

```shell
kubectlgetall <namespace>
kubectlgetall -n <namespace>
```

There are some flags that can be passed.
```shell
kubectlgetall --help
usage: kubectlgetall [-h] [-n NAMESPACE] [-A] [--version] [-s]
[-e [EXCLUDE ...]] [-o {tty,json,sqlite}] [-d DATABASE]
[-l LABEL] [--debug]

Returns a list of CR for the different CRDs in a given namespace

options:
-h, --help show this help message and exit
-n, --namespace NAMESPACE
Namespace to get resources from.
-A, --all-namespaces If present, list all objects across all namespaces.
Specifinig --namespace will be ignored
--version show program's version number and exit
-s, --sort Prints the resources in an order. Initial results take
longer to show. Unsorted return results faster but can
hit rate limits.
-e, --exclude [EXCLUDE ...]
Exclude crd types. Multiple can be excluded eg: "-e
<CRD> <CRD>"
-o, --output {tty,json,sqlite}
Changes the output format of the results (default:
tty)
-d, --database DATABASE
Path to the sqlite file to save the results. If the
file does not exist it will be created.
-l, --label LABEL Set the label that will be saved with entries when
using the --database option.
--debug Enable debug mode.
-h, --help
Display this help and exit.

-n, --namespace <STR>
Namespace to get resources from.

-A, --all-namespaces
If present, list all objects across all namespaces. Specifing --namespace will be ignored.

-s, --sort
Prints the resources in order.

-e, --exclude <STR>...
Exclude crd types. Multiple can be excluded eg: "-e <CRD> -e <CRD>"

-o, --output <OUTPUT>
Changes the output format of the results.

-d, --database <PATH>
Path to the sqlite file to save the results. If the files does not exist it will be created.

-l, --label <STR>
Set the label that will be saved with entries when using the --database option.

--log-level <LEVEL>
Set the log level. All logs are saved to file. Possible values are (debug, info, warn, error). Defualt level is warn.

--version
Display verson, and exit.

```

## Dev
### Creating the changelog

On new changes a news fragment is required.
This can be created by and news fragments to the `changes` directory.
These files are should have the following naming schema `<issue id>.<feature|bugfix|dic|removal|misc>`.
Using `towncrier create -c "change message" <file name>` will also create the file for you in the correct location.
For new changes a news fragment is required. Add a fragment to
`changelog.d/` with the naming schema
`<issue id>.<feature|bugfix|doc|removal|misc>`.
Using `towncrier create -c "change message" <file name>` will create the file
for you in the correct location.

### Release process
1. Ensure all changes have news fragments in `changelog.d/`.
2. Update the version in `build.zig.zon`.
3. Run `zig build changelog_release` to update `CHANGELOG.md`.
4. Run `zig build release` to generate release archives in `dist/`.
5. Tag and publish the release with the generated archives and changelog.

Loading