-
Notifications
You must be signed in to change notification settings - Fork 125
docs: switch chapter 1 to Charmcraft charm #2259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: k8s-tutorial-uv
Are you sure you want to change the base?
docs: switch chapter 1 to Charmcraft charm #2259
Conversation
…8s-tutorial-minimal-charm
…8s-tutorial-minimal-charm
…8s-tutorial-minimal-charm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modernizes the Chapter 1 Kubernetes charm example to use the current Charmcraft initialization template and tooling. The changes transition from a manual charm setup to one generated by charmcraft init --profile kubernetes, incorporating modern Python project management with uv and updated testing infrastructure.
Key changes:
- Replaces manual charm creation steps with
charmcraft initworkflow - Updates project structure to use
pyproject.tomlwith dependency groups instead ofrequirements.txt - Modernizes testing infrastructure with uv-based dependency management
- Updates copyright year from 2025 to 2026
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| examples/k8s-1-minimal/tox.ini | Updated to use uv-venv-lock-runner, dependency groups, reorganized test environments, and added format/lint configurations |
| examples/k8s-1-minimal/tests/unit/test_charm.py | Changed string quotes to double quotes, added testing documentation link |
| examples/k8s-1-minimal/tests/integration/test_charm.py | Updated string quotes, simplified docstrings, changed charm path handling to use resolve() |
| examples/k8s-1-minimal/tests/integration/conftest.py | Enhanced with better logging, CHARM_PATH environment variable support, and improved error handling |
| examples/k8s-1-minimal/src/charm.py | Changed all string literals to double quotes, simplified docstrings |
| examples/k8s-1-minimal/requirements.txt | Removed file (dependencies moved to pyproject.toml) |
| examples/k8s-1-minimal/pyproject.toml | Added comprehensive project configuration with dependency groups for lint, unit, and integration tests |
| examples/k8s-1-minimal/charmcraft.yaml | Modernized to use current Charmcraft format with base/platforms instead of bases, added uv plugin configuration |
| docs/tutorial/write-your-first-machine-charm.md | Updated tool installation instructions to mention uv separately from tox |
| docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/set-up-your-development-environment.md | Complete rewrite with detailed VM setup, Concierge installation, and project directory mounting instructions |
| docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/observe-your-charm-with-cos-lite.md | Updated VM name references from charm-dev to juju-sandbox-k8s, charm name from demo-api-charm to fastapi-demo, model name from welcome-k8s to testing |
| docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/make-your-charm-configurable.md | Updated charm and model name references to match new naming conventions |
| docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/integrate-your-charm-with-postgresql.md | Updated VM, charm, and model name references throughout |
| docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/expose-operational-tasks-via-actions.md | Updated charm and model name references in example commands |
| docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/create-a-minimal-kubernetes-charm.md | Major restructure to use charmcraft init workflow instead of manual file creation, updated all references to new naming conventions |
| .github/workflows/example-charm-integration-tests.yaml | Moved k8s-1-minimal from one test matrix to another |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This is an intermediate PR for switching the Kubernetes charm tutorial to use uv and the latest Charmcraft profiles. Target branch is
k8s-tutorial-uvThis PR switches "Create a minimal Kubernetes charm" to use a charm project generated by the latest version of Charmcraft. That lets us remove several of the manual steps.
Preview doc
Not ready for review. Rebase after merging #2258.