diff --git a/tyk-mdcb-data-plane/README.md b/tyk-mdcb-data-plane/README.md index b7bb5fce..c1238b0f 100644 --- a/tyk-mdcb-data-plane/README.md +++ b/tyk-mdcb-data-plane/README.md @@ -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. @@ -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) @@ -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 | @@ -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. @@ -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 @@ -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. @@ -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. diff --git a/tyk-oss/README.md b/tyk-oss/README.md index 832b896a..4f6cbd2e 100644 --- a/tyk-oss/README.md +++ b/tyk-oss/README.md @@ -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) @@ -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 | @@ -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 @@ -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 @@ -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 @@ -267,7 +295,7 @@ 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`. | @@ -275,7 +303,7 @@ To enable Pump, set `global.components.pump` to true, and configure below inside | 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. @@ -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 @@ -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` \ No newline at end of file +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` diff --git a/tyk-single-dc/README.md b/tyk-single-dc/README.md index be23638a..f677ef0d 100644 --- a/tyk-single-dc/README.md +++ b/tyk-single-dc/README.md @@ -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. @@ -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` @@ -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: @@ -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 @@ -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. @@ -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. @@ -137,7 +166,7 @@ To enable Pump, set `global.components.pump` to true, and configure below inside | 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`. | @@ -145,7 +174,7 @@ To enable Pump, set `global.components.pump` to true, and configure below inside | 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. @@ -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