canonical / canonical/cloud-init
[enhancement]: Add tiny-cloud-style APK repository configuration
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
# Enhancement
Add a preferred `apk.repositories` cloud-config interface for configuring Alpine Linux APK repositories.
The existing `apk_repos` syntax is boolean-driven and limited to a single Alpine mirror plus an optional local repository. A list-based interface better reflects `/etc/apk/repositories`, supports multiple repository groups, and permits raw custom repository URLs.
Example:
```yaml
#cloud-config
apk:
repositories:
- base_url: https://cdn.alpinelinux.org
version: v3.24
repos: [main, community]
- https://packages.example.net/alpine/custom
```
apk_repos should remain supported for backwards compatibility. The new apk interface should be documented as the preferred form; any deprecation of apk_repos can be considered separately after adoption.
Note that this is already implemented in [tiny-cloud](https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud/-/blob/190b5cf89b555cdbb00e030ebea9c281d614bc97/docs/alpine-config.5.scd).
Contributor guide
Research direction
Start by comparing tiny-cloud's docs/alpine-config.5.scd with cloud-init's existing apk_repos handling. Trace how the apk cloud-config interface is parsed and documented, then verify that list-based repositories support grouped and raw URLs while apk_repos remains backward compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, yaml
- Domain
- cloud, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100