Issue
HelmRelease resources referencing OCI registries failed with the error unsupported protocol scheme 'oci', despite using FluxCD v2.7.2, which supports OCI. The issue persisted even with correct YAML configurations, indicating a mismatch between the cluster controllers and the CLI version.
Culprit
The root cause was a version mismatch between the FluxCD CLI and the cluster controllers:
- CLI: v2.7.2 (OCI-compatible).
- Cluster Controllers: Outdated (Jan 2024 vintage), missing OCIRepository CRDs and enum support.
The HelmChart CRD lacked the OCIRepository enum, causing admission control to reject any HelmChart referencing OCI registries.
Solution
Cluster Component Upgrade
-
Updated Manifests: Generated updated manifests with upgraded components:
helm-controller: v0.37.4 → v1.4.2.source-controller: v1.2.4 → v1.7.2.- Added missing CRDs for OCI support.
-
CRD Schema Updates: Updated the
HelmChartCRD to include theOCIRepositoryenum and added OCIRepository CRD definitions.
Deployment Process
- Self-Upgrade: FluxCD detected the updated manifests via GitOps and reconciled the new versions.
- Reconciliation: The Redis HelmRelease was updated to reference the OCIRepository, resolving the chart pull errors.
Verification
Post-upgrade validation confirmed:
- Updated CRDs included OCIRepository support.
- HelmRelease successfully reconciled using OCI registries.
- Redis pods became operational within minutes.
Key Benefits of OCI Support
- Immutable Deployments: Content-addressable via digest.
- Automatic Upgrades: Based on digest changes.
- Better Caching: Alignment with container registries.
- Bitnami Migration: Supports Bitnami’s OCI-based chart distribution.
This solution enabled seamless integration of OCI registries in FluxCD, resolving the chart pull errors and ensuring future compatibility.