apim3

by Gravitee.io

Helm chartv4.14.0-alpha.1App 4.14.0-alpha.1Verified publisherOfficial

Official Gravitee.io Helm chart for API Management

About this chart

Gravitee.io API Management Helm Chart

Chart supported versions: 3.0.x and higher

Versioning change

After version 3.2.0, version of the Helm Chart will be aligned with the product version. eg:

  • If you want to use APIM version 3.x.y you have to use the Chart version 3.x.y
  • If you want to use APIM version 3.x.z you have to use the Chart version 3.x.z

Chart and package name changes

For the version 4.0.0 and after, the chart folder change from graviteeio/apim3 to graviteeio/apim For the versions 3.x.y, all the package will be available in graviteeio/apim3 and graviteeio/apim with a different name eg:

  • Version 3.20.x will be published in graviteeio/apim3 with the name apim3-3.20.x AND in graviteeio/apim with the name apim-3.20.x

graviteeio/apim3 is now depreciated.

Components

This chart will deploy the following:

  • Gravitee Management API
  • Gravitee Management UI
  • Gravitee Portal UI
  • Gravitee Gateway
  • MongoDB replica-set (optional dependency)
  • Elasticsearch cluster (optional dependency)

Installing

  • Add the Gravitee.io helm charts repo
    $ helm repo add graviteeio https://helm.gravitee.io
    
  • Install it
    $ helm install --name graviteeio-apimx graviteeio/apim
    

Upgrading

Please, before upgrading to a new chart version, always check CHANGELOG.md. This one is about latest version (master), but you can switch to another maintained branch version in github to view the one dedicated to your version.

Also, product or helm change with potential breaking changes are listed in the releases-and-changelog documentation page.

Create a chart archive

To package this chart directory into a chart archive, run:

$ helm package .

Installing the Chart

To install the chart from the Helm repository with the release name graviteeio-apimx:

$ helm install --name graviteeio-apimx graviteeio/apim

Note: If you're using Helm 3, the name parameter is no more valid. Please check https://helm.sh/docs/faq/#release-names-are-now-scoped-to-the-namespace

To install the chart using the chart archive, run:

$ helm install apim-3.0.0.tgz

Configuration

The following tables list the configurable parameters of the Gravitee chart and their default values.

You can rely on kubernetes ConfigMaps and Secrets to initialize Gravitee settings since APIM 3.15.0. To use this feature, you have to create the ServiceAccount that allows APIM to connect to the Kubernetes API (the helm chart should do it by default) and then you simply have to define your application settings like this:

  • for a Secret : kubernetes://<namespace>/secrets/<my-secret-name>/<my-secret-key>
  • for a ConfigMap : kubernetes://<namespace>/configmaps/<my-configmap-name>/<my-configmap-key>

Here is an example for the mongodb uri initialized from the mongo secret deployed in the default namespace:

mongo:
  uri: kubernetes://default/secrets/mongo/mongouri

If you need to access a secret, you have to create a role within your namespace.

If you are deploying in another namespace and you need to access a secret there, you have to create a separate role in that namespace. The two roles can have the same name, but they are completely separate objects - each role only gives access to the namespace it is created in.

For more information about roles, see Role and ClusterRole in the Kubernetes documentation.

Shared configuration

To configure common features such as:

ParameterDescriptionDefault
chaos.enabledEnable Chaos testfalse
inMemoryAuth.enabledEnable oauth logintrue
ldap.enabledEnable LDAP loginfalse

Mongo

MongoDB connections

There are three ways to configure MongoDB connections.

The most simple is to provide the MongoDB URI.

ParameterDescriptionDefault
mongo.uriMongo URInull

If no mongo.uri is provided, you can provide a mongo.servers raw definition in combination with mongo.dbname, plus eventual authentication configuration:

mongo:
  servers: |
    - host: mongo1
      port: 27017
    - host: mongo2
      port: 27017
  dbname: gravitee
  auth:
    enabled: false
    username: 
    password:

If neither mongo.uri or mongo.servers are provided, you have to define the following configuration options:

ParameterDescriptionDefault
mongo.rsEnabledWhether Mongo replicaset is enabled or nottrue
mongo.rsMongo replicaset namers0
mongo.dbhostMongo host addressmongo-mongodb-replicaset
mongo.dbportMongo host port27017
mongo.dbnameMongo DB namegravitee
mongo.auth.enabledEnable Mongo DB authenticationfalse
mongo.auth.usernameMongo DB usernamenull
mongo.auth.passwordMongo DB passwordnull

Other keys

ParameterDescriptionDefault
mongo.sslEnabledEnable SSL connection to MongoDBfalse
mongo.socketKeepAliveEnable keep alive for socketfalse

Mongo ReplicaSet

ParameterDescriptionDefault
mongodb.enabledDeprecated. Enable deployment of Mongo replicaset. Removed in APIM 4.15: deploy MongoDB outside this chart and point mongo.* at itfalse

See MongoDB replicaset for detailed documentation on helm chart.

** Please be aware that the mongodb-replicaset installed by Gravitee is NOT recommended in production and it is just for testing purpose and running APIM locally.

Elasticsearch

ParameterDescriptionDefault
es.security.enabledElasticsearch username and password enabledfalse
es.security.usernameElasticsearch usernameexample
es.security.passwordElasticsearch passwordexample
es.security.apiKeyElasticsearch API key, rendered when set whatever es.security.enabled, instead of username and password""
es.tls.enabledElasticsearch TLS enabledfalse
es.tls.keystore.typeElasticsearch TLS keystore type (jks, pem or pfx)null
es.tls.keystore.pathElasticsearch TLS keystore path (jks, pfx)null
es.tls.keystore.passwordElasticsearch TLS keystore password (jks, pfx)null
es.tls.keystore.certsElasticsearch TLS certs (only pems)null
es.tls.keystore.keysElasticsearch TLS keys (only pems)null
es.indexElasticsearch indexgravitee
es.endpointsElasticsearch endpoint array[http://graviteeio-apim-elasticsearch.default.svc.cluster.local:9200]
es.pipeline.plugins.ingestElasticsearch pipeline ingest pluginsgeoip, user_agent

Elasticsearch cluster

ParameterDescriptionDefault
elasticsearch.enabledDeprecated. Enable deployment of Elasticsearch cluster. Removed in APIM 4.15: deploy Elasticsearch outside this chart and point es.* at itfalse

See Elasticsearch for detailed documentation on optional requirements helm chart.

** Please be aware that the Elasticsearch installed by Gravitee is NOT recommended in production and it is just for testing purpose and running APIM locally.

Gravitee UI

ParameterDescriptionDefault
ui.nameUI service nameui
ui.baseURLBase URL to access to the Management API (if set to null, defaults to Management API ingress value)[apim.example.com]/management
ui.titleUI Portal title (if set to null, retrieved from the management repository)API Portal
ui.managementTitleUI Management title (if set to null, retrieved from the management repository)API Management
ui.documentationLinkUI link to documentation (if set to null, retrieved from the management repository)https://documentation.gravitee.io/
ui.portal.apikeyHeaderAPI Key header name (if set to null, retrieved from the management repository)

Deploy apim3 with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has apim3 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 chartapim3 is pinned at v4.14.0-alpha.1 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