nebius/helmrelease-trigger-operator
Go
Captured source
source ↗nebius/helmrelease-trigger-operator
Description: A Kubernetes controller that automatically triggers FluxCD HelmRelease reconciliation when associated ConfigMaps are updated, enabling seamless configuration-driven GitOps workflows.
Language: Go
License: Apache-2.0
Stars: 6
Forks: 0
Open issues: 10
Created: 2025-07-04T10:54:13Z
Pushed: 2025-12-16T00:49:33Z
Default branch: main
Fork: no
Archived: no
README:
HelmRelease Trigger Operator
A Kubernetes controller that automatically triggers HelmRelease reconciliation when associated ConfigMaps are updated, enabling seamless configuration-driven GitOps workflows.
Disclaimer
Important: This project is not affiliated with FluxCD or ControlPlaneIO-FluxCD. It is an independent operator designed to simplify deployments with FluxCD, specifically when using the valuesFrom feature in HelmRelease configurations. The HelmRelease Trigger Operator provides additional functionality for triggering HelmRelease reconciliations based on ConfigMap updates, but it is not officially supported or endorsed by the FluxCD project or its maintainers.
Overview
The HelmRelease Trigger Operator monitors ConfigMaps with specific labels and annotations, automatically triggering FluxCD HelmRelease reconciliation when configuration changes are detected. This enables dynamic configuration management where ConfigMap updates can immediately trigger application redeployments without manual intervention.
How It Works
The operator watches for ConfigMaps labeled with nebius.ai/helmrelease-trigger-operator: "true" and:
1. Monitors ConfigMap Changes: Detects create, update, and generic events on labeled ConfigMaps 2. Extracts HelmRelease References: Uses annotations to identify the target HelmRelease 3. Compares Digests: Checks if the HelmRelease digest has changed since last reconciliation 4. Triggers Reconciliation: Patches the HelmRelease with force reconciliation annotations when changes are detected 5. Autodiscovery: Dynamically identifies HelmReleases with matching labels and annotations to include them in the reconciliation process
Features
- Automatic Triggering: No manual intervention required for configuration-driven deployments
- Autodiscovery: Dynamically detects and includes HelmReleases based on labels and annotations
- Digest-based Change Detection: Prevents unnecessary reconciliations by comparing digests
- FluxCD Integration: Seamlessly works with existing FluxCD HelmRelease resources
- Namespace Flexibility: Supports cross-namespace ConfigMap to HelmRelease references
- Configurable Concurrency: Adjustable reconciliation performance settings
Autodiscovery
The HelmRelease Trigger Operator implements autodiscovery by scanning all HelmReleases in the cluster and automatically labeling those that use the valuesFrom feature. This ensures that HelmReleases relying on external ConfigMaps or Secrets for their values are dynamically included in the operator's reconciliation workflow.
How Autodiscovery Works:
1. HelmRelease Scanning: The operator scans all HelmReleases in the cluster. 2. `valuesFrom` Detection: It checks if the HelmRelease configuration includes the valuesFrom field, which indicates dependency on external resources like ConfigMaps or Secrets. 3. Automatic Labeling: For HelmReleases using valuesFrom, the operator adds the following labels:
"nebius.ai/helmrelease-trigger-operator": "true": Marks the HelmRelease as managed by the operator."nebius.ai/helmreleases-namespace": "": Specifies the namespace of the HelmRelease."nebius.ai/helmreleases-name": "": Specifies the name of the HelmRelease.
4. Continuous Monitoring: The operator continuously monitors the cluster for changes to HelmReleases and updates labels dynamically as needed.
Prerequisites
- Kubernetes cluster (version 1.19+)
- FluxCD v2 with Helm Controller installed
- kubectl CLI tool
- Appropriate RBAC permissions
Installation
Using Helm (Recommended)
Install the HelmRelease Trigger Operator using the Helm chart from Nebius Container Registry:
# Add the Nebius Helm repository (OCI-based) helm install helmrelease-trigger-operator \ oci://cr.eu-north1.nebius.cloud/soperator/helm-helmrelease-trigger-operator \ --version \ --namespace helmrelease-trigger-operator-system \ --create-namespace
To install the latest version:
helm install helmrelease-trigger-operator \ oci://cr.eu-north1.nebius.cloud/soperator/helm-helmrelease-trigger-operator \ --namespace helmrelease-trigger-operator-system \ --create-namespace
Custom Values
You can customize the installation by providing your own values:
# Create values file cat values.yaml controllerManager: manager: args: - --metrics-bind-address=:8443 - --leader-elect - --health-probe-bind-address=:8081 - --enable-hr-autodiscovery=true - --log-format=json - --log-level=debug resources: limits: memory: 256Mi requests: cpu: 200m memory: 128Mi replicas: 2 EOF # Install with custom values helm install helmrelease-trigger-operator \ oci://cr.eu-north1.nebius.cloud/soperator/helm-helmrelease-trigger-operator \ --values values.yaml \ --namespace helmrelease-trigger-operator-system \ --create-namespace
Using kubectl
kustomize build config/default | kubectl apply -f - ### Verify Installation
Check if the operator pod is running
kubectl get pods -n helmrelease-trigger-operator-system
View operator logs
kubectl logs -n helmrelease-trigger-operator-system deployment/helmrelease-trigger-operator-controller-manager
Check the Helm release status
helm list -n helmrelease-trigger-operator-system
### Upgrade To upgrade to a newer version:
Upgrade to specific version
helm upgrade helmrelease-trigger-operator \ oci://cr.eu-north1.nebius.cloud/soperator/helm-helmrelease-trigger-operator \ --version \ --namespace helmrelease-trigger-operator-system
Upgrade to latest version
helm upgrade helmrelease-trigger-operator \ oci://cr.eu-north1.nebius.cloud/soperator/helm-helmrelease-trigger-operator \ --namespace helmrelease-trigger-operator-system
### Uninstall
Uninstall the Helm release
helm uninstall helmrelease-trigger-operator \ --namespace helmrelease-trigger-operator-system
Optionally, delete the namespace
kubectl delete namespace helmrelease-trigger-operator-system
## Configuration ### Required ConfigMap…
Excerpt shown — open the source for the full document.
Notability
notability 2.0/10Low-star routine operator repo.