Skip to content

Scope

Scope — Sync Chart On Private rEgistry — is an open source CLI that syncs your Helm charts to OCI-compatible registries such as Nexus, ECR, Docker Hub or Scaleway Registry. The sources to mirror are described in a single YAML file.

RoleCLI that syncs Helm charts to private OCI registries
StackGo · OCI · Helm
LicenseApache-2.0
Imagebananaops/scope
Helm chart— (command-line tool)
RepositoryBananaOps/scope · releases
  • Automatic sync: mirror your Helm charts to your private registries
  • Multiple registries: ECR, Nexus, Docker Hub, Scaleway Registry and other OCI registries
  • Version control: pick exactly which versions to sync
  • Authentication: username / password, or password read from stdin
  • CI integration: designed to run in a scheduled job
  • Detailed logs: follow and troubleshoot every sync
  • An OCI-compatible registry
  • A repository created on the registry, in the form {{ registry }}/{{ namespace }} (e.g. rg.fr-par.scw.cloud/helm-mirrors)

Download the latest version from the GitHub releases.

Terminal window
docker run bananaops/scope scope -h
Terminal window
go build -ldflags "-s -w" -o bin/scope
  1. Describe the charts to sync

    scope_config.yml
    apache.github.io/superset:
    charts:
    superset:
    - 0.1.0
    - 0.1.1
    prometheus-community.github.io/helm-charts:
    charts:
    prometheus:
    - ~11.1.0
    prometheus-node-exporter:
    - 2.0.0
    - 2.0.1
  2. Run the sync

    Terminal window
    scope -s scope_config.yml -r 000000000000.dkr.ecr.eu-west-3.amazonaws.com
  3. Check the result

    The charts show up in the destination registry namespace.

Terminal window
> scope -h
Sync Chart On Private Registry
Usage:
scope [flags]
Flags:
--append-source append repository to chart name
--ca-file string verify certificates of HTTPS-enabled servers using this CA bundle
--cert-file string identify HTTPS client using this SSL certificate file
-h, --help help for scope
--insecure-skip-tls-verify skip tls certificate checks
--key-file string identify HTTPS client using this SSL key file
-n, --namespace string namespace destination chart registry
-p, --password string chart destination repository password
--password-stdin read password or identity token from stdin
-r, --registry string destination chart registry
-s, --source-file string path to source file
-t, --type string type for registry (nexus or oci) (default "oci")
-u, --user string chart destination repository user
RegistryTestedScope version
AWS ECR✅v0.0
Nexus✅v0.2
Docker Hub✅v0.4
Scaleway Registry✅v0.4
sync-charts:
tags:
- docker
image: bananaops/scope
stage: sync
script: scope -s ./scope_config.yml -t nexus -u $REGISTRY_USER -p $REGISTRY_USER_TOKEN -r https://docker.nexus-bananaops.com
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: manual
- if: $CI_PIPELINE_SOURCE == "schedule"
when: always

Renovate can keep the configuration file up to date:

"packageRules": [
{
"customType": "regex",
"fileMatch": ["scope_config.yml$"],
"matchStrings": [
"(?<registryUrl>.*):\\s+charts:\\s+((?<depName>.*):\\s+-\\s(?<currentValue>[\\w+\\.]*))"
],
"datasourceTemplate": "helm"
}
]

In this example, the registry URL must include the protocol:

https://stakater.github.io/stakater-charts:
charts:
reloader:
- 1.0.67

Air-gapped environments

Sync your charts to isolated environments

Multi-cloud

Distribute your charts across several cloud providers

Backup

Back up your critical charts