Skip to content

Latest commit

 

History

History
296 lines (238 loc) · 9.1 KB

File metadata and controls

296 lines (238 loc) · 9.1 KB
title description keywords sidebar_position
Namespace-scoped Installation
Install Aperture Agent using namespace-scoped resources
install
setup
agent
operator
1
import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import {apertureVersion, apertureVersionWithOutV} from '../../../../../apertureVersion.js';

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

    :::info 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 {#agent-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-agent-apikey
            key: apiKey
          value: AGENT_API_KEY

    Replace ORGANIZATION_NAME with the Aperture Cloud organization name and AGENT_API_KEY with the API key linked to the project. If an API key has not been created, generate a new one through the Aperture Cloud UI. Refer to API Keys for additional information.

    :::note

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

    :::

    {`helm install agent aperture/aperture-agent -f values.yaml --skip-crds`} {`aperturectl install agent --version ${apertureVersion} --values-file values.yaml`}
  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-agent-apikey
            key: apiKey
          value: AGENT_API_KEY
    {`helm install agent aperture/aperture-agent -f values.yaml --skip-crds`} {`aperturectl install agent --version ${apertureVersion} --values-file values.yaml`}

    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`} {`aperturectl install agent --version ${apertureVersion} --values-file values.yaml --namespace aperture-agent`}

Upgrade Procedure {#agent-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`} {`aperturectl install agent --version ${apertureVersion} --values-file 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`} {`aperturectl install agent --version ${apertureVersion} --values-file 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`} {`aperturectl uninstall agent --values-file values.yaml --version ${apertureVersion}`}
  2. If you have installed the chart in some other namespace than default, execute the commands below:

    {`helm uninstall agent --namespace aperture-agent -f values.yaml`} {`aperturectl uninstall agent --namespace aperture-agent --values-file values.yaml --version ${apertureVersion}`}
  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