A Helm plugin that provides OCI registry operations using Google crane, enabling you to list and search for Helm charts in OCI registries.
- List Repositories: List all repositories in an OCI registry
- Search Charts: Search for Helm charts with optional pattern matching
- Inspect Charts: View detailed chart metadata and configuration
- Authentication Support: Support for username/password authentication
- Cross-Platform: Works on Linux and macOS (uses Homebrew on macOS)
- Helm Compatible: Compatible with both Helm v3 and v4
- Smart Installation: Uses existing crane if available, otherwise installs automatically
- Helm v3 or v4 installed
- macOS: Homebrew (required only if crane is not already installed)
- Linux:
curlorwget(required only if crane is not already installed)
# Install from a Git repository
helm plugin install https://github.com/rimusz/helm-oci-plugin --verify=false
# Or install from local directory
cd /path/to/helm-oci-plugin
helm plugin install .helm plugin update ociThis will also update the crane binary if a new version is available.
The plugin automatically handles crane installation:
- If crane is already installed (found in PATH): Uses the existing installation
- macOS: Installs crane using Homebrew if not found
- Linux: Downloads the latest crane binary if not found
No manual crane installation is required!
helm plugin uninstall ociList all repositories in an OCI registry:
helm oci list <registry-url>Examples:
# List repositories in a public registry
helm oci list registry.example.com
# List repositories with authentication
helm oci list registry.example.com --username myuser --password mypass
# List repositories in Docker Hub (use docker.io)
helm oci list docker.ioSearch for Helm charts in an OCI registry with optional pattern matching:
helm oci search <registry-url> [pattern]Examples:
# Search all charts in a registry
helm oci search registry.example.com
# Search for charts containing 'nginx'
helm oci search registry.example.com nginx
# Search for charts starting with 'myapp'
helm oci search registry.example.com '^myapp'
# Search with authentication
helm oci search registry.example.com --username myuser --password mypass
# Search for a specific repository (shows tags for that specific repo)
helm oci search registry.example.com/myrepo/chart-nameShow detailed metadata and configuration for a chart:
helm oci inspect <chart-reference>Examples:
# Inspect chart metadata
helm oci inspect registry.example.com/mychart:1.0.0
# Inspect with authentication
helm oci inspect registry.example.com/mychart:1.0.0 --username myuser --password mypassShow help and usage information:
helm oci helpThe list command outputs a simple list of repository names from the registry:
repo1
repo2
chart-name
another-chart
The search command provides a formatted table showing repositories and their available tags:
REPOSITORY TAGS
-------------------------------------------------- --------------------
nginx 1.21.0,1.20.2,1.19.10
mysql 8.0.30,8.0.29,8.0.28
redis 7.0.5,7.0.4,7.0.3
The plugin supports basic authentication for private registries:
helm oci list registry.example.com --username <username> --password <password>
helm oci search registry.example.com --username <username> --password <password>For enhanced security, consider using:
- Environment variables for credentials
- Docker config authentication
- Registry-specific authentication methods
# Docker Hub
helm oci list docker.io
helm oci search docker.io nginx
# Google Container Registry
helm oci list gcr.io
helm oci search gcr.io
# GitHub Container Registry
helm oci list ghcr.io
helm oci search ghcr.io# With authentication
helm oci list myregistry.com --username admin --password secret123
helm oci search myregistry.com myapp --username admin --password secret123
# Search for specific chart versions
helm oci search myregistry.com "^myapp-v[0-9]+\.[0-9]+$"The plugin can be used in CI/CD pipelines:
# GitHub Actions example
- name: List Helm charts
run: |
helm oci list ${{ secrets.REGISTRY_URL }} \
--username ${{ secrets.REGISTRY_USER }} \
--password ${{ secrets.REGISTRY_PASS }}
- name: Search for specific chart
run: |
helm oci search ${{ secrets.REGISTRY_URL }} myapp \
--username ${{ secrets.REGISTRY_USER }} \
--password ${{ secrets.REGISTRY_PASS }}The plugin consists of:
plugin.yaml: Plugin metadata and hooksscripts/helm-oci.sh: Main plugin script with command handlingscripts/install-crane.sh: Installation script for crane binarybin/crane: Downloaded crane binary (created during installation)
- Google crane: Automatically downloaded and installed
- macOS: Homebrew (preferred installation method)
- Linux:
curlorwget(for downloading crane binary) - Helm v3/v4: For plugin framework
-
"crane binary not found"
- Run
helm plugin update ocito reinstall crane
- Run
-
"Failed to download crane"
- Check internet connection
- Verify curl/wget is installed
- Check firewall settings
-
"Authentication failed"
- Verify username and password
- Check if registry requires token authentication
- Try using Docker config authentication
-
"Unknown command"
- Run
helm oci helpfor available commands
- Run
-
macOS/Homebrew issues
- Ensure Homebrew is installed and up to date:
brew update - If brew installation fails, the plugin will fall back to downloading crane manually
- Check that crane formula is available:
brew info crane
- Ensure Homebrew is installed and up to date:
Enable verbose logging by modifying the plugin scripts or checking crane verbose output.
- Fork the repository
- Create a feature branch
- Make your changes
- Test on both Linux and macOS
- Submit a pull request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Google go-containerregistry for the crane tool
- Helm for the plugin framework