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 exporterPerfectScale 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
A collection of files and folders on a file system.
A named-chart-x.y.z.tgz compressed archive of files and folders (a Gzip compressed tar archive).
Helm Repo
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.
A classic Helm repository is a simple HTTP server that follows a convention-based file storage pattern, using an
index.yamlfile and packaged chart archives namedchart-name-x.y.z.tgz.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
The perfectscale-exporter helm chart's helm values require 3 mandatory input parameters.
The PerfectScale Agent will not work if the following values are not provided:
clientId
clientSecret
clusterName
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, andclusterName.If you need to deploy the PerfectScale Agent across multiple clusters, you can reuse the same
clientIdandclientSecretfor each cluster, as long as each cluster has a uniqueclusterName.
Helm has 2 common usage patterns:
Deployment tool
YAML templating engine
FluxCD uses helm as a deployment tool, while ArgoCD uses helm as a templating engine:
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:
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
Verify ArgoCD is installed and configured correct.
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
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:
clientIdclientSecretclusterName
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
Method 1: Single CR (Recommended)
Overview of Method 1:
A single ArgoCD application is deployed, which:
Follows the normal App CR Handling logic.
Fetches the perfectscale-exporter helm chart from a classic helm repo.
Uses helm-values that exist within the App CR yaml object.
Since the resulting YAML file contains sensitive data, it must be stored securely. At a minimum, store it in a private Git repository.
Create a perfectscale-exporter.yaml file based on the example below.
Ensure you replace and update values as needed.
Apply the following command in the cluster application.
A new application should appear in the ArgoCD Web UI.

If you set
spec.syncPolicy.automated.enabled: falsein the App CR, you may need to access the Argo CD web UI to perform a manual sync.

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:
perfectscale-exporter-crds: installs or upgrades the CRDs from a Git repository branch.perfectscale-exporter: deploys the Kubernetes application from the Helm chart.
Since the resulting YAML file contains sensitive data, it must be stored securely. At a minimum, store it in a private Git repository.
Create a perfectscale-exporter.yaml file based on the example below.
Ensure you replace and update values as needed.
Apply both with a single command:
Ensure that all pods are running.
Method 3: Private git repo hosted helm chart and ArgoCD Web UI (Deprecated)
This method is deprecated because it takes longer to set up and is harder to maintain. Ensure that you replace and update the values as needed.
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).
Upload the helm chart to a private git repo, and ensure ArgoCD can access the repo.
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
Push all the modifications to your private git repository, which is accessible by ArgoCD.
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.gitcan become a valid repo target.)Login to the ArgoCD Web UI interface and click the
NEW APPbutton.

Give the app a name.

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

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

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.

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

Synchronize the application.

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

Ensure that all pods are running.

Last updated
Was this helpful?