gateway

by deployment-aqua

Helm chartv2022.4.18App 2022.4Apache-2.0

A Helm chart for the Aqua Gateway

About this chart

Aqua Security Gateway Helm Chart

Helm chart for installation and maintenance of Aqua Container Security Platform Gateway component to support multi-cluster use-case.

Contents

  • Aqua Security Gateway Helm Chart
    • Contents
    • Prerequisites
      • Container Registry Credentials
    • Installing the Chart
      • Installing Aqua Gateway from GitHub Repo
        • Edit values.yaml file in gateway directory with following details as prerequisite
      • Installing Aqua Gateway from Helm Private Repository
    • Configure mTLS between server/gateway and external DB
    • Configurable Variables

Prerequisites

Container Registry Credentials

Link

Installing the Chart

Follow the steps in this section for production grade deployments. You can either clone aqua-helm git repo or you can add our helm private repository (https://helm.aquasec.com)

Installing Aqua Gateway from GitHub Repo

  1. Clone the GitHub repository with the charts
    git clone https://github.com/aquasecurity/aqua-helm.git
    cd aqua-helm/
    

Edit values.yaml file in gateway directory with following details as prerequisite

  1. global.db.external.name - External database name
  2. global.db.external.host - External database public IP or endpoint URL
  3. global.db.external.port - External database port
  4. global.db.external.user - External database username
  5. global.db.external.password - External database password
  6. global.db.external.auditName - External audit database name
  7. global.db.external.auditHost - External audit database public IP or endpoint URL
  8. global.db.external.auditPort - External audit database port
  9. global.db.external.auditUser - External audit database username
  10. global.db.external.auditPassword - External audit database password
  11. console.publicIP - Aqua CSP console public IP or endpoint URL
  12. console.publicPort - Aqua CSP console public port
  // To load DB passswords from secrets:
  // change passwordFromSecret.enable to true
  // for loading DB password from secret edit passwordFromSecret.dbPasswordName  passwordFromSecret.dbPasswordName with secret name and secret key
  // for loading Audit-DB password from secret edit passwordFromSecret.dbAuditPasswordName  passwordFromSecret.dbAuditPasswordName with secret name and secret key
  // for loading PubSub DB password from secret edit passwordFromSecret.dbPubsubPasswordName  passwordFromSecret.dbPubsubPasswordName with secret name and secret key
  1. Create aqua namespace if gateway is being deployed to a new cluster.

    kubectl create namespace aqua
    
  2. Install Aqua

    helm upgrade --install --namespace aqua gateway ./gateway --set imageCredentials.username=<>,imageCredentials.password=<>,platform=<>
    

Installing Aqua Gateway from Helm Private Repository

  1. Add Aqua Helm Repository

    helm repo add aqua-helm https://helm.aquasec.com
    
  2. Check for available chart versions either from Changelog or by running the below command

    helm search repo aqua-helm/gateway --versions
    
  3. Create aqua namespace if gateway is being deployed to a new cluster.

    kubectl create namespace aqua
    
  4. copy the values.yaml content from Values.yaml to a file and make the respective changes values then run the following command:

    helm upgrade --install --namespace aqua gateway aqua-helm/gateway --values values.yaml --version <>
    

Configure mTLS between server/gateway and external DB

  1. Add the external DB values under global.db.external section
  2. Change global.db.ssl and global.db.auditssl to true
  3. Create secret with external DB public certificate
    kubectl create secret generic <<dbcert_secret_name>> --from-file <<db_certificate.pem_file_path>> -n aqua
    
  4. Set the following variables
    global.db.externalDBCerts.enable: true
    global.db.externalDBCerts.certSecretName: <<dbcert_secret_name>>
    
  5. Select ssl mode for external databases
    sslmode: require          # accepts: allow | prefer | require | verify-ca | verify-full (Default: Require)
    auditsslmode: require     # accepts: allow | prefer | require | verify-ca | verify-full (Default: Require)
    
  6. Note: In Active-Active mode set respective values to pubsub variables

Configurable Variables

ParameterDescriptionDefaultMandatory
imageCredentials.createSet if to create new pull image secrettrueYES
imageCredentials.nameYour Docker pull image secret nameaqua-registry-secretYES
imageCredentials.repositoryUriPrefixRepository uri prefix for dockerhub set docker.ioregistry.aquasec.comYES
imageCredentials.registrySet the registry url for dockerhub set index.docker.io/v1/registry.aquasec.comYES
imageCredentials.usernameYour Docker registry (DockerHub, etc.) usernameaqua-registry-secretYES
imageCredentials.passwordYour Docker registry (DockerHub, etc.) passwordunsetYES
rbac.createTo create RBAC for gateway componentfalseYES if gateway alone is deploying in new cluster
clusterRole.roleRefCluster role reference name for cluster roleBindingunsetNO
console.publicIPAddress of the serveraqua-console-svcYES
console.publicPortServer endpoint Port value443YES
serviceAccount.nameName of the ServiceAccountaqua-saYES
serviceAccount.annotationsAnnotations of the ServiceAccount``NO
serviceAccount.attachImagePullSecretAttach image pull secret to created service accounttrue
headlessServiceCreate headless service for envoytrueYES
global.platformSpecify the Kubernetes (k8s) platform acronym, allowed values are: aks, eks, gke, openshift, tkg, tkgi, k8s, rancher, gs, k3s, mke.unsetYES
global.db.external.enabledAvoid installing a Postgres container and use an external database insteadfalseYES
global.db.external.namePostgreSQL DB nameunsetYESif db.external.enabled is set to true
global.db.external.hostPostgreSQL DB hostnameunsetYESif db.external.enabled is set to true
global.db.external.portPostgreSQL DB portunsetYESif db.external.enabled is set to true
global.db.external.userPostgreSQL DB usernameunsetYESif db.external.enabled is set to true
global.db.external.passwordPostgreSQL DB passwordunsetYESif db.external.enabled is set to true
global.db.external.auditNamePostgreSQL DB audit nameunsetNO
global.db.external.auditHostPostgreSQL DB audit hostnameunsetNO
global.db.external.auditPortPostgreSQL DB audit portunset

Deploy gateway with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has gateway on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgateway is pinned at v2022.4.18 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply