Documentation
¶
Index ¶
Constants ¶
const ( // FinalizerName ensures the bridge can clean up the Argo CD Application // before the originating HelmRelease is removed. FinalizerName = "fargocd.appscode.com/finalizer" // HelmReleaseAnnotation links an Argo CD Application back to the // HelmRelease that produced it. The value is "<namespace>/<name>". HelmReleaseAnnotation = "fargocd.appscode.com/helmrelease" // AgentNameLabel is set on Applications in managed mode so the // argocd-agent principal can route them to the correct workload cluster. AgentNameLabel = "argocd.argoproj.io/agent-name" // DefaultRequeueAfter is used when a transient condition (such as a // dependency not being healthy yet) makes us re-enqueue. DefaultRequeueAfter = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HelmReleaseReconciler ¶
type HelmReleaseReconciler struct {
// Client is connected to the cluster that hosts the HelmRelease objects.
client.Client
// Scheme used by the local manager.
Scheme *runtime.Scheme
// ArgoClient is connected to the cluster that hosts Argo CD. In
// InCluster and Autonomous mode this is the same cluster as Client. In
// Managed mode it is the remote principal.
ArgoClient client.Client
// Mode controls how Applications are constructed and where they are
// written.
Mode mode.Mode
// ArgoNamespace, if set, overrides automatic discovery of the Argo CD
// namespace.
ArgoNamespace string
// DestinationServer is the value written into Application.Spec.Destination.Server.
// Defaults to https://kubernetes.default.svc.
DestinationServer string
// DestinationName is the value written into Application.Spec.Destination.Name.
// Most useful in Managed mode where the principal references workload
// clusters by symbolic name.
DestinationName string
// Project is the Argo CD project assigned to generated Applications.
Project string
// ClusterName identifies the workload cluster. Required in Managed mode;
// optional otherwise. When non-empty it is used both as the suffix for
// the Application name (so multiple clusters can share one principal
// without colliding) and as the agent label value.
ClusterName string
// contains filtered or unexported fields
}
HelmReleaseReconciler watches FluxCD HelmRelease objects and projects each of them into an Argo CD Application on the cluster reached by ArgoClient.
func (*HelmReleaseReconciler) Reconcile ¶
func (r *HelmReleaseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile implements the controller-runtime contract.
func (*HelmReleaseReconciler) SetupWithManager ¶
func (r *HelmReleaseReconciler) SetupWithManager(mgr, argoMgr ctrl.Manager) error
SetupWithManager wires watches for HelmRelease, HelmRepository, the Argo CD Application that mirrors each HelmRelease, and the argocd-server Service used for namespace auto-discovery.