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
34 changes: 34 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Git
.git
.gitignore

# Python
__pycache__
*.pyc
*.pyo
*.pyd
.Python
*.so
*.egg
*.egg-info
dist
build
.pytest_cache
.coverage
htmlcov
.tox
.venv
venv

# IDE
.vscode
.idea
*.swp
*.swo

# Testing
test_example

# Documentation
*.md
!README.md
13 changes: 13 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
When working on this repo, make sure to:

- This is orionpy, a Python library for Kubernetes service-to-service authentication
- The main implementation is in `orionpy/network/orionrequests.py` which provides the OrionRequests client
- OrionRequests automatically manages service account tokens for authenticated requests between services
- Tokens are cached and automatically refreshed when they expire in < 5 minutes
- The testservice in `test-service/` is a simple HTTP service used for testing that validates auth via rhea sidecar
- E2E tests go in `tests/test_e2e_*.py` and run against deployed services in the cluster
- Unit tests go in `tests/test_*.py` and use mocks to test individual components
- Cedar policies in `k8s/testservice/rhea.configmap.yaml` control access to services
- Validate all changes in this order: first run make lint, then run unittests, then e2e tests
- Run `make test-unit` for unit tests only, `make test` for full e2e tests
- Tests use pytest with coverage reporting
53 changes: 53 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Virtual environments
venv/
env/
ENV/
env.bak/
venv.bak/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/

.tools

build.json
.kind.yaml.patched
7 changes: 7 additions & 0 deletions .kind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraMounts:
- hostPath: ./
containerPath: /orionpy
Loading
Loading