2. Add your repository to Helm
January 25, 2026 ยท View on GitHub
helm-gcs
Helm plugin for managing chart repositories on Google Cloud Storage
๐ Table of Contents
- Overview
- Features
- Installation
- Quick Start
- Authentication
- Usage
- Advanced Features
- Troubleshooting
- Version Compatibility
- Contributing
- License
๐ฏ Overview
helm-gcs is a Helm plugin that enables you to manage private Helm chart repositories using Google Cloud Storage (GCS) buckets as the backend storage.
Store, version, and distribute your Helm charts on GCS with the same ease and security you expect from Google Cloud Platform.
Why helm-gcs?
- ๐ Secure: Leverage GCP IAM for fine-grained access control
- ๐ฐ Cost-effective: Pay only for storage used, no infrastructure to maintain
- ๐ Fast: Benefit from Google's global CDN and low-latency storage
- ๐ Concurrent-safe: Built-in optimistic locking prevents race conditions
- ๐ฆ Simple: Works seamlessly with existing Helm workflows
- โ๏ธ Cloud-native: Native integration with Google Cloud Platform
โจ Features
- ๐ฅ Push/Pull charts to/from GCS buckets
- ๐ง Initialize repositories anywhere in your GCS bucket
- ๐๏ธ Remove charts by version or entirely
- ๐ Multiple authentication methods (ADC, Service Account, OAuth)
- ๐ Concurrent update handling with automatic retry
- ๐ท๏ธ Custom metadata support for chart objects
- ๐ Bucket path organization for structured chart storage
- ๐ Multi-platform support (Linux, macOS, Windows on amd64/arm64)
- โ Helm 4 compatible (also supports Helm 3)
๐ฆ Installation
Helm 4
One-line install (recommended):
curl -fsSL https://raw.githubusercontent.com/hayorov/helm-gcs/master/scripts/install-helm4.sh | sh
Or specify a version:
curl -fsSL https://raw.githubusercontent.com/hayorov/helm-gcs/master/scripts/install-helm4.sh | HELM_GCS_VERSION=0.7.0 sh
This installs both required plugins:
- gcs (CLI) - provides
helm gcs init/push/rmcommands - gcs-getter (Getter) - provides
gs://protocol support
Verify installation:
helm plugin list
# NAME VERSION TYPE APIVERSION PROVENANCE SOURCE
# gcs 0.7.0 cli/v1 v1 verified https://github.com/hayorov/helm-gcs
# gcs-getter 0.7.0 getter/v1 v1 verified https://github.com/hayorov/helm-gcs
Helm 3
helm plugin install https://github.com/hayorov/helm-gcs.git
Install Specific Version
# Helm 4 (specify version via environment variable)
curl -fsSL https://raw.githubusercontent.com/hayorov/helm-gcs/master/scripts/install-helm4.sh | HELM_GCS_VERSION=0.7.0 sh
# Helm 3
helm plugin install https://github.com/hayorov/helm-gcs.git --version 0.7.0
Update to Latest
# Helm 4
helm plugin update gcs
helm plugin update gcs-getter
# Helm 3
helm plugin update gcs
Verify Installation
helm gcs version
๐ Quick Start
Get started in under 2 minutes:
# 1. Initialize a new repository in your GCS bucket
helm gcs init gs://my-bucket/helm-charts
# 2. Add your repository to Helm
helm repo add my-repo gs://my-bucket/helm-charts
# 3. Package your chart
helm package ./my-chart
# 4. Push chart to your repository
helm gcs push my-chart-1.0.0.tgz my-repo
# 5. Update Helm cache
helm repo update
# 6. Search for your chart
helm search repo my-repo
# 7. Install your chart
helm install my-release my-repo/my-chart
๐ Authentication
helm-gcs supports multiple authentication methods (in priority order):
1. OAuth Access Token (Temporary)
export GOOGLE_OAUTH_ACCESS_TOKEN=$(gcloud auth print-access-token)
helm gcs push chart.tgz my-repo
โฑ๏ธ Token expires in 1 hour. Best for temporary operations.
2. Service Account Key File
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
helm gcs push chart.tgz my-repo
๐ Recommended for CI/CD environments.
3. Application Default Credentials (ADC)
gcloud auth application-default login
helm gcs push chart.tgz my-repo
๐ค Best for local development.
Required IAM Permissions
Your service account or user needs these permissions:
storage.objects.getstorage.objects.createstorage.objects.deletestorage.objects.list
Recommended IAM Role: Storage Object Admin or Storage Admin
๐ Usage
Initialize Repository
Create a new Helm repository in your GCS bucket:
helm gcs init gs://your-bucket/path/to/charts
Options:
- Repository can be created anywhere in your bucket
- Creates an empty
index.yamlif it doesn't exist - Safe to run multiple times (idempotent)
Example with nested path:
helm gcs init gs://company-charts/production/stable
Add Repository to Helm
helm repo add stable-charts gs://company-charts/production/stable
helm repo add dev-charts gs://company-charts/development
Verify repositories:
helm repo list
Push Charts
Basic Push
# Package your chart
helm package ./my-application
# Push to repository
helm gcs push my-application-1.0.0.tgz stable-charts
Push with Retry (Recommended for CI/CD)
helm gcs push my-application-1.0.0.tgz stable-charts --retry
๐ Automatically retries if concurrent updates detected
Push with Custom Metadata
Add custom metadata to your chart object:
helm gcs push my-app-1.0.0.tgz stable-charts \
--metadata env=production,team=platform,region=us-central1
Push to Bucket Path
Organize charts within your bucket:
helm gcs push my-app-1.0.0.tgz stable-charts --bucketPath=applications/backend
This stores the chart at: gs://your-bucket/charts/applications/backend/my-app-1.0.0.tgz
Force Push
Overwrite existing chart:
helm gcs push my-app-1.0.0.tgz stable-charts --force
โ ๏ธ Use with caution - overwrites existing chart with same version
Push with Public Access
Make chart publicly accessible:
helm gcs push my-app-1.0.0.tgz stable-charts --public
Remove Charts
Remove Specific Version
helm gcs remove my-application stable-charts --version 1.0.0
Remove All Versions
helm gcs remove my-application stable-charts
๐ก Don't forget to update your local cache:
helm repo update
๐ง Advanced Features
Concurrent Updates
helm-gcs uses optimistic locking to prevent index corruption during concurrent updates:
# If you see: "Error: index is out-of-date"
# Simply retry the command or use --retry flag
helm gcs push chart.tgz my-repo --retry
The plugin will automatically:
- Detect concurrent modification
- Fetch latest index
- Retry the operation
- Use exponential backoff
Debug Mode
Enable detailed logging:
# Using environment variable
export HELM_GCS_DEBUG=true
helm gcs push chart.tgz my-repo
# Or use global flag
helm gcs push chart.tgz my-repo --debug
Custom Repository URL
Use custom domain or CDN:
helm gcs push chart.tgz my-repo \
--public \
--publicURL=https://charts.example.com
๐ Troubleshooting
Common Issues
Authentication Errors
Error: failed to authenticate to GCS
Solution:
- Verify credentials:
gcloud auth list - Check
GOOGLE_APPLICATION_CREDENTIALSpath - Ensure service account has required permissions
- Try:
gcloud auth application-default login
Index Out of Date
Error: update index file: index is out-of-date
Solution: Use --retry flag for automatic retry:
helm gcs push chart.tgz my-repo --retry
Permission Denied
Error: googleapi: Error 403: Forbidden
Solution:
- Verify IAM permissions (need
Storage Object Admin) - Check bucket name is correct
- Ensure bucket exists:
gsutil ls gs://your-bucket
Chart Already Exists
Error: chart already indexed
Solution: Use --force to overwrite:
helm gcs push chart.tgz my-repo --force
Enable Debug Logging
export HELM_GCS_DEBUG=true
helm gcs push chart.tgz my-repo --debug
Get Help
helm gcs --help
helm gcs push --help
๐ Version Compatibility
| helm-gcs Version | Helm Version | Go Version | Notes | Status |
|---|---|---|---|---|
| 0.7.x | Helm 4.x (native) | 1.25+ | Two separate plugins (CLI + Getter) | โ Active |
| 0.7.x | Helm 3.x (legacy) | 1.25+ | Single combined plugin | โ Active |
| 0.6.x | Helm 4.x, 3.x | 1.25+ | Legacy mode on Helm 4 | โ Supported |
| 0.5.x | Helm 3.x | 1.24+ | โ Supported | |
| 0.4.x | Helm 3.x | 1.20+ | โ ๏ธ Deprecated | |
| 0.3.x | Helm 3.x | 1.16+ | โ ๏ธ Deprecated | |
| 0.2.x | Helm 2.x | 1.13+ | โ Unsupported |
Helm 4 Architecture
Helm 4 enforces a strict "one plugin = one type" model. A single plugin cannot be both a CLI plugin and a Getter plugin. Therefore, helm-gcs 0.7.0+ provides two separate plugins:
| Plugin | Type | Purpose |
|---|---|---|
gcs | cli/v1 | helm gcs init/push/rm commands |
gcs-getter | getter/v1 | gs:// protocol for helm repo add, helm pull |
Helm 3 Compatibility
Helm 3 uses a combined plugin model where one plugin handles both CLI commands and protocol downloading. helm-gcs 0.7.x maintains full backward compatibility:
# Install for Helm 3
helm plugin install https://github.com/hayorov/helm-gcs.git
# All features work with single plugin
helm gcs init gs://bucket/charts # CLI commands
helm repo add myrepo gs://bucket/charts # gs:// protocol
The legacy plugin.yaml at the repository root provides Helm 3 compatibility by:
- Registering CLI commands via
commandfield - Registering
gs://protocol viadownloadersfield
Helm 2 Users
For Helm 2 support, use version 0.2.2:
helm plugin install https://github.com/hayorov/helm-gcs.git --version 0.2.2
โ ๏ธ Helm 2 reached end-of-life. Please upgrade to Helm 3 or 4.
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Development Setup
# Clone the repository
git clone https://github.com/hayorov/helm-gcs.git
cd helm-gcs
# Copy environment template
cp .env.example .env
# Edit .env with your GCS test bucket and credentials
# Run tests
go test -v ./...
# Run integration tests (requires GCS credentials)
go test -v -tags=integration ./pkg/repo
# Build
go build -o bin/helm-gcs ./cmd/helm-gcs
Running Tests
# Unit tests
go test -v -race ./...
# Integration tests (requires GCS bucket)
export GCS_TEST_BUCKET=gs://your-test-bucket/helm-gcs-tests
go test -v -tags=integration ./pkg/repo
# With debug logging
export HELM_GCS_DEBUG=true
go test -v -tags=integration ./pkg/repo
Code Quality
# Format code
gofmt -s -w .
# Run linter
golangci-lint run
# Check code complexity
gocyclo -over 19 cmd pkg
# Vet code
go vet ./...
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Helm - The package manager for Kubernetes
- Google Cloud Storage - Object storage service
- All our contributors
๐ Support
- ๐ Bug Reports: GitHub Issues
- ๐ฌ Questions: GitHub Discussions
- ๐ Documentation: Project Wiki
Made with โค๏ธ by the helm-gcs community
โญ Star us on GitHub โข ๐ Report Bug โข โจ Request Feature