Skip to main content
Version: 2.34.0

Namespace-scoped Installation

Aperture Agent can be installed in a single namespace without any cluster level resources.

Prerequisites

You can do the installation using the aperturectl CLI tool or using Helm. Install the tool of your choice using the following links:

  1. Helm

    1. Once the Helm CLI is installed, add the Aperture Agent Helm chart repository in your environment for install or upgrade:

      helm repo add aperture https://fluxninja.github.io/aperture/
      helm repo update
  2. aperturectl

    Refer

    aperturectl install agent to see all the available command line arguments.

Prepare a values.yaml file which switches the Aperture Agent to namespace-scoped:

agent:
namespaceScoped: true
note

(Relevant to Self-Hosted Aperture Controller only, ignore this note if using Aperture Cloud Controller).

If you want to install the Aperture Agent using Helm or don't want to use the certificates generated by aperturectl and want to enable Agent Functions for communication with the Aperture Controller, configure the ConfigMap having the client SSL/TLS certificate for the same in values.yaml file as below:

agent:
namespaceScoped: true
controllerCert:
cmName: NAME_OF_CONFIGMAP
certFileName: CERTIFICATE_FILENAME_KEY

Installation

By following these instructions, you will have deployed the Aperture Agent into your cluster.

  1. Configure the Aperture Cloud endpoint and API Key parameters in the Agent. Update the values.yaml file and pass it with the install command:

    agent:
    namespaceScoped: true
    config:
    fluxninja:
    enable_cloud_controller: true
    endpoint: "ORGANIZATION_NAME.app.fluxninja.com:443"
    secrets:
    fluxNinjaExtension:
    create: true
    secretKeyRef:
    name: aperture-apikey
    key: apiKey
    value: "API_KEY"

    Replace ORGANIZATION_NAME with the Aperture Cloud organization name and API_KEY with the API key linked to the project. Navigate to the Aperture tab in the sidebar menu and then select API Keys in the top bar. From there, you can either copy the existing key or create a new one by clicking on Create API Key. For detailed instructions on locating API Keys, refer to the API Keys section.

    note

    If you are using a Self-Hosted Aperture Controller, modify the above configuration as explained in Self-hosted: Agent Configuration.

    helm install agent aperture/aperture-agent -f values.yaml --skip-crds
  2. If you want to modify the default parameters or the Aperture Agent configuration, for example log, you can update the values.yaml file and pass it with install command:

    agent:
    namespaceScoped: true
    config:
    fluxninja:
    enable_cloud_controller: true
    endpoint: "ORGANIZATION_NAME.app.fluxninja.com:443"
    log:
    level: debug
    pretty_console: true
    non_blocking: false
    secrets:
    fluxNinjaExtension:
    create: true
    secretKeyRef:
    name: aperture-apikey
    key: apiKey
    value: "API_KEY"
    helm install agent aperture/aperture-agent -f values.yaml --skip-crds

    All the configuration parameters for the Aperture Agent are available here.

    A list of configurable parameters for the installation can be found in the README.

  3. To deploy the Aperture Agent into a namespace other than default, use the --namespace flag:

    helm install agent aperture/aperture-agent -f values.yaml --namespace aperture-agent --create-namespace --skip-crds

Upgrade Procedure

By following these instructions, you will have deployed the upgraded version of Aperture Agent into your cluster.

  1. Use the same values.yaml file created as part of the Installation Steps and pass it with below command:

    helm template agent aperture/aperture-agent -f values.yaml | kubectl apply -f -

    Once all the pods are in a running state after upgrade, run the below command to keep the Helm release updated:

    helm upgrade agent aperture/aperture-agent -f values.yaml
  2. If you have deployed the Aperture Agent into a namespace other than default, use the --namespace flag:

    helm template agent aperture/aperture-agent -f values.yaml --namespace aperture-agent | kubectl apply -f -

    Once all the pods are in a running state after upgrade, run the below command to keep the Helm release updated:

    helm upgrade agent aperture/aperture-agent -f values.yaml --namespace aperture-agent

Verifying the Installation

Once you have successfully deployed the resources, confirm that the Aperture Agent is up and running:

kubectl get pod

You should see pods for Aperture Agent in RUNNING state.

Uninstall

You can uninstall the Aperture Agent and its components installed above, by following the below steps.

Use the same values.yaml file created as part of the Installation Steps and pass it with the below command.

  1. Uninstall the Aperture Agent:

    helm uninstall agent -f values.yaml
  2. If you have installed the chart in some other namespace than default, run the commands below:

    helm uninstall agent --namespace aperture-agent -f values.yaml
  3. By default, the ConfigMap generated by the aperturectl for the client certificate of the Aperture Controller is not deleted with the above steps. If you want to delete them, run the commands below:

    kubectl delete configmap -l app.kubernetes.io/instance=agent-aperture-agent