akeyless-api-gateway
by akeyless.io
A Helm chart for Kubernetes that deploys akeyless-api-gateway
About this chart
Akeyless API Gateway
Introduction
This chart bootstraps API-GATEWAY deployment on a Kubernetes cluster using the Helm package manager. This chart has been tested to work with NGINX Ingress and cert-manager.
Preqrequisites
Horizonal Auto-Scaling
Horizontal auto-scaling is based on the HorizonalPodAutoscaler object.
For it to work properly, Kubernetes metrics server must be installed in the cluster - https://github.com/kubernetes-sigs/metrics-server.
Get Repo Info
$ helm repo add akeyless https://akeylesslabs.github.io/helm-charts
$ helm repo update
See helm repo for command documentation.
Installing the Chart
The values.yaml file holds default values, replace the values with the ones from your environment where needed.
To install the chart run:
helm install RELEASE_NAME akeyless/akeyless-api-gateway
Extra Objects
extraObjects renders additional Kubernetes manifests as part of the release. Each entry is rendered with tpl, so it can reference .Release, .Chart and .Values. Custom resources require their CRDs to be installed before the release.
extraObjects:
- apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ .Release.Name }}-extra"
namespace: "{{ .Release.Namespace }}"
data:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
An entry is either a map or a string (- |). What the chart does to each:
| String entry | Map entry | |
|---|---|---|
| Values and types | exactly as written | numbers are read as 64-bit floats: 1.0 renders as 1, integers above 2^53 lose precision |
| Templated values | keep their type: {{ .Values.x }} renders a number | always strings: "{{ .Values.x }}" renders '3' |
| Key order, quoting, comments | kept | keys sorted, quoting normalized, comments dropped |
{{ }} anywhere in the object | evaluated as a template | evaluated as a template |
The chart tests cover values and types, templated values and {{ }} handling. Key order, quoting and comments follow Helm and are not tested here.
To pass a literal {{ }} through, for example a Prometheus alert using {{ $labels.instance }}, escape it as {{ "{{" }} and {{ "}}" }}. Use a string entry when a field needs an exact value or a templated number or boolean:
extraMinAvailable: 1
extraObjects:
- |
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: "{{ .Release.Name }}-extra"
namespace: "{{ .Release.Namespace }}"
spec:
minAvailable: {{ .Values.extraMinAvailable }}
Parameters
The following table lists the configurable parameters of the API Gateway chart and their default values.
Deployment parameters
| Parameter | Description | Default |
|---|---|---|
image.repository | API Gateway image name | akeyless/base |
image.tag | API Gateway image tag | latest |
image.pullPolicy | API Gateway image pull policy | Always |
containerName | API Gateway container name | api-gateway |
replicaCount | Number of API Gateway pods | 2 |
livenessProbe | Liveness probe configuration for API Gateway | Check values.yaml file |
readinessProbe | Readiness probe configuration for API Gateway | Check values.yaml file |
resources.limits | The resources limits for API Gateway (If HPA is enabled these must be set) | {} |
resources.requests | The requested resources for API Gateway (If HPA is enabled these must be set) | {} |
httpProxySettings.http_proxy | Standard linux HTTP Proxy, should contain the URLs of the proxies for HTTP | nil |
httpProxySettings.https_proxy | Standard linux HTTP Proxy, should contain the URLs of the proxies for HTTPS | nil |
httpProxySettings.no_proxy | Standard linux HTTP Proxy, should contain a comma-separated list of domain extensions proxy should not be used for | nil |
cache.resources.limits | The resources limits for the redis cluster cache | {} |
Exposure parameters
| Parameter | Description | Default |
|---|---|---|
service.type | Kubernetes service type | LoadBalancer |
service.ports | Service ports object, look at the comments for examples | Check values.yaml file |
service.annotations | Service extra annotations | {} |
ingress.enabled | Enable ingress resource | false |
ingress.ingressClassName | A reference to an IngressClass resource | nil |
ingress.annotations | Ingress annotations | [] |
ingress.rules | Ingress rules object, look at the comments for examples | Check values.yaml file |
ingress.path | Path for the default host | / |
ingress.tls | Enable TLS configuration for the hostname | false |
ingress.certManager | Add annotations for cert-manager | false |
route.enabled | Enable OpenShift Route resource generation (OpenShift only) | false |
route.labels | Route extra labels | {} |
route.annotations | Route extra annotations | {} |
route.rules | Route rules object, one Route is created per rule. hostname is optional per rule — if unset, OpenShift auto-generates one. Look at the comments for examples | Check values.yaml file |
route.path | Path for the default host | / |
route.tls.enabled | Add a tls stanza to the generated Route(s) | false |
route.tls.termination | TLS termination type. Can be one of: edge, passthrough, reencrypt | edge |
route.tls.insecureEdgeTerminationPolicy | Policy for insecure (non-TLS) requests. Can be one of: Allow, Redirect, None | Redirect |
route.tls.certificate | PEM-encoded certificate. Only used for edge/reencrypt termination | nil |
route.tls.key | PEM-encoded key. Only used for edge/reencrypt termination | nil |
route.tls.caCertificate | PEM-encoded CA certificate. Only used for edge/reencrypt termination | nil |
route.tls.destinationCACertificate | PEM-encoded CA certificate used to validate the destination endpoint's certificate. Only used for reencrypt termination | nil |
HPA parameters
| Parameter | Description | Default |
|---|---|---|
HPA.enabled | Enable API Gateway Horizontal Pod Autoscaler | false |
HPA.minReplicas | Minimum desired number of replicas | 1 |
HPA.maxReplicas | Minimum desired number of replicas | 14 |
HPA.cpuAvgUtil | CPU average utilization | 50 |
HPA.memAvgUtil | Memory average utilization | 50 |
API-Gateway configuration parameters
| Parameter | Description | Default |
|---|---|---|
akeylessUserAuth.adminAccessId | Akeyless Access ID (can used as email address) | nil |
akeylessUserAuth.adminAccessKey | Akeyless Access Key | nil |
akeylessUserAuth.adminPassword | Akeyless Access Password (should be used only when akeylessUserAuth.adminAccessId is email) | nil |
akeylessUserAuth.clusterName | API Gateway cluster name | nil |
akeylessUserAuth.initialClusterDisplayName | API Gateway cluster display name | nil |
akeylessUserAuth.configProtectionKeyName | Akeyless Protection key name |
Deploy akeyless-api-gateway with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has akeyless-api-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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartakeyless-api-gateway is pinned at v1.62.35 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