apim3
by Gravitee.io
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:
- chaos testing (see chaoskube chart)
- configuration database (see mongodb-replicaset chart)
- logs database (see elastichsearch chart)
| Parameter | Description | Default |
|---|---|---|
chaos.enabled | Enable Chaos test | false |
inMemoryAuth.enabled | Enable oauth login | true |
ldap.enabled | Enable LDAP login | false |
Mongo
MongoDB connections
There are three ways to configure MongoDB connections.
The most simple is to provide the MongoDB URI.
| Parameter | Description | Default |
|---|---|---|
mongo.uri | Mongo URI | null |
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:
| Parameter | Description | Default |
|---|---|---|
mongo.rsEnabled | Whether Mongo replicaset is enabled or not | true |
mongo.rs | Mongo replicaset name | rs0 |
mongo.dbhost | Mongo host address | mongo-mongodb-replicaset |
mongo.dbport | Mongo host port | 27017 |
mongo.dbname | Mongo DB name | gravitee |
mongo.auth.enabled | Enable Mongo DB authentication | false |
mongo.auth.username | Mongo DB username | null |
mongo.auth.password | Mongo DB password | null |
Other keys
| Parameter | Description | Default |
|---|---|---|
mongo.sslEnabled | Enable SSL connection to MongoDB | false |
mongo.socketKeepAlive | Enable keep alive for socket | false |
Mongo ReplicaSet
| Parameter | Description | Default |
|---|---|---|
mongodb.enabled | Deprecated. Enable deployment of Mongo replicaset. Removed in APIM 4.15: deploy MongoDB outside this chart and point mongo.* at it | false |
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
| Parameter | Description | Default |
|---|---|---|
es.security.enabled | Elasticsearch username and password enabled | false |
es.security.username | Elasticsearch username | example |
es.security.password | Elasticsearch password | example |
es.security.apiKey | Elasticsearch API key, rendered when set whatever es.security.enabled, instead of username and password | "" |
es.tls.enabled | Elasticsearch TLS enabled | false |
es.tls.keystore.type | Elasticsearch TLS keystore type (jks, pem or pfx) | null |
es.tls.keystore.path | Elasticsearch TLS keystore path (jks, pfx) | null |
es.tls.keystore.password | Elasticsearch TLS keystore password (jks, pfx) | null |
es.tls.keystore.certs | Elasticsearch TLS certs (only pems) | null |
es.tls.keystore.keys | Elasticsearch TLS keys (only pems) | null |
es.index | Elasticsearch index | gravitee |
es.endpoints | Elasticsearch endpoint array | [http://graviteeio-apim-elasticsearch.default.svc.cluster.local:9200] |
es.pipeline.plugins.ingest | Elasticsearch pipeline ingest plugins | geoip, user_agent |
Elasticsearch cluster
| Parameter | Description | Default |
|---|---|---|
elasticsearch.enabled | Deprecated. Enable deployment of Elasticsearch cluster. Removed in APIM 4.15: deploy Elasticsearch outside this chart and point es.* at it | false |
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
| Parameter | Description | Default |
|---|---|---|
ui.name | UI service name | ui |
ui.baseURL | Base URL to access to the Management API (if set to null, defaults to Management API ingress value) | [apim.example.com]/management |
ui.title | UI Portal title (if set to null, retrieved from the management repository) | API Portal |
ui.managementTitle | UI Management title (if set to null, retrieved from the management repository) | API Management |
ui.documentationLink | UI link to documentation (if set to null, retrieved from the management repository) | https://documentation.gravitee.io/ |
ui.portal.apikeyHeader | API 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartapim3 is pinned at v4.14.0-alpha.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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