elpio 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elpio-0.1.0/.github/workflows/ci.yml +84 -0
- elpio-0.1.0/.github/workflows/release.yml +132 -0
- elpio-0.1.0/.gitignore +40 -0
- elpio-0.1.0/.mcp.json +14 -0
- elpio-0.1.0/CHANGELOG.md +18 -0
- elpio-0.1.0/Dockerfile +17 -0
- elpio-0.1.0/Dockerfile.dispatcher +14 -0
- elpio-0.1.0/LICENSE +21 -0
- elpio-0.1.0/LICENSE-docs +10 -0
- elpio-0.1.0/PKG-INFO +139 -0
- elpio-0.1.0/README.md +100 -0
- elpio-0.1.0/Taskfile.yml +109 -0
- elpio-0.1.0/deploy/crds/elpiofunction.yaml +105 -0
- elpio-0.1.0/deploy/crds/elpioservice.yaml +117 -0
- elpio-0.1.0/deploy/crds/elpiotask.yaml +85 -0
- elpio-0.1.0/deploy/crds/tenant.yaml +107 -0
- elpio-0.1.0/deploy/helm/elpio/Chart.yaml +17 -0
- elpio-0.1.0/deploy/helm/elpio/crds/elpiofunction.yaml +105 -0
- elpio-0.1.0/deploy/helm/elpio/crds/elpioservice.yaml +117 -0
- elpio-0.1.0/deploy/helm/elpio/crds/elpiotask.yaml +85 -0
- elpio-0.1.0/deploy/helm/elpio/crds/tenant.yaml +107 -0
- elpio-0.1.0/deploy/helm/elpio/templates/_helpers.tpl +11 -0
- elpio-0.1.0/deploy/helm/elpio/templates/api.yaml +53 -0
- elpio-0.1.0/deploy/helm/elpio/templates/buildpacks-pipeline.yaml +117 -0
- elpio-0.1.0/deploy/helm/elpio/templates/deployment.yaml +29 -0
- elpio-0.1.0/deploy/helm/elpio/templates/rbac.yaml +75 -0
- elpio-0.1.0/deploy/helm/elpio/templates/webhook.yaml +105 -0
- elpio-0.1.0/deploy/helm/elpio/values.yaml +45 -0
- elpio-0.1.0/deploy/operator/deployment.yaml +35 -0
- elpio-0.1.0/deploy/operator/rbac.yaml +80 -0
- elpio-0.1.0/deploy/tekton/buildpacks-pipeline.yaml +126 -0
- elpio-0.1.0/deploy/webhook/webhook.yaml +104 -0
- elpio-0.1.0/examples/hello-keda.yaml +24 -0
- elpio-0.1.0/examples/hello.yaml +25 -0
- elpio-0.1.0/examples/spero-policy.yaml +72 -0
- elpio-0.1.0/hack/apply_headers.py +131 -0
- elpio-0.1.0/hack/install-knative.sh +42 -0
- elpio-0.1.0/pyproject.toml +62 -0
- elpio-0.1.0/src/elpio/__init__.py +19 -0
- elpio-0.1.0/src/elpio/api/__init__.py +18 -0
- elpio-0.1.0/src/elpio/api/app.py +131 -0
- elpio-0.1.0/src/elpio/api/gateway.py +120 -0
- elpio-0.1.0/src/elpio/banner.py +140 -0
- elpio-0.1.0/src/elpio/cli.py +123 -0
- elpio-0.1.0/src/elpio/dispatcher/__init__.py +20 -0
- elpio-0.1.0/src/elpio/dispatcher/brokers.py +204 -0
- elpio-0.1.0/src/elpio/dispatcher/core.py +107 -0
- elpio-0.1.0/src/elpio/dispatcher/main.py +55 -0
- elpio-0.1.0/src/elpio/engines/__init__.py +19 -0
- elpio-0.1.0/src/elpio/engines/base.py +73 -0
- elpio-0.1.0/src/elpio/engines/keda.py +160 -0
- elpio-0.1.0/src/elpio/engines/knative.py +90 -0
- elpio-0.1.0/src/elpio/function.py +134 -0
- elpio-0.1.0/src/elpio/k8s.py +139 -0
- elpio-0.1.0/src/elpio/models/__init__.py +39 -0
- elpio-0.1.0/src/elpio/models/function.py +59 -0
- elpio-0.1.0/src/elpio/models/service.py +106 -0
- elpio-0.1.0/src/elpio/models/task.py +54 -0
- elpio-0.1.0/src/elpio/models/tenant.py +83 -0
- elpio-0.1.0/src/elpio/notify/__init__.py +34 -0
- elpio-0.1.0/src/elpio/notify/mailer.py +121 -0
- elpio-0.1.0/src/elpio/operator/__init__.py +13 -0
- elpio-0.1.0/src/elpio/operator/function_handlers.py +101 -0
- elpio-0.1.0/src/elpio/operator/handlers.py +83 -0
- elpio-0.1.0/src/elpio/operator/task_handlers.py +59 -0
- elpio-0.1.0/src/elpio/operator/tenant_handlers.py +60 -0
- elpio-0.1.0/src/elpio/providers/__init__.py +31 -0
- elpio-0.1.0/src/elpio/providers/identity.py +150 -0
- elpio-0.1.0/src/elpio/providers/state.py +54 -0
- elpio-0.1.0/src/elpio/status.py +62 -0
- elpio-0.1.0/src/elpio/task.py +145 -0
- elpio-0.1.0/src/elpio/tenant.py +155 -0
- elpio-0.1.0/src/elpio/version.py +11 -0
- elpio-0.1.0/src/elpio/webhook/__init__.py +18 -0
- elpio-0.1.0/src/elpio/webhook/policy.py +84 -0
- elpio-0.1.0/src/elpio/webhook/server.py +45 -0
- elpio-0.1.0/tests/conftest.py +29 -0
- elpio-0.1.0/tests/e2e/kind-config.yaml +8 -0
- elpio-0.1.0/tests/e2e/test_keda_http_scale_to_zero.py +98 -0
- elpio-0.1.0/tests/e2e/test_scale_to_zero.py +94 -0
- elpio-0.1.0/tests/integration/test_brokers_integration.py +113 -0
- elpio-0.1.0/tests/unit/test_api.py +88 -0
- elpio-0.1.0/tests/unit/test_brokers.py +66 -0
- elpio-0.1.0/tests/unit/test_buildpacks_pipeline.py +79 -0
- elpio-0.1.0/tests/unit/test_cli.py +93 -0
- elpio-0.1.0/tests/unit/test_dispatcher.py +102 -0
- elpio-0.1.0/tests/unit/test_function_render.py +92 -0
- elpio-0.1.0/tests/unit/test_gateway.py +100 -0
- elpio-0.1.0/tests/unit/test_identity.py +98 -0
- elpio-0.1.0/tests/unit/test_knative_render.py +90 -0
- elpio-0.1.0/tests/unit/test_notify.py +83 -0
- elpio-0.1.0/tests/unit/test_service_model.py +41 -0
- elpio-0.1.0/tests/unit/test_status.py +54 -0
- elpio-0.1.0/tests/unit/test_task_render.py +81 -0
- elpio-0.1.0/tests/unit/test_tenant_render.py +81 -0
- elpio-0.1.0/tests/unit/test_webhook_policy.py +82 -0
- elpio-0.1.0/uv.lock +1564 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
# Run Node-based actions on Node 24. Several actions we depend on (azure/setup-helm,
|
|
9
|
+
# arduino/setup-task, docker/*) have no Node-24 major yet; this opts them in and
|
|
10
|
+
# silences the Node 20 deprecation.
|
|
11
|
+
env:
|
|
12
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lint:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v5
|
|
19
|
+
- uses: actions/setup-python@v6
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
- uses: arduino/setup-task@v2
|
|
23
|
+
with:
|
|
24
|
+
version: 3.x
|
|
25
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
- run: pip install -e '.[dev]'
|
|
27
|
+
- run: task lint
|
|
28
|
+
|
|
29
|
+
test:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
strategy:
|
|
32
|
+
fail-fast: false
|
|
33
|
+
matrix:
|
|
34
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v5
|
|
37
|
+
- uses: actions/setup-python@v6
|
|
38
|
+
with:
|
|
39
|
+
python-version: ${{ matrix.python-version }}
|
|
40
|
+
- uses: arduino/setup-task@v2
|
|
41
|
+
with:
|
|
42
|
+
version: 3.x
|
|
43
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
44
|
+
- run: pip install -e '.[dev]'
|
|
45
|
+
- run: task unit
|
|
46
|
+
|
|
47
|
+
helm:
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@v5
|
|
51
|
+
- uses: azure/setup-helm@v4
|
|
52
|
+
- run: helm lint deploy/helm/elpio
|
|
53
|
+
- run: helm template elpio deploy/helm/elpio --namespace elpio-system >/dev/null
|
|
54
|
+
|
|
55
|
+
integration:
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
services:
|
|
58
|
+
redis:
|
|
59
|
+
image: redis:7
|
|
60
|
+
ports: ["6379:6379"]
|
|
61
|
+
options: >-
|
|
62
|
+
--health-cmd "redis-cli ping" --health-interval 5s
|
|
63
|
+
--health-timeout 3s --health-retries 5
|
|
64
|
+
rabbitmq:
|
|
65
|
+
image: rabbitmq:3
|
|
66
|
+
ports: ["5672:5672"]
|
|
67
|
+
options: >-
|
|
68
|
+
--health-cmd "rabbitmq-diagnostics -q ping" --health-interval 10s
|
|
69
|
+
--health-timeout 5s --health-retries 10
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v5
|
|
72
|
+
- uses: actions/setup-python@v6
|
|
73
|
+
with:
|
|
74
|
+
python-version: "3.12"
|
|
75
|
+
# NATS needs JetStream (-js), which service containers can't pass; run it directly.
|
|
76
|
+
- name: Start NATS with JetStream
|
|
77
|
+
run: |
|
|
78
|
+
docker run -d --name nats -p 4222:4222 nats:2 -js
|
|
79
|
+
sleep 3
|
|
80
|
+
- run: pip install -e '.[dev,dispatcher]'
|
|
81
|
+
- name: Run integration tests
|
|
82
|
+
env:
|
|
83
|
+
ELPIO_INTEGRATION: "1"
|
|
84
|
+
run: pytest -m integration
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
# Tag a release (`git tag v0.1.0 && git push origin v0.1.0`) to validate, build,
|
|
4
|
+
# and publish:
|
|
5
|
+
# * the `elpio` Python package to PyPI (CLI: `pip install elpio` → `elpio`),
|
|
6
|
+
# via Trusted Publishing (OIDC) — no API token in the repo;
|
|
7
|
+
# * the operator + dispatcher container images to GHCR.
|
|
8
|
+
#
|
|
9
|
+
# One-time PyPI setup: add a pending publisher at
|
|
10
|
+
# https://pypi.org/manage/account/publishing/ — PyPI project `elpio`, owner
|
|
11
|
+
# `altikva`, repo `elpio`, workflow `release.yml`, environment `pypi`.
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
push:
|
|
15
|
+
tags: ["v*.*.*"]
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
# Force Node 24 for actions that have no Node-24 major yet (docker/*,
|
|
21
|
+
# azure/setup-helm, arduino/setup-task) so they don't hit the Node 20 deprecation.
|
|
22
|
+
env:
|
|
23
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
validate:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v5
|
|
30
|
+
- name: Tag must match the package version
|
|
31
|
+
env:
|
|
32
|
+
REF_NAME: ${{ github.ref_name }}
|
|
33
|
+
run: |
|
|
34
|
+
tag="${REF_NAME#v}"
|
|
35
|
+
pkg="$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")"
|
|
36
|
+
echo "tag=$tag package=$pkg"
|
|
37
|
+
if [ "$tag" != "$pkg" ]; then
|
|
38
|
+
echo "::error::tag v$tag does not match pyproject version $pkg"
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
- uses: astral-sh/setup-uv@v8.2.0
|
|
42
|
+
with:
|
|
43
|
+
enable-cache: true
|
|
44
|
+
- name: Lint + test
|
|
45
|
+
run: |
|
|
46
|
+
uv sync --locked --all-extras
|
|
47
|
+
uv run --no-sync ruff check src tests
|
|
48
|
+
uv run --no-sync pytest -m "not e2e and not integration"
|
|
49
|
+
|
|
50
|
+
build:
|
|
51
|
+
needs: validate
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v5
|
|
55
|
+
- uses: astral-sh/setup-uv@v8.2.0
|
|
56
|
+
- name: Build sdist + wheel
|
|
57
|
+
run: uv build
|
|
58
|
+
- name: Check metadata
|
|
59
|
+
run: uvx twine check dist/*
|
|
60
|
+
- name: Smoke-test the built wheel (CLI runs)
|
|
61
|
+
run: |
|
|
62
|
+
uv venv /tmp/smoke
|
|
63
|
+
uv pip install --python /tmp/smoke/bin/python dist/*.whl
|
|
64
|
+
/tmp/smoke/bin/elpio version
|
|
65
|
+
- uses: actions/upload-artifact@v5
|
|
66
|
+
with:
|
|
67
|
+
name: dist
|
|
68
|
+
path: dist/
|
|
69
|
+
|
|
70
|
+
pypi:
|
|
71
|
+
needs: build
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
environment: pypi
|
|
74
|
+
permissions:
|
|
75
|
+
id-token: write # Trusted Publishing (OIDC)
|
|
76
|
+
contents: write # create the GitHub Release
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/download-artifact@v5
|
|
79
|
+
with:
|
|
80
|
+
name: dist
|
|
81
|
+
path: dist/
|
|
82
|
+
- name: Publish to PyPI
|
|
83
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
84
|
+
- name: GitHub Release
|
|
85
|
+
env:
|
|
86
|
+
GH_TOKEN: ${{ github.token }}
|
|
87
|
+
REF_NAME: ${{ github.ref_name }}
|
|
88
|
+
GH_REPO: ${{ github.repository }}
|
|
89
|
+
run: gh release create "$REF_NAME" dist/* --repo "$GH_REPO" --title "$REF_NAME" --generate-notes
|
|
90
|
+
|
|
91
|
+
images:
|
|
92
|
+
needs: validate
|
|
93
|
+
runs-on: ubuntu-latest
|
|
94
|
+
permissions:
|
|
95
|
+
contents: read
|
|
96
|
+
packages: write
|
|
97
|
+
strategy:
|
|
98
|
+
matrix:
|
|
99
|
+
include:
|
|
100
|
+
- image: ghcr.io/altikva/elpio
|
|
101
|
+
dockerfile: Dockerfile
|
|
102
|
+
- image: ghcr.io/altikva/elpio-dispatcher
|
|
103
|
+
dockerfile: Dockerfile.dispatcher
|
|
104
|
+
steps:
|
|
105
|
+
- uses: actions/checkout@v5
|
|
106
|
+
|
|
107
|
+
- uses: docker/setup-qemu-action@v3
|
|
108
|
+
- uses: docker/setup-buildx-action@v3
|
|
109
|
+
|
|
110
|
+
- uses: docker/login-action@v3
|
|
111
|
+
with:
|
|
112
|
+
registry: ghcr.io
|
|
113
|
+
username: ${{ github.actor }}
|
|
114
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
115
|
+
|
|
116
|
+
- id: meta
|
|
117
|
+
uses: docker/metadata-action@v5
|
|
118
|
+
with:
|
|
119
|
+
images: ${{ matrix.image }}
|
|
120
|
+
tags: |
|
|
121
|
+
type=semver,pattern={{version}}
|
|
122
|
+
type=semver,pattern={{major}}.{{minor}}
|
|
123
|
+
type=raw,value=latest
|
|
124
|
+
|
|
125
|
+
- uses: docker/build-push-action@v6
|
|
126
|
+
with:
|
|
127
|
+
context: .
|
|
128
|
+
file: ${{ matrix.dockerfile }}
|
|
129
|
+
platforms: linux/amd64,linux/arm64
|
|
130
|
+
push: true
|
|
131
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
132
|
+
labels: ${{ steps.meta.outputs.labels }}
|
elpio-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
.python-version
|
|
11
|
+
|
|
12
|
+
# Test / tooling
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.ruff_cache/
|
|
15
|
+
.coverage
|
|
16
|
+
htmlcov/
|
|
17
|
+
|
|
18
|
+
# IDE / OS
|
|
19
|
+
.idea/
|
|
20
|
+
.vscode/
|
|
21
|
+
.DS_Store
|
|
22
|
+
|
|
23
|
+
# Local
|
|
24
|
+
*.local
|
|
25
|
+
kubeconfig
|
|
26
|
+
|
|
27
|
+
# Claude Code project memory (kept local, not tracked)
|
|
28
|
+
CLAUDE.md
|
|
29
|
+
|
|
30
|
+
# codegraph index
|
|
31
|
+
.codegraph/
|
|
32
|
+
|
|
33
|
+
# codegraph auth key (never commit)
|
|
34
|
+
.codegraph/auth.key
|
|
35
|
+
|
|
36
|
+
# Claude Code local config
|
|
37
|
+
.claude/
|
|
38
|
+
|
|
39
|
+
# Docs (kept local, not tracked)
|
|
40
|
+
/docs/
|
elpio-0.1.0/.mcp.json
ADDED
elpio-0.1.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Elpio are documented here. Format loosely follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- Initial project scaffold (Altikva open-source product, MIT + CC).
|
|
10
|
+
- `ElpioService` CRD (`elpio.io/v1alpha1`) with scale-to-zero defaults.
|
|
11
|
+
- Kubernetes operator (kopf) reconciling `ElpioService` onto a serving engine.
|
|
12
|
+
- Serving-engine strategy: **Knative** (default) and **KEDA**, behind one CRD.
|
|
13
|
+
- Portability seams: `StateStore`, `IdentityProvider` interfaces.
|
|
14
|
+
- `elpio` CLI: `install`, `deploy`, `services`, `operator`, `version`.
|
|
15
|
+
- `ElpioFunction` / `ElpioTask` stub CRDs (Phase 3).
|
|
16
|
+
- Unit tests (model + engine rendering) and a kind-based e2e harness stub.
|
|
17
|
+
|
|
18
|
+
[Unreleased]: https://github.com/altikva/elpio
|
elpio-0.1.0/Dockerfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Elpio image. Runs `elpio operator` (kopf) by default; the same image also
|
|
2
|
+
# serves the admission webhook and the management API (the `server` extra).
|
|
3
|
+
FROM python:3.12-slim
|
|
4
|
+
|
|
5
|
+
WORKDIR /app
|
|
6
|
+
|
|
7
|
+
# Install deps first for layer caching.
|
|
8
|
+
COPY pyproject.toml README.md ./
|
|
9
|
+
COPY src ./src
|
|
10
|
+
RUN pip install --no-cache-dir '.[server]'
|
|
11
|
+
|
|
12
|
+
# Non-root.
|
|
13
|
+
RUN useradd --create-home --uid 10001 elpio
|
|
14
|
+
USER 10001
|
|
15
|
+
|
|
16
|
+
ENTRYPOINT ["elpio"]
|
|
17
|
+
CMD ["operator"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Elpio task dispatcher image. Runs the worker an ElpioTask scales with KEDA:
|
|
2
|
+
# pulls from the broker queue and POSTs to the handler ElpioService.
|
|
3
|
+
FROM python:3.12-slim
|
|
4
|
+
|
|
5
|
+
WORKDIR /app
|
|
6
|
+
|
|
7
|
+
COPY pyproject.toml README.md ./
|
|
8
|
+
COPY src ./src
|
|
9
|
+
RUN pip install --no-cache-dir '.[dispatcher]'
|
|
10
|
+
|
|
11
|
+
RUN useradd --create-home --uid 10002 elpio
|
|
12
|
+
USER 10002
|
|
13
|
+
|
|
14
|
+
ENTRYPOINT ["python", "-m", "elpio.dispatcher.main"]
|
elpio-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Altikva
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
elpio-0.1.0/LICENSE-docs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Documentation, diagrams, and branding in this repository (the contents of
|
|
2
|
+
docs/, README narrative, and the Elpio name and marks) are licensed under the
|
|
3
|
+
Creative Commons Attribution 4.0 International License (CC BY 4.0).
|
|
4
|
+
|
|
5
|
+
You are free to share and adapt this material for any purpose, even
|
|
6
|
+
commercially, provided you give appropriate credit.
|
|
7
|
+
|
|
8
|
+
Full text: https://creativecommons.org/licenses/by/4.0/legalcode
|
|
9
|
+
|
|
10
|
+
The source code is licensed separately under the MIT License (see LICENSE).
|
elpio-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: elpio
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Turn any Kubernetes cluster into a private serverless platform (Cloud Run / Functions / Tasks).
|
|
5
|
+
Project-URL: Homepage, https://github.com/altikva/elpio
|
|
6
|
+
Project-URL: Repository, https://github.com/altikva/elpio
|
|
7
|
+
Author-email: Joy Ndjama <joy.ndjama@altikva.com>
|
|
8
|
+
License: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: LICENSE-docs
|
|
11
|
+
Keywords: altikva,cloud-run,keda,knative,kubernetes,operator,serverless
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: System :: Clustering
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Requires-Dist: click>=8.1
|
|
18
|
+
Requires-Dist: kopf>=1.37
|
|
19
|
+
Requires-Dist: kubernetes>=29.0
|
|
20
|
+
Requires-Dist: pydantic>=2.5
|
|
21
|
+
Requires-Dist: pyyaml>=6.0
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: fastapi>=0.110; extra == 'dev'
|
|
24
|
+
Requires-Dist: httpx>=0.27; extra == 'dev'
|
|
25
|
+
Requires-Dist: pyjwt>=2.8; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest>=7.4; extra == 'dev'
|
|
27
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
28
|
+
Requires-Dist: uvicorn>=0.27; extra == 'dev'
|
|
29
|
+
Provides-Extra: dispatcher
|
|
30
|
+
Requires-Dist: httpx>=0.27; extra == 'dispatcher'
|
|
31
|
+
Requires-Dist: nats-py>=2.6; extra == 'dispatcher'
|
|
32
|
+
Requires-Dist: pika>=1.3; extra == 'dispatcher'
|
|
33
|
+
Requires-Dist: redis>=5; extra == 'dispatcher'
|
|
34
|
+
Provides-Extra: server
|
|
35
|
+
Requires-Dist: fastapi>=0.110; extra == 'server'
|
|
36
|
+
Requires-Dist: pyjwt>=2.8; extra == 'server'
|
|
37
|
+
Requires-Dist: uvicorn>=0.27; extra == 'server'
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
_____ _ _
|
|
42
|
+
| ____| |_ __ (_) ___
|
|
43
|
+
| _| | | '_ \| |/ _ \
|
|
44
|
+
| |___| | |_) | | (_) |
|
|
45
|
+
|_____|_| .__/|_|\___/
|
|
46
|
+
|_|
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Turn any Kubernetes cluster into a private serverless platform.**
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
**Elpio** is an installable, self-hosted **Cloud Run / Cloud Functions / Cloud Tasks** for
|
|
54
|
+
your own Kubernetes — scale-to-zero, request-driven autoscaling, simplified cluster + node
|
|
55
|
+
autoscaling, and a clean multi-tenant model. GKE-first, **portable by design** (EKS / AKS / k3s).
|
|
56
|
+
|
|
57
|
+
Elpio is an [Altikva](https://altikva.com) open-source product (MIT for code, CC-BY-4.0 for
|
|
58
|
+
docs). The name is a coined mark rooted in Greek *elpis* ("hope") — part of the Altikva family
|
|
59
|
+
lineage *ha-tikva* (Hebrew) → *Spero* (Latin) → *Elpio*.
|
|
60
|
+
|
|
61
|
+
> **Status: alpha (v0.1.0).** All four reconcilers ship: `ElpioService` (Knative/KEDA serving),
|
|
62
|
+
> `ElpioFunction` (Tekton + Buildpacks), `ElpioTask` (KEDA + broker), and `ElpioTenant` (namespace,
|
|
63
|
+
> RBAC, quotas, network isolation). Alongside them: OIDC auth, an admission webhook, a multi-cluster
|
|
64
|
+
> management API, a Helm chart, and CI. CRs emit `status.conditions`, so the sibling agent
|
|
65
|
+
> [Spero](https://github.com/altikva/spero) can supervise and heal them. The kind-based e2e harness
|
|
66
|
+
> is wired and gated behind `ELPIO_E2E=1`.
|
|
67
|
+
|
|
68
|
+
## Why
|
|
69
|
+
|
|
70
|
+
Elpio does **not** reimplement a serverless runtime. It's the opinionated, enterprise control
|
|
71
|
+
plane that assembles proven CNCF primitives — **Knative**, **KEDA**, **Tekton**, **cert-manager**,
|
|
72
|
+
**Karpenter** — behind a declarative CRD/operator model. Its value is the enterprise wrapper the
|
|
73
|
+
public clouds don't give you: on-prem security integration, hard multi-tenancy, golden-path
|
|
74
|
+
config, fleet management, and a one-command installer.
|
|
75
|
+
|
|
76
|
+
## How it works
|
|
77
|
+
|
|
78
|
+
You declare an `ElpioService`; the **operator** reconciles it onto a serving engine. No SSH, no
|
|
79
|
+
imperative `kubectl apply` scripts — just Kubernetes-native reconciliation.
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
apiVersion: elpio.io/v1alpha1
|
|
83
|
+
kind: ElpioService
|
|
84
|
+
metadata:
|
|
85
|
+
name: hello
|
|
86
|
+
spec:
|
|
87
|
+
image: ghcr.io/knative/helloworld-go:latest
|
|
88
|
+
scaling: { minScale: 0, maxScale: 10, target: 100, metric: concurrency }
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
| CRD | Equivalent | Engine |
|
|
92
|
+
|-----|-----------|--------|
|
|
93
|
+
| `ElpioService` | Cloud Run | Knative Serving (default) or KEDA |
|
|
94
|
+
| `ElpioFunction` | Cloud Functions | Tekton + Buildpacks → `ElpioService` |
|
|
95
|
+
| `ElpioTask` | Cloud Tasks | KEDA + broker + dispatcher |
|
|
96
|
+
|
|
97
|
+
The serving engine is a **strategy** (`ELPIO_ENGINE=knative|keda`) behind one stable CRD —
|
|
98
|
+
Knative for the highest Cloud Run parity, KEDA for a lighter footprint.
|
|
99
|
+
|
|
100
|
+
## Quickstart
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
pip install elpio # the elpio CLI
|
|
104
|
+
|
|
105
|
+
# point kubectl at any cluster (kind, minikube, GKE, EKS, ...) that has a
|
|
106
|
+
# serving engine installed — Knative Serving (default) or KEDA.
|
|
107
|
+
elpio install # applies the CRDs + operator
|
|
108
|
+
elpio deploy -f hello.yaml # the ElpioService shown above
|
|
109
|
+
elpio services
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Working from a clone instead? `task e2e-up` provisions kind + Knative/KEDA, and
|
|
113
|
+
`task operator-run` runs the operator locally (`kopf run -m elpio.operator.handlers`).
|
|
114
|
+
|
|
115
|
+
## Development
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
task dev # editable install + dev deps
|
|
119
|
+
task unit # unit tests (no cluster)
|
|
120
|
+
task lint # ruff
|
|
121
|
+
task e2e # end-to-end (needs a kind cluster + Knative/KEDA)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Layout
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
src/elpio/
|
|
128
|
+
models/ ElpioService spec (Pydantic mirror of the CRD)
|
|
129
|
+
engines/ serving-engine strategy: base + knative + keda
|
|
130
|
+
providers/ portability seams: StateStore, IdentityProvider
|
|
131
|
+
operator/ kopf reconciler
|
|
132
|
+
cli.py the `elpio` command
|
|
133
|
+
deploy/ CRDs + operator manifests (+ Helm)
|
|
134
|
+
docs/ architecture & guides
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
Code: [MIT](LICENSE). Docs & branding: [CC-BY-4.0](LICENSE-docs).
|
elpio-0.1.0/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
```
|
|
2
|
+
_____ _ _
|
|
3
|
+
| ____| |_ __ (_) ___
|
|
4
|
+
| _| | | '_ \| |/ _ \
|
|
5
|
+
| |___| | |_) | | (_) |
|
|
6
|
+
|_____|_| .__/|_|\___/
|
|
7
|
+
|_|
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
**Turn any Kubernetes cluster into a private serverless platform.**
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
**Elpio** is an installable, self-hosted **Cloud Run / Cloud Functions / Cloud Tasks** for
|
|
15
|
+
your own Kubernetes — scale-to-zero, request-driven autoscaling, simplified cluster + node
|
|
16
|
+
autoscaling, and a clean multi-tenant model. GKE-first, **portable by design** (EKS / AKS / k3s).
|
|
17
|
+
|
|
18
|
+
Elpio is an [Altikva](https://altikva.com) open-source product (MIT for code, CC-BY-4.0 for
|
|
19
|
+
docs). The name is a coined mark rooted in Greek *elpis* ("hope") — part of the Altikva family
|
|
20
|
+
lineage *ha-tikva* (Hebrew) → *Spero* (Latin) → *Elpio*.
|
|
21
|
+
|
|
22
|
+
> **Status: alpha (v0.1.0).** All four reconcilers ship: `ElpioService` (Knative/KEDA serving),
|
|
23
|
+
> `ElpioFunction` (Tekton + Buildpacks), `ElpioTask` (KEDA + broker), and `ElpioTenant` (namespace,
|
|
24
|
+
> RBAC, quotas, network isolation). Alongside them: OIDC auth, an admission webhook, a multi-cluster
|
|
25
|
+
> management API, a Helm chart, and CI. CRs emit `status.conditions`, so the sibling agent
|
|
26
|
+
> [Spero](https://github.com/altikva/spero) can supervise and heal them. The kind-based e2e harness
|
|
27
|
+
> is wired and gated behind `ELPIO_E2E=1`.
|
|
28
|
+
|
|
29
|
+
## Why
|
|
30
|
+
|
|
31
|
+
Elpio does **not** reimplement a serverless runtime. It's the opinionated, enterprise control
|
|
32
|
+
plane that assembles proven CNCF primitives — **Knative**, **KEDA**, **Tekton**, **cert-manager**,
|
|
33
|
+
**Karpenter** — behind a declarative CRD/operator model. Its value is the enterprise wrapper the
|
|
34
|
+
public clouds don't give you: on-prem security integration, hard multi-tenancy, golden-path
|
|
35
|
+
config, fleet management, and a one-command installer.
|
|
36
|
+
|
|
37
|
+
## How it works
|
|
38
|
+
|
|
39
|
+
You declare an `ElpioService`; the **operator** reconciles it onto a serving engine. No SSH, no
|
|
40
|
+
imperative `kubectl apply` scripts — just Kubernetes-native reconciliation.
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
apiVersion: elpio.io/v1alpha1
|
|
44
|
+
kind: ElpioService
|
|
45
|
+
metadata:
|
|
46
|
+
name: hello
|
|
47
|
+
spec:
|
|
48
|
+
image: ghcr.io/knative/helloworld-go:latest
|
|
49
|
+
scaling: { minScale: 0, maxScale: 10, target: 100, metric: concurrency }
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
| CRD | Equivalent | Engine |
|
|
53
|
+
|-----|-----------|--------|
|
|
54
|
+
| `ElpioService` | Cloud Run | Knative Serving (default) or KEDA |
|
|
55
|
+
| `ElpioFunction` | Cloud Functions | Tekton + Buildpacks → `ElpioService` |
|
|
56
|
+
| `ElpioTask` | Cloud Tasks | KEDA + broker + dispatcher |
|
|
57
|
+
|
|
58
|
+
The serving engine is a **strategy** (`ELPIO_ENGINE=knative|keda`) behind one stable CRD —
|
|
59
|
+
Knative for the highest Cloud Run parity, KEDA for a lighter footprint.
|
|
60
|
+
|
|
61
|
+
## Quickstart
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install elpio # the elpio CLI
|
|
65
|
+
|
|
66
|
+
# point kubectl at any cluster (kind, minikube, GKE, EKS, ...) that has a
|
|
67
|
+
# serving engine installed — Knative Serving (default) or KEDA.
|
|
68
|
+
elpio install # applies the CRDs + operator
|
|
69
|
+
elpio deploy -f hello.yaml # the ElpioService shown above
|
|
70
|
+
elpio services
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Working from a clone instead? `task e2e-up` provisions kind + Knative/KEDA, and
|
|
74
|
+
`task operator-run` runs the operator locally (`kopf run -m elpio.operator.handlers`).
|
|
75
|
+
|
|
76
|
+
## Development
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
task dev # editable install + dev deps
|
|
80
|
+
task unit # unit tests (no cluster)
|
|
81
|
+
task lint # ruff
|
|
82
|
+
task e2e # end-to-end (needs a kind cluster + Knative/KEDA)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Layout
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
src/elpio/
|
|
89
|
+
models/ ElpioService spec (Pydantic mirror of the CRD)
|
|
90
|
+
engines/ serving-engine strategy: base + knative + keda
|
|
91
|
+
providers/ portability seams: StateStore, IdentityProvider
|
|
92
|
+
operator/ kopf reconciler
|
|
93
|
+
cli.py the `elpio` command
|
|
94
|
+
deploy/ CRDs + operator manifests (+ Helm)
|
|
95
|
+
docs/ architecture & guides
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
Code: [MIT](LICENSE). Docs & branding: [CC-BY-4.0](LICENSE-docs).
|