For the complete documentation index, see llms.txt. This page is also available as Markdown.

ArgoCD install of PerfectScale Exporter

Learn how to install PerfectScale exporter with ArgoCD with this comprehensive guide

Prerequisites

Vocabulary

PerfectScale Exporter is a software agent that collects telemetry data related to scaling, aggregates it, and periodically exports the aggregated data to the PerfectScale SaaS Platform.

PerfectScale Exporter is a helm chart's helm repo that deploys a kubernetes deployment named perfectscale-exporter, along with other components.

helm search repo perfectscale | egrep "NAME|perfectscale/exporter"
NAME                  CHART V. APP V. DESCRIPTION                      
perfectscale/exporter v1.1.8   1.0.0  PerfectScale data exporter

PerfectScale Agent is the helm chart's upstream git repo.

App CR is shorthand for ArgoCD Custom Resource (yaml object) of kind: Application.

Helm Charts are stored in Helm Repos. Helm Chart

  1. A collection of files and folders on a file system.

  2. A named-chart-x.y.z.tgz compressed archive of files and folders (a Gzip compressed tar archive).

Helm Repo

  1. Helm Chart in a Git Repo, meaning helm chart is just a collection of files and folders that exist in a git repo. By convention, Git branches are commonly used to represent different versions of a Helm chart.

  2. A classic Helm repository is a simple HTTP server that follows a convention-based file storage pattern, using an index.yaml file and packaged chart archives named chart-name-x.y.z.tgz.

  3. A Helm chart in an OCI repository is stored in an Open Container Initiative repository, which is a REST API-based HTTP server that implements the OCI Distribution Specification. Helm chart packages, such as chart-name-x.y.z.tgz, can be stored and distributed through these repositories.

The clarification above makes the following points easier to understand:

App CRs can reference Helm charts stored in Git repositories, classic Helm repositories, and OCI repositories. Because of this, an App CR’s targetRevision field, either spec.sources.0.targetRevision or spec.source.targetRevision , can have two distinct meanings:

  • A Git branch or Git tag

  • A Helm chart version

Installation Methods 1 and 2 refer to a classic Helm repository.

Installation Method 3 involves pulling a specific version of a packaged Helm chart, such as chart-name-x.y.z.tgz, from a classic Helm repository and converting it into a file-and-folder-based Helm chart stored in a private Git repository.

Configuration info and tips

If the PerfectScale exporter was previously manually installed using helm, and you want to convert the manual deployment to be managed by ArgoCD, you need to look up the current live deployment's values.

Tip for deploying the PerfectScale exporter to multiple clusters

  • If you only have a few clusters, each cluster can use unique values for clientId, clientSecret, and clusterName.

  • If you need to deploy the PerfectScale Agent across multiple clusters, you can reuse the same clientId and clientSecret for each cluster, as long as each cluster has a unique clusterName.

Helm has 2 common usage patterns:

  1. Deployment tool

  2. YAML templating engine

FluxCD uses helm as a deployment tool, while ArgoCD uses helm as a templating engine:

  1. When FluxCD deploys a Helm chart, the resulting release is managed by both FluxCD and Helm. As a result, the release appears in the output of:

  2. When Argo CD deploys a Helm chart, it uses Helm as a YAML templating engine and then immediately applies the rendered manifests. As a result, the deployment is managed only by Argo CD and does not appear in the output of:

Preparation

1

Verify ArgoCD is installed and configured correct.

2

Check the latest PerfectScale exporter version

Method 1: Manual Lookup

Look for the most recent release of perfectscale-agent-vx.y.z here Method 2: Run the following command:

Example output, where the latest version is v1.1.8

3

Identify the Helm values that need to be passed into the chart.

Start by reviewing Onboarding a cluster.

In addition to providing guidance, this page includes an example helm upgrade --install ... command with flags that can be converted into Helm values.

For example:

These Helm command flags are equivalent to the following values:

Verify that you have at least the three mandatory input parameters:

  • clientId

  • clientSecret

  • clusterName

What handles the CR

As a general rule of thumb, you can expect an App CR to handle the following Kubernetes application deployment tasks:

  • Create the Kubernetes namespace, if needed

  • Fetch a cached copy of the Helm chart

  • Deploy a Kubernetes Job to handle the initial installation or upgrade of any CRDs used by the Kubernetes application

  • Use the provided Helm values with the Helm chart to deploy the Kubernetes application

This general logic applies to all three installation methods. However, each method begins with an Overview of Method # section that summarizes the individual nuances of that method.

Installing PerfectScale Agent with ArgoCD

Overview of Method 1:

A single ArgoCD application is deployed, which:

  1. Follows the normal App CR Handling logic.

  2. Fetches the perfectscale-exporter helm chart from a classic helm repo.

  3. Uses helm-values that exist within the App CR yaml object.

  1. Create a perfectscale-exporter.yaml file based on the example below.

Ensure you replace and update values as needed.

  1. Apply the following command in the cluster application.

  1. A new application should appear in the ArgoCD Web UI.

New application in ArgoCD
  1. If you set spec.syncPolicy.automated.enabled: false in the App CR, you may need to access the Argo CD web UI to perform a manual sync.

Sync the application (if needed)
  1. Ensure that all pods are running.

Method 2: Two CRs (troubleshooting alternative)

Overview of Method 2:

Method 1 may fail in rare cases, such as after an incomplete installation, due to CRD-related errors during the App CR sync. For example, the Kubernetes Job responsible for installing or upgrading the CRDs may fail to run correctly.

Method 2 is functionally equivalent to Method 1. The main difference is that Method 2 splits the logic across two Argo CD applications:

  1. perfectscale-exporter-crds: installs or upgrades the CRDs from a Git repository branch.

  2. perfectscale-exporter: deploys the Kubernetes application from the Helm chart.

  1. Create a perfectscale-exporter.yaml file based on the example below.

  1. Apply both with a single command:

  1. Ensure that all pods are running.

Method 3: Private git repo hosted helm chart and ArgoCD Web UI (Deprecated)

  1. Use the unix shell commands below, to download from our helm repo, the most recent version of the perfectscale-exporter helm chart (as a .tgz file).

  1. Upload the helm chart to a private git repo, and ensure ArgoCD can access the repo.

  2. You'll need to create an additional helm values file, for each cluster that you plan to install the perfectscale-exporter application to. So a dev.yaml file could be used to represent custom helm values (helm chart input parameters), that would be used when installing into a dev cluster. Note: This file should be co-located next to the helm chart's default values.yaml

There are two methods to add an application to ArgoCD: using the WEB UI or creating a YAML CRD file. You can select the approach that best suits your infrastructure.

YAML Application manifest

  1. Push all the modifications to your private git repository, which is accessible by ArgoCD.

  2. Make sure ArgoCD is configured to be able to authenticate against the private git repo. (When done correctly, something like this git@github.com:perfectscale/ps-kube.git can become a valid repo target.)

  3. Login to the ArgoCD Web UI interface and click the NEW APP button.

New app ArgoCD
New app ArgoCD
  1. Give the app a name.

New app form1
New app form1
  1. Scroll down and reference your git repo. (git@github.com:perfectscale/ps-kube.git represents ssh auth against a private git repo) (HEAD: refers to the latest revision) (Path: = exporter, refr

New app form2
New app form2
  1. Scroll down and configure a destination (kubernetes.default.svc represents the kubernetes cluster where ArgoCD is running)

New app form3
New app form3
  1. Configure input parameters as needed values.yaml represents default helm values of the helm chart. dev.yaml represents customized helm values that should be applied to a dev cluster.

New app form4
New app form4

  1. Once the creation process is completed, you will see an OutOFSync application.

OutOFSync application
OutOFSync application

  1. Synchronize the application.

Application synchronization
Application synchronization
  1. Once things stabilize, you should see something like the image below.

Synchronized application
Synchronized application
  1. Ensure that all pods are running.

Check running pods1
Check running pods

Last updated

Was this helpful?