Metadata-Version: 2.4
Name: kubeegg
Version: 0.1.0
Summary: Generate Kustomize-ready Kubernetes manifests from Pterodactyl/Pelican game eggs.
Project-URL: Homepage, https://example.com
Author: kubeegg
License: MIT License
        
        Copyright (c) 2026 Nick Majkic
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: game-server,gitops,kubernetes,kustomize,pelican,pterodactyl
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: rich>=13.7
Requires-Dist: ruamel-yaml>=0.18
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

[![CI](https://github.com/NickMagic25/kubeegg/actions/workflows/ci.yml/badge.svg)](https://github.com/NickMagic25/kubeegg/actions/workflows/ci.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=NickMagic25_kubeegg&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=NickMagic25_kubeegg)
# kubeegg

`kubeegg` is a terminal CLI that converts a Pelican / Pterodactyl game egg JSON into a Kustomize-ready Kubernetes manifest set.

## Build & Install (Required)

```bash
uv sync
uv build
uv tool install dist/*.whl
```

Verify:

```bash
kubeegg --help
```

## Usage

```bash
kubeegg <URL-or-path-to-egg.json>
```

Examples:

```bash
kubeegg egg-paper.json
kubeegg https://github.com/pterodactyl/game-eggs/blob/main/minecraft/java/paper/egg-paper.json
```

By default, manifests are written into the current directory. To write to another existing directory:

```bash
kubeegg <egg.json> --out ./some/path
```

To write the Secret as a SOPS-compatible filename:

```bash
kubeegg <egg.json> --sops
```

## Output

The following files are generated in the output directory:

- `kustomization.yaml`
- `namespace.yaml`
- `pvc.yaml`
- `fm-config-pvc.yaml` (file manager config PVC)
- `deployment.yaml`
- `ftp-deployment.yaml` (file manager deployment)
- `service.yaml`
- `ftp-service.yaml` (file manager web UI Service)
- `configmap.yaml` (only if non-sensitive env vars are provided)
- `secret.yaml` (only if sensitive env vars are provided)
- `installer-configmap.yaml` (only if an egg installer script is enabled)

## Notes

- All Services are `ClusterIP` only.
- Storage uses a ReadWriteMany PVC for game data, plus a separate 1Gi ReadWriteOnce PVC mounted at `/config` for the file manager.
- The sidecar exposes a single web UI port for file uploads/downloads.
- No Ingress, Gateway, or LoadBalancer resources are created.
- File manager credentials are not injected; manage users via the file manager UI.
- File manager mounts the PVC at `/data` and `/config` per the image's expectations. citeturn0view0
- Pod security context sets RuntimeDefault seccomp and drops all capabilities. Both pods run as non-root UID/GID 1000 with fsGroup 1000.
- Egg startup commands are exposed via a `STARTUP` environment variable when available.
- If the startup command contains `{{SERVER_MEMORY}}` and a memory limit is set, kubeegg replaces it with the limit (in MB).
- If an egg contains an installer script, kubeegg can add an initContainer that runs it once (guarded by a marker file in the PVC).
- Manifests are deterministic and GitOps-friendly.

[![SonarQube Cloud](https://sonarcloud.io/images/project_badges/sonarcloud-highlight.svg)](https://sonarcloud.io/summary/new_code?id=NickMagic25_kubeegg)
