Skip to content

docs(air-gapped): fetch the platform source from the private registry - #791

Open
Kirill Ilin (sircthulhu) wants to merge 1 commit into
mainfrom
docs/air-gapped-platform-source
Open

Kirill Ilin (sircthulhu) wants to merge 1 commit into
mainfrom
docs/air-gapped-platform-source

Conversation

@sircthulhu

Copy link
Copy Markdown
Collaborator

What this PR does

The air-gapped guide configures registry mirrors and a private CA on the nodes only. Flux source-controller downloads the platform package itself, from inside its pod, so it uses neither: an air-gapped install that follows the guide still fetches the platform from ghcr.io, or fails TLS against a private registry.

This adds a step to docs/next that installs the operator from the private registry and points the platform source at it with platformSourceUrl, platformSourceSecret and platformSourceCertSecret. It also warns that Flux needs the registry API at the root of the host: an endpoint under a path prefix, such as a Nexus /repository/<name> URL, works as a containerd mirror but not as the platform source. The tenant Kubernetes section moves from step 5 to step 6; nothing links to its anchor.

platformSourceCertSecret is added in cozystack/cozystack#5237, so this stays a draft until that PR is merged.

Checked with a local Hugo v0.164.0 development build: the page renders and every new link resolves to an existing anchor.

The guide set up registry mirrors and a private CA on the nodes only.
Flux source-controller downloads the platform package itself, from
inside its pod, so it uses neither: an air-gapped install following the
guide kept fetching the platform from ghcr.io or failed TLS against the
private registry. The new step points the installer at the private
registry, with its credentials and CA, and warns that Flux needs the
registry API at the root of the host rather than under a path prefix.

Assisted-by: LLM
Signed-off-by: Kirill Ilin <stitch14@yandex.ru>
@netlify

netlify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit b930774
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/6aedd70c2b0f44021239ce68
😎 Deploy Preview https://deploy-preview-791--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f40a4c4d-06bb-404a-873d-d7f69d3363a5
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sircthulhu
Kirill Ilin (sircthulhu) marked this pull request as ready for review November 6, 2026 14:54
Kirill Ilin (sircthulhu) added a commit to cozystack/cozystack that referenced this pull request Nov 6, 2026
…5237)

## What this PR does

The operator creates the `cozystack-platform` OCIRepository from its own
command-line arguments and rewrites the whole object on every start;
`cozystack-packages` copies that spec. When the platform source is a
registry whose certificate is issued by a private CA (an internal
pull-through cache in an air-gapped install, for example), there is no
durable way to make Flux trust it: a `certSecretRef` patched onto the
live object is dropped on the next operator restart, source-controller
then fails TLS, and platform updates silently stop arriving.

This adds `--platform-source-cert-secret` to the operator and
`cozystackOperator.platformSourceCertSecret` to the installer chart. The
named Secret in `cozy-system` is set as `spec.certSecretRef` on the
generated OCIRepository, so it holds `ca.crt` for a private CA and/or
`tls.crt`+`tls.key` for client certificate auth, with the Flux key
layout. `cozystack-packages` inherits it through the existing spec copy.

The flag is OCI only. `GitRepository` has no `certSecretRef` (Flux reads
a Git CA from the `ca.crt` key of the `secretRef` Secret), so a Git
platform source with the flag set is refused at startup instead of
having its CA silently ignored.

Tests: unit tests for the generated spec, a regression test that the CA
survives the operator's update of an existing OCIRepository, a test that
a Git source with the flag writes nothing, and a helm-unittest suite for
the new chart value.

### Screenshots

<!-- REQUIRED for UI changes: attach screenshots or screen recordings
demonstrating
the visual impact of your changes. PRs with UI changes without
screenshots will not be merged. -->

### Downstream repositories

<!--
Cozystack is upstream for repositories that are NOT kept in sync with it
automatically, and nothing in CI compares the two sides, so a change
here can break them silently.

Which change forces what, and which file to touch, is the trigger map in
docs/agents/contributing.md under "Downstream Repositories". Walk it
before you tick anything.

IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM
TO FILL IN:

1. Walk the trigger map against the actual diff of this PR, file by
file. Do not decide from the PR title or from your memory of what you
changed.
2. For every repository you tick, open the follow-up PR there and link
it on the same line. A ticked box with no link claims work that does not
exist, which is worse than an empty box. Search that repository for an
open PR or issue covering it first, and link that instead of filing a
duplicate.
3. When the follow-up is out of scope, or needs a decision that is not
yours to make, open an issue in that repository instead, link that, and
say so in the PR body. Do not push a speculative PR into another
repository just to fill a line here.
4. Do not tick "No downstream repository is affected" to make the
checklist go away. If you are unsure, leave every box empty and say so
in the PR body, so a human decides.
-->

- [ ] No downstream repository is affected by this change
- [x] [cozystack/website](https://github.com/cozystack/website) -
follow-up: cozystack/website#791
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

The new installer value is optional, so `ansible-cozystack` is not
reached. The website's air-gapped guide
(`content/en/docs/next/install/kubernetes/air-gapped.md`) added the
private CA to the nodes only, while Flux fetches the platform source
itself; cozystack/website#791 adds a step for `platformSourceUrl`,
`platformSourceSecret` and `platformSourceCertSecret`.

### Release note

```release-note
feat(operator): the platform source can be served from a registry behind a private CA. Set `cozystackOperator.platformSourceCertSecret` in the installer to a Secret in `cozy-system` with `ca.crt` (and optionally `tls.crt`/`tls.key`); the operator sets it as `certSecretRef` on the `cozystack-platform` OCIRepository, so it survives operator restarts.
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Added the `platformSourceCertSecret` setting for OCI platform sources.
It allows a Secret containing certificates for private CA trust or
client authentication to be configured separately from registry
credentials.
* The configured certificate Secret is applied to the OCI source and
inherited by its package source.
* **Configuration**
* The setting is empty by default. Git platform sources do not support a
separate certificate Secret; use the existing platform source Secret for
Git TLS certificates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

This branch has not been deployed

No deployments
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.

1 participant