Skip to content

Add optional in-cluster registry proxy for ghcr.io to platform-api chart#1280

Open
tamalsaha wants to merge 1 commit into
masterfrom
regproxy
Open

Add optional in-cluster registry proxy for ghcr.io to platform-api chart#1280
tamalsaha wants to merge 1 commit into
masterfrom
regproxy

Conversation

@tamalsaha

@tamalsaha tamalsaha commented Jun 22, 2026

Copy link
Copy Markdown
Member

What

Adds an optional in-cluster pull-through Docker registry cache to charts/platform-api, gated behind regproxy.enabled (default false). When enabled it runs CNCF Distribution (registry:2) configured as a pull-through cache for the upstream registry (https://ghcr.io by default), so ghcr.io/appscode-charts (and any other ghcr.io) images can be served transparently from within the cluster.

Because the ace umbrella chart embeds platform-api as a subchart, the cache is reachable from ace via platform-api.regproxy.* values.

Routing node/client pulls to the cache (e.g. via containerd registry mirror configuration) is left to the cluster operator — this PR only deploys the cache and its Service.

Changes

  • Go API (apis/installer/v1alpha1/ace_platform_api.go): new regproxy field on PlatformApiSpec, backed by Regproxy / RegproxyPersistence types (image, remoteURL, optional username/password, replicas, service, persistence, securityContext, scheduling).
  • Templates (charts/platform-api/templates/regproxy/):
    • configmap.yaml — registry config.yml (proxy.remoteurl, filesystem storage, health checks)
    • secret.yaml — upstream credentials, rendered only when username is set
    • deployment.yaml — registry container; config/data/tmp volumes; /v2/ liveness+readiness; auth env injected only when credentials are set; OpenShift-aware securityContext
    • service.yaml — ClusterIP on service.port → container port 5000
    • pvc.yaml — created only when persistence.enabled (otherwise an emptyDir is used)
  • Helper (_helpers.tpl): regproxy.registry, resolving ghcr.io/appscode/registry via the chart's registryFQDN + regproxy.image.registry (consistent with the other image helpers).
  • values.yaml: new regproxy: block with documented defaults.
  • catalog/imagelist.yaml: added ghcr.io/appscode/registry:2.8.3 so the image is mirrored on release.
  • Ran make gen — regenerated zz_generated.deepcopy.go, the platform-api values.openapiv3_schema.yaml/README.md, and the ace values.openapiv3_schema.yaml (which now carries the inherited platform-api.regproxy block).

Verification

  • go build ./... clean
  • helm template renders all five manifests correctly across enabled / anonymous / persistence-disabled paths, and renders nothing when disabled

Notes

  • The default ghcr.io/appscode/registry:2.8.3 assumes the release pipeline mirrors upstream registry:2.8.3 (imagelist entry added to drive that). Override regproxy.image.* if needed.
  • Uses the registry:2 config layout (/etc/docker/registry/config.yml). Switching to Distribution v3 would require a different config path/schema.

kodiak-appscode[bot]
kodiak-appscode Bot previously approved these changes Jun 22, 2026
Add an optional CNCF Distribution (registry:2) pull-through cache to the
platform-api chart, gated behind regproxy.enabled (default false). When
enabled it proxies the upstream registry (ghcr.io by default) so that
ghcr.io/appscode-charts images can be served from within the cluster.

Because the ace umbrella chart embeds platform-api as a subchart, the cache
is reachable from ace via platform-api.regproxy.* values.

Routing node/client pulls to the cache (e.g. via containerd registry mirror
configuration) is left to the cluster operator.

Signed-off-by: Tamal Saha <tamal@appscode.com>
@tamalsaha tamalsaha changed the title Add optional in-cluster registry proxy for ghcr.io to ace chart Add optional in-cluster registry proxy for ghcr.io to platform-api chart Jun 22, 2026
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