Skip to content

pcanilho/vcluster-argocd-exporter

Repository files navigation

RELEASE TEST Dependabot Updates SAST

version


vcluster-argocd-exporter
A vcluster exporter made for ArgoCD

⚙️ Installing | 🔎 Configuring

If you are using vcluster and ArgoCD, stop reading and jump to installing! Why? You have probably noticed that ArgoCD does not detect vcluster-spawned clusters out-of-the-box requiring somewhat painful manual/automated ad-hoc registration. I have got you covered. This exporter bridges the gap and allows vCluster clusters to be automatically registered in ArgoCD!


Installing

Helm dependency

Tip

This is particularly useful when you are already installing vcluster through Helm as you can correctly sequence the installation of the exporter. Add the ArgoCD specific PostSync hook annotation to ensure that the exporter runs after the vcluster is installed. e.g. values.yaml

vcluster-argocd-exporter:
  commonAnnotations:
      argocd.argoproj.io/hook: PostSync
dependencies:
  # - name: vcluster
  #   version: 0.21.0-beta.1
  #   repository: https://charts.loft.sh
  - name: vcluster-argocd-exporter
    version: =>0.1.0
    repository: oci://ghcr.io/pcanilho/charts

Helm standalone

helm upgrade <release_name> --install ghcr.io/pcanilho/charts/vcluster-argocd-exporter -n <namespace> --create-namespace

Configuring

Values

# This is a list of names of vClusters to export (vcluster list)
# defaults to [.Release.Name]
clusters: ~
# If set to true, the exporter will auto-discover all vClusters in the cluster.
# When using this flag, the `clusters` field is ignored.
autoDiscovery: false
# The namespace where ArgoCD has been installed
targetNamespace: argocd

The exporter will create an ArgoCD-ready v1/Secret k8s resource for each vCluster found in the provided list or all vClusters if the autoDiscovery field is used. ArgoCD will automatically detect these secrets and register the clusters.