Skip to content

[Docs] Add Kubernetes APT mirrors configuration option#9553

Open
Michaelvll wants to merge 3 commits intomasterfrom
claude/add-config-docs-S1x1p
Open

[Docs] Add Kubernetes APT mirrors configuration option#9553
Michaelvll wants to merge 3 commits intomasterfrom
claude/add-config-docs-S1x1p

Conversation

@Michaelvll
Copy link
Copy Markdown
Collaborator

Description

This PR adds a new kubernetes.apt_mirrors configuration option that allows users to override the APT mirrors used when installing packages on Kubernetes pods.

Changes

  • Added apt_mirrors configuration parameter to the Kubernetes section of the config schema
  • Users can now specify a list of APT mirror hostnames (without scheme/path) that will be tried in order
  • Setting to an empty list [] disables fallback mirrors entirely
  • When unset, SkyPilot uses built-in fallback mirrors (mirrors.wikimedia.org, mirror.umd.edu)
  • The option can be set globally or per-context via context_configs
  • Added comprehensive documentation with examples and explanation of the feature

Example Usage

kubernetes:
  apt_mirrors:
    - mirror.math.princeton.edu
    - mirrors.kernel.org

Testing

  • Code formatting: install pre-commit (auto-check on commit) or bash format.sh
  • All smoke tests: /smoke-test (CI) or pytest tests/test_smoke.py (local)

https://claude.ai/code/session_01BMUMi6V6LebBXsid2RuKj1

claude added 3 commits May 6, 2026 20:33
Document the apt_mirrors field added in #9521, including the unset/empty
list/non-empty list semantics and an example of per-context configuration.
@Michaelvll
Copy link
Copy Markdown
Collaborator Author

Add docs for #9553

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds documentation for the kubernetes.apt_mirrors configuration setting, which allows users to specify a list of hostnames to be used as fallback APT mirrors for Kubernetes pods. The review feedback suggests clarifying whether this field overrides the entire system mirror list or only the fallback mirrors injected by SkyPilot. Additionally, it is recommended to explicitly mention that URL schemes like http:// should be omitted and to clarify if custom ports are supported.

Comment on lines +1998 to +2001
Override the APT mirrors tried when installing packages on a pod (optional).
Hostnames only (no scheme/path); tried in order. Set to ``[]`` to disable
fallback mirrors entirely. When unset, SkyPilot uses a built-in fallback list
(``mirrors.wikimedia.org``, ``mirror.umd.edu``).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation states that setting apt_mirrors to [] disables fallback mirrors entirely. It would be beneficial to clarify whether this field overrides the entire list of APT mirrors (including the primary ones in /etc/apt/sources.list) or only the fallback mirrors that SkyPilot injects. Based on the description, it seems to only affect the fallback list, so specifying this explicitly would avoid confusion for users with custom images that already have pre-configured mirrors.

~~~~~~~~~~~~~~~~~~~~~~~~~~

Override the APT mirrors tried when installing packages on a pod (optional).
Hostnames only (no scheme/path); tried in order. Set to ``[]`` to disable
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The instruction 'Hostnames only (no scheme/path)' is clear, but it might be worth explicitly mentioning that this implies http:// or https:// should be omitted, as users frequently include the scheme when copying mirror URLs. Additionally, clarifying if ports are supported (e.g., my-mirror:8080) would be helpful for users with internal repository managers.

@Michaelvll Michaelvll requested review from rohansonecha and zpoint and removed request for zpoint May 6, 2026 23:27
@Michaelvll Michaelvll changed the title Add Kubernetes APT mirrors configuration option [Docs] Add Kubernetes APT mirrors configuration option May 7, 2026
@Michaelvll Michaelvll requested a review from SeungjinYang May 7, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants