Skip to content

Commit

Permalink
update README.md for meta charts
Browse files Browse the repository at this point in the history
  • Loading branch information
rakkhin committed Oct 12, 2023
1 parent 545698a commit 1f31f31
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 27 deletions.
45 changes: 37 additions & 8 deletions tyk-mdcb-data-plane/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Tyk MDCB Data Plane

> [!WARNING]
> [!WARNING]
> To be renamed to tyk-data-plane
`tyk-mdcb-data-plane` provides the default deployment of a Tyk data plane for Tyk Self Managed MDCB or Tyk Cloud users. It will deploy the data plane components that remotely connect to a MDCB control plane.
Expand Down Expand Up @@ -110,7 +110,7 @@ To get all configurable options with detailed comments:
helm show values tyk-helm/tyk-mdcb-data-plane > values.yaml
```

You can update any value in your local `values.yaml` file and use `-f [filename]` flag to override default values during installation.
You can update any value in your local `values.yaml` file and use `-f [filename]` flag to override default values during installation.
Alternatively, you can use `--set` flag to set it in Tyk installation.

### Set Redis Connection Details (Required)
Expand All @@ -119,7 +119,7 @@ Tyk uses Redis for distributed rate-limiting and token storage. You may use the

Set the following values after installing Redis:

| Name | Description |
| Name | Description |
|------|-------------|
| `global.redis.addrs` | Redis addresses |
| `global.redis.pass` | Redis password in plain text |
Expand Down Expand Up @@ -164,6 +164,35 @@ helm install redis tyk-helm/simple-redis -n tyk

The Tyk Helm Chart can connect to `simple-redis` in the same namespace by default. You do not need to set Redis address and password in `values.yaml`.

### Enable gateway autoscaling

This chart allows for easy configuration of autoscaling parameters. To simply enable autoscaling it's enough to add `--set tyk-gateway.gateway.autoscaling.enabled=true`. That will enable `Horizontal Pod Autoscaler` resource with default parameters (avg. CPU load at 60%, scaling between 1 and 3 instances). To customize those values you can add `--set tyk-gateway.gateway.autoscaling.averageCpuUtilization=75` or use `values.yaml` file:

```yaml
tyk-gateway:
gateway:
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 30
```
Built-in rules include `tyk-gateway.gateway.autoscaling.averageCpuUtilization` for CPU utilization (set by default at 60%) and `tyk-gateway.gateway.autoscaling.averageMemoryUtilization` for memory (disabled by default). In addition to that you can define rules for custom metrics using `tyk-gateway.gateway.autoscaling.autoscalingTemplate` list:

```yaml
tyk-gateway:
gateway:
autoscaling:
autoscalingTemplate:
- type: Pods
pods:
metric:
name: nginx_ingress_controller_nginx_process_requests_total
target:
type: AverageValue
averageValue: 10000m
```

### Gateway Configurations

Configure below inside `tyk-gateway` section.
Expand Down Expand Up @@ -191,11 +220,11 @@ If you want to use your own key/cert pair, please follow the following steps:
To add your custom Certificate Authority(CA) to your containers, you can mount your CA certificate directly into /etc/ssl/certs folder.

```yaml
extraVolumes:
extraVolumes:
- name: self-signed-ca
secret:
secretName: self-signed-ca-secret
extraVolumeMounts:
extraVolumeMounts:
- name: self-signed-ca
mountPath: "/etc/ssl/certs/myCA.pem"
subPath: myCA.pem
Expand Down Expand Up @@ -270,13 +299,13 @@ Here is a reference of all [Tyk Gateway Configuration Options](https://tyk.io/do
To enable Pump, set `global.components.pump` to true, and configure below inside `tyk-pump` section.

| Pump | Configuration |
|---------------------------|------------------------------------------------------------------------------------------------------------|
|---------------------------|------------------------------------------------------------------------------------------------------------|
| Prometheus Pump (Default) | Add `prometheus` to `tyk-pump.pump.backend`, and add connection details for prometheus under `tyk-pump.pump.prometheusPump`. |
| Hybrid Pump (Default) | Add `hybrid` to `tyk-pump.pump.backend`, and add remoteControlPlane details under `global.remoteControlPlane`. Change `tyk-gateway.gateway.analyticsConfigType` to `""` (empty string) |
| Other Pumps | Add the required environment variables in `tyk-pump.pump.extraEnvs` |

#### Prometheus Pump
Add `prometheus` to `tyk-pump.pump.backend`, and add connection details for prometheus under `tyk-pump.pump.prometheusPump`.
Add `prometheus` to `tyk-pump.pump.backend`, and add connection details for prometheus under `tyk-pump.pump.prometheusPump`.

We also support monitoring using Prometheus Operator. All you have to do is set `tyk-pump.pump.prometheusPump.prometheusOperator.enabled` to true.
This will create a *PodMonitor* resource for your Pump instance.
Expand Down Expand Up @@ -304,7 +333,7 @@ Add `hybrid` to `tyk-pump.pump.backend`, and add remoteControlPlane details unde
```yaml
# hybridPump configures Tyk Pump to forward Tyk metrics to a Tyk Control Plane.
# Please add "hybrid" to .Values.pump.backend in order to enable Hybrid Pump.
hybridPump:
hybridPump:
# Specify the frequency of the aggregation in minutes or simply turn it on by setting it to true
enableAggregateAnalytics: true
# Hybrid pump RPC calls timeout in seconds.
Expand Down
46 changes: 37 additions & 9 deletions tyk-oss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ To get all configurable options with detailed comments:
helm show values tyk-helm/tyk-oss > values.yaml
```

You can update any value in your local `values.yaml` file and use `-f [filename]` flag to override default values during installation.
You can update any value in your local `values.yaml` file and use `-f [filename]` flag to override default values during installation.
Alternatively, you can use `--set` flag to set it in Tyk installation.

### Set Redis Connection Details (Required)
Expand All @@ -92,7 +92,7 @@ Tyk uses Redis for distributed rate-limiting and token storage. You may use the

Set the following values after installing Redis:

| Name | Description |
| Name | Description |
|------|-------------|
| `global.redis.addrs` | Redis addresses |
| `global.redis.pass` | Redis password in plain text |
Expand Down Expand Up @@ -137,6 +137,34 @@ helm install redis tyk-helm/simple-redis -n tyk

The Tyk Helm Chart can connect to `simple-redis` in the same namespace by default. You do not need to set Redis address and password in `values.yaml`.

### Enable gateway autoscaling

This chart allows for easy configuration of autoscaling parameters. To simply enable autoscaling it's enough to add `--set tyk-gateway.gateway.autoscaling.enabled=true`. That will enable `Horizontal Pod Autoscaler` resource with default parameters (avg. CPU load at 60%, scaling between 1 and 3 instances). To customize those values you can add `--set tyk-gateway.gateway.autoscaling.averageCpuUtilization=75` or use `values.yaml` file:

```yaml
tyk-gateway:
gateway:
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 30
```
Built-in rules include `tyk-gateway.gateway.autoscaling.averageCpuUtilization` for CPU utilization (set by default at 60%) and `tyk-gateway.gateway.autoscaling.averageMemoryUtilization` for memory (disabled by default). In addition to that you can define rules for custom metrics using `tyk-gateway.gateway.autoscaling.autoscalingTemplate` list:

```yaml
tyk-gateway:
gateway:
autoscaling:
autoscalingTemplate:
- type: Pods
pods:
metric:
name: nginx_ingress_controller_nginx_process_requests_total
target:
type: AverageValue
averageValue: 10000m
```

### Gateway Configurations

Expand Down Expand Up @@ -165,11 +193,11 @@ If you want to use your own key/cert pair, please follow the following steps:
To add your custom Certificate Authority(CA) to your containers, you can mount your CA certificate directly into /etc/ssl/certs folder.

```yaml
extraVolumes:
extraVolumes:
- name: self-signed-ca
secret:
secretName: self-signed-ca-secret
extraVolumeMounts:
extraVolumeMounts:
- name: self-signed-ca
mountPath: "/etc/ssl/certs/myCA.pem"
subPath: myCA.pem
Expand Down Expand Up @@ -237,7 +265,7 @@ You can configure persistent volume for APIs, Policies, and middlewares using `e
persistentVolumeClaim:
claimName: tyk-middleware-claim
extraVolumeMounts:
extraVolumeMounts:
- name: tyk-app-storage
mountPath: /mnt/tyk-gateway/apps
- name: tyk-policies-storage
Expand Down Expand Up @@ -267,15 +295,15 @@ Here is a reference of all [Tyk Gateway Configuration Options](https://tyk.io/do
To enable Pump, set `global.components.pump` to true, and configure below inside `tyk-pump` section.

| Pump | Configuration |
|---------------------------|------------------------------------------------------------------------------------------------------------|
|---------------------------|------------------------------------------------------------------------------------------------------------|
| Prometheus Pump (Default) | Add `prometheus` to `tyk-pump.pump.backend`, and add connection details for prometheus under `tyk-pump.pump.prometheusPump`. |
| Mongo Pump | Add `mongo` to `tyk-pump.pump.backend`, and add connection details for mongo under `global.mongo`. |
| SQL Pump | Add `postgres` to `tyk-pump.pump.backend`, and add connection details for postgres under `global.postgres`. |
| Uptime Pump | Set `tyk-pump.pump.uptimePumpBackend` to `'mongo'` or `'postgres'` |
| Other Pumps | Add the required environment variables in `tyk-pump.pump.extraEnvs` |

#### Prometheus Pump
Add `prometheus` to `tyk-pump.pump.backend`, and add connection details for prometheus under `tyk-pump.pump.prometheusPump`.
Add `prometheus` to `tyk-pump.pump.backend`, and add connection details for prometheus under `tyk-pump.pump.prometheusPump`.

We also support monitoring using Prometheus Operator. All you have to do is set `tyk-pump.pump.prometheusPump.prometheusOperator.enabled` to true.
This will create a *PodMonitor* resource for your Pump instance.
Expand All @@ -302,7 +330,7 @@ NOTE: [Here is](https://tyk.io/docs/planning-for-production/database-settings/)
Add following under the `global` section in `values.yaml`:

```yaml
# Set mongo connection details if you want to configure mongo pump.
# Set mongo connection details if you want to configure mongo pump.
mongo:
# The mongoURL value will allow you to set your MongoDB address.
# Default value: mongodb://mongo.{{ .Release.Namespace }}.svc.cluster.local:27017/tyk_analytics
Expand Down Expand Up @@ -348,4 +376,4 @@ Uptime Pump can be configured by setting `tyk-pump.pump.uptimePumpBackend` in va
3. empty: Used to disable uptime analytics.

#### Other Pumps
To setup other backends for pump, refer to this [document](https://github.com/TykTechnologies/tyk-pump/blob/master/README.md#pumps--back-ends-supported) and add the required environment variables in `tyk-pump.pump.extraEnvs`
To setup other backends for pump, refer to this [document](https://github.com/TykTechnologies/tyk-pump/blob/master/README.md#pumps--back-ends-supported) and add the required environment variables in `tyk-pump.pump.extraEnvs`
49 changes: 39 additions & 10 deletions tyk-single-dc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ By default, this chart installs following components as subcharts on a [Kubernet
| --------- | ------------------ | ---- |
|Tyk Gateway |true | n/a |
|Tyk Pump |true | global.components.pump |
|Tyk Dashboard| true| global.components.dashboard |
|Tyk Dashboard| true| global.components.dashboard |

To enable or disable each component, change the corresponding enabled flag.

Expand All @@ -35,9 +35,9 @@ helm repo update
helm show values tyk-helm/tyk-single-dc > values-single-dc.yaml --devel
```

*If you use the Bitnami chart for Redis installation, the DNS name of your Redis as set by Bitnami is `tyk-redis-master.tyk.svc.cluster.local:6379`.
*If you use the Bitnami chart for Redis installation, the DNS name of your Redis as set by Bitnami is `tyk-redis-master.tyk.svc.cluster.local:6379`.

You can update them in your local `values-single-dc.yaml` file under `global.redis.addr` and `global.redis.pass`.
You can update them in your local `values-single-dc.yaml` file under `global.redis.addr` and `global.redis.pass`.

Alternatively, you can use `--set` flag to set it in Tyk installation. For example `--set global.redis.pass=$REDIS_PASSWORD`

Expand Down Expand Up @@ -69,7 +69,7 @@ To get all configurable options with detailed comments:
helm show values tyk-helm/tyk-single-dc > values-single-dc.yaml --devel
```

You can update any value in your local `values.yaml` file and use `-f [filename]` flag to override default values during installation.
You can update any value in your local `values.yaml` file and use `-f [filename]` flag to override default values during installation.
Alternatively, you can use `--set` flag to set it in Tyk installation.

Note:
Expand All @@ -79,7 +79,7 @@ Note:

### Set Redis connection details (Required)

Tyk uses Redis for distributed rate-limiting and token storage. You may set `global.redis.addr` and `global.redis.pass` with redis connection
Tyk uses Redis for distributed rate-limiting and token storage. You may set `global.redis.addr` and `global.redis.pass` with redis connection
string and password respectively.

If you do not already have redis installed, you may use these charts provided by Bitnami
Expand All @@ -89,8 +89,8 @@ helm repo add bitnami https://charts.bitnami.com/bitnami
helm install tyk-redis bitnami/redis -n tyk --create-namespace --set image.tag=6.2.13
```

Follow the notes from the installation output to get connection details and password. The DNS name of your Redis as set by Bitnami is
`tyk-redis-master.tyk.svc.cluster.local:6379` (Tyk needs the name including the port)
Follow the notes from the installation output to get connection details and password. The DNS name of your Redis as set by Bitnami is
`tyk-redis-master.tyk.svc.cluster.local:6379` (Tyk needs the name including the port)

### Set Mongo or PostgresSQL connection details (Required)
If you have already installed mongo/postgresSQL, you can set the connection details in `global.mongo` and `global.postgres` section of values file respectively.
Expand All @@ -112,6 +112,35 @@ Follow the notes from the installation output to get connection details.

>NOTE: Please make sure you are installing mongo/postgres versions that are supported by Tyk. Please refer to Tyk docs to get list of supported versions.
### Enable gateway autoscaling

This chart allows for easy configuration of autoscaling parameters. To simply enable autoscaling it's enough to add `--set tyk-gateway.gateway.autoscaling.enabled=true`. That will enable `Horizontal Pod Autoscaler` resource with default parameters (avg. CPU load at 60%, scaling between 1 and 3 instances). To customize those values you can add `--set tyk-gateway.gateway.autoscaling.averageCpuUtilization=75` or use `values.yaml` file:

```yaml
tyk-gateway:
gateway:
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 30
```
Built-in rules include `tyk-gateway.gateway.autoscaling.averageCpuUtilization` for CPU utilization (set by default at 60%) and `tyk-gateway.gateway.autoscaling.averageMemoryUtilization` for memory (disabled by default). In addition to that you can define rules for custom metrics using `tyk-gateway.gateway.autoscaling.autoscalingTemplate` list:

```yaml
tyk-gateway:
gateway:
autoscaling:
autoscalingTemplate:
- type: Pods
pods:
metric:
name: nginx_ingress_controller_nginx_process_requests_total
target:
type: AverageValue
averageValue: 10000m
```

### Gateway Configurations

Configure below inside `tyk-gateway` section.
Expand All @@ -137,15 +166,15 @@ To enable Pump, set `global.components.pump` to true, and configure below inside
<!-- BEGIN import from pump doc -->

| Pump | Configuration |
|---------------------------|------------------------------------------------------------------------------------------------------------|
|---------------------------|------------------------------------------------------------------------------------------------------------|
| Prometheus Pump (Default) | Add `prometheus` to `pump.backend`, and add connection details for prometheus under `pump.prometheusPump`. |
| Mongo Pump | Add `mongo` to `pump.backend`, and add connection details for mongo under `.mongo`. |
| SQL Pump | Add `postgres` to `pump.backend`, and add connection details for postgres under `.postgres`. |
| Uptime Pump | Set `pump.uptimePumpBackend` to `'mongo'` or `'postgres'` or `''` |
| Other Pumps | Add the required environment variables in `pump.extraEnvs` |

#### Prometheus Pump
Add `prometheus` to `pump.backend`, and add connection details for prometheus under `pump.prometheusPump`.
Add `prometheus` to `pump.backend`, and add connection details for prometheus under `pump.prometheusPump`.

We also support monitoring using Prometheus Operator. All you have to do is set `pump.prometheusPump.prometheusOperator.enabled` to true.
This will create a PodMonitor resource for your Pump instance.
Expand All @@ -166,7 +195,7 @@ NOTE: [Here is](https://tyk.io/docs/planning-for-production/database-settings/)
*Important Note regarding MongoDB:* This helm chart enables the PodDisruptionBudget for MongoDB with an arbiter replica-count of 1. If you intend to perform system maintenance on the node where the MongoDB pod is running and this maintenance requires for the node to be drained, this action will be prevented due the replica count being 1. Increase the replica count in the helm chart deployment to a minimum of 2 to remedy this issue.

```yaml
# Set mongo connection details if you want to configure mongo pump.
# Set mongo connection details if you want to configure mongo pump.
mongo:
# The mongoURL value will allow you to set your MongoDB address.
# Default value: mongodb://mongo.{{ .Release.Namespace }}.svc.cluster.local:27017/tyk_analytics
Expand Down

0 comments on commit 1f31f31

Please sign in to comment.