Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX-1307, TT-11578] Set chart versions for bitnami database charts #4439

Merged
merged 9 commits into from
Apr 30, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ At the end of this quickstart Tyk Dashboard should be accessible through service
First, you need to provide Tyk license, admin email and password, and API keys. We recommend to store them in secrets.
```bash
NAMESPACE=tyk
REDIS_BITNAMI_CHART_VERSION=19.0.2
MONGO_BITNAMI_CHART_VERSION=15.1.2

API_SECRET=changeit
ADMIN_KEY=changeit
Expand All @@ -58,21 +60,39 @@ kubectl create secret generic admin-secrets -n $NAMESPACE \
If you do not already have Redis installed, you may use these charts provided by Bitnami.

```bash
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --install
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --install --version $REDIS_BITNAMI_CHART_VERSION
```
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:6379` (Tyk needs the name including the port)

The Bitnami chart also creates a secret `tyk-redis` which stores the connection password in `redis-password`. We will make use of this secret in installation later.

{{< note success >}}
**Note**

Please make sure you are installing Redis versions that are supported by Tyk. Please refer to Tyk docs to get list of [supported versions]({{< ref "planning-for-production/redis" >}}).
{{< /note >}}

**3. Install MongoDB (if you don't have a MongoDB instance)**

If you do not already have MongoDB installed, you may use these charts provided by Bitnami.

```bash
helm upgrade tyk-mongo oci://registry-1.docker.io/bitnamicharts/mongodb -n $NAMESPACE --install
helm upgrade tyk-mongo oci://registry-1.docker.io/bitnamicharts/mongodb -n $NAMESPACE --install --version $MONGO_BITNAMI_CHART_VERSION
```

{{< note success >}}
**Note**

Please make sure you are installing MongoDB versions that are supported by Tyk. Please refer to Tyk docs to get list of [supported versions]({{< ref "tyk-dashboard/database-options" >}}).
{{< /note >}}

{{< note >}}
**Note**

Bitnami MongoDB image is not supported on darwin/arm64 architecture.
{{< /note >}}

We require the MongoDB connection string for Tyk installation. You can store it in a secret and provide the secret in installation later.

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ First, you need to provide Tyk license, admin email and password, and API keys.

```bash
NAMESPACE=tyk
REDIS_BITNAMI_CHART_VERSION=19.0.2
POSTGRES_BITNAMI_CHART_VERSION=14.2.4

API_SECRET=changeit
ADMIN_KEY=changeit
Expand All @@ -53,7 +55,7 @@ kubectl create secret generic admin-secrets -n $NAMESPACE \
If you do not already have Redis installed, you may use these charts provided by Bitnami.

```bash
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --install
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --install --version $REDIS_BITNAMI_CHART_VERSION
```
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:6379` (Tyk needs the name including the port)

Expand All @@ -64,7 +66,7 @@ The Bitnami chart also creates a secret `tyk-redis` which stores the connection
If you do not already have PostgreSQL installed, you may use these charts provided by Bitnami.

```bash
helm upgrade tyk-postgres oci://registry-1.docker.io/bitnamicharts/postgresql --set "auth.database=tyk_analytics" -n $NAMESPACE --install
helm upgrade tyk-postgres oci://registry-1.docker.io/bitnamicharts/postgresql --set "auth.database=tyk_analytics" -n $NAMESPACE --install --version $POSTGRES_BITNAMI_CHART_VERSION
```

Follow the notes from the installation output to get connection details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ For Redis you can use these rather excellent charts provided by [Bitnami](https:
Copy the following commands to add it:

```bash
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install --version 19.0.2
```

{{< note success >}}
Expand Down Expand Up @@ -210,14 +210,20 @@ If not, you can use these rather excellent charts provided by Bitnami to install
**Mongo Installation**

```bash
helm install tyk-mongo bitnami/mongodb --version {HELM_CHART_VERSION} --set "replicaSet.enabled=true" -n tyk
helm install tyk-mongo bitnami/mongodb --set "replicaSet.enabled=true" -n tyk --version 15.1.2
```

Then follow notes from the installation output to get connection details and update them in `values.yaml` file.

{{< note success >}}
**Note**

Bitnami MongoDB image is not supported on darwin/arm64 architecture.
{{< /note >}}

{{< note success >}}
**Note**

Please make sure you are installing MongoDB versions that are supported by Tyk. Please refer to Tyk docs to get list of [supported versions]({{< ref "tyk-dashboard/database-options" >}}).
{{< /note >}}

Expand Down Expand Up @@ -255,7 +261,7 @@ global:

**PostgreSQL Installation**
```bash
helm install tyk-postgres bitnami/postgresql --set "auth.database=tyk_analytics" -n tyk
helm install tyk-postgres bitnami/postgresql --set "auth.database=tyk_analytics" -n tyk --version 14.2.4
```

Follow the notes from the installation output to get connection details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ For Redis you can use these rather excellent charts provided by [Bitnami](https:
Copy the following commands to add it:

```bash
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install --version 19.0.2
```

{{< note success >}}
Expand Down
24 changes: 21 additions & 3 deletions tyk-docs/content/product-stack/tyk-charts/tyk-oss-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ For Redis you can use these rather excellent charts provided by [Bitnami](https:
Copy the following commands to add it:

```bash
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install --version 19.0.2
```

{{< note success >}}
Expand Down Expand Up @@ -377,9 +377,21 @@ If you are using the MongoDB pumps in the tyk-oss installation you will require
To install MongoDB you can use these rather excellent charts provided by Bitnami:

```bash
helm install tyk-mongo bitnami/mongodb --version {HELM_CHART_VERSION} --set "replicaSet.enabled=true" -n tyk
helm install tyk-mongo bitnami/mongodb --set "replicaSet.enabled=true" -n tyk --version 15.1.2
```

{{< note success >}}
**Note**

Bitnami MongoDB image is not supported on darwin/arm64 architecture.
{{< /note >}}

{{< note success >}}
**Note**

Please make sure you are installing MongoDB versions that are supported by Tyk. Please refer to Tyk docs to get list of [supported versions]({{< ref "tyk-dashboard/database-options" >}}).
{{< /note >}}

Follow notes from the installation output to get connection details and update them in the `values.yaml` file.

NOTE: Please make sure you are installing a mongo helm chart that matches a supported [version](https://tyk.io/docs/planning-for-production/database-settings/).
Expand Down Expand Up @@ -416,9 +428,15 @@ If you are using the SQL Pumps in the tyk-oss installation you will require Post
To install PostgreSQL you can use these rather excellent charts provided by Bitnami:

```bash
helm install tyk-postgres bitnami/postgresql --set "auth.database=tyk_analytics" -n tyk
helm install tyk-postgres bitnami/postgresql --set "auth.database=tyk_analytics" -n tyk --version 14.2.4
```

{{< note success >}}
**Note**

Please make sure you are installing PostgreSQL versions that are supported by Tyk. Please refer to Tyk docs to get list of [supported versions]({{< ref "tyk-dashboard/database-options" >}}).
{{< /note >}}

Follow the notes from the installation output to get connection details and update them in `values.yaml` file.

Add the following configuration under the `global` section in `values.yaml`:
Expand Down
12 changes: 9 additions & 3 deletions tyk-docs/content/product-stack/tyk-charts/tyk-stack-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ For Redis you can use these rather excellent charts provided by [Bitnami](https:
Copy the following commands to add it:

```bash
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n tyk --create-namespace --install --version 19.0.2
```

{{< note success >}}
Expand Down Expand Up @@ -204,9 +204,15 @@ If not, you can use these rather excellent charts provided by Bitnami to install
**Mongo Installation**

```bash
helm install tyk-mongo bitnami/mongodb --version {HELM_CHART_VERSION} --set "replicaSet.enabled=true" -n tyk
helm install tyk-mongo bitnami/mongodb --set "replicaSet.enabled=true" -n tyk --version 15.1.2
```

{{< note success >}}
**Note**

Bitnami MongoDB image is not supported on darwin/arm64 architecture.
{{< /note >}}

Then follow notes from the installation output to get connection details and update them in `values.yaml` file.

{{< note success >}}
Expand Down Expand Up @@ -250,7 +256,7 @@ global:

**PostgresSQL Installation**
```bash
helm install tyk-postgres bitnami/postgresql --set "auth.database=tyk_analytics" -n tyk
helm install tyk-postgres bitnami/postgresql --set "auth.database=tyk_analytics" -n tyk --version 14.2.4
```

Follow the notes from the installation output to get connection details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ To install or upgrade [Tyk Gateway OSS using Helm](https://github.com/TykTechnol
```bash
NAMESPACE=tyk
APISecret=foo
TykVersion=v5.2.0
TykVersion=v5.3.0
REDIS_BITNAMI_CHART_VERSION=19.0.2

helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --set image.tag=6.2.13 --create-namespace --install
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --version $REDIS_BITNAMI_CHART_VERSION
helm upgrade tyk-otel tyk-helm/tyk-oss -n $NAMESPACE --create-namespace \
--install \
--set global.secrets.APISecret="$APISecret" \
Expand All @@ -69,6 +70,13 @@ helm upgrade tyk-otel tyk-helm/tyk-oss -n $NAMESPACE --create-namespace \
--set tyk-gateway.gateway.opentelemetry.endpoint="jaeger-all-in-one-collector.observability.svc:4317"
```

{{< note success >}}
**Note**

Please make sure you are installing Redis versions that are supported by Tyk. Please refer to Tyk docs to get list of [supported versions]({{< ref "planning-for-production/redis" >}}).
{{< /note >}}


Tyk Gateway is now accessible through service gateway-svc-tyk-oss-tyk-gateway at port 8080 and exports the OpenTelemetry traces to the `jaeger-all-in-one-collector` service.

## Step 3: Deploy Tyk Operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ Also you can customise Prometheus Custom Metrics based on your analytics needs.
```bash
NAMESPACE=tyk-oss
APISecret=foo
REDIS_BITNAMI_CHART_VERSION=19.0.2
PromOperator_Release=prometheus-stack
Prometheus_Custom_Metrics='[{"name":"tyk_http_requests_total"\,"description":"Total of API requests"\,"metric_type":"counter"\,"labels":["response_code"\,"api_name"\,"method"\,"api_key"\,"alias"\,"path"]}\, { "name":"tyk_http_latency"\, "description":"Latency of API requests"\, "metric_type":"histogram"\, "labels":["type"\,"response_code"\,"api_name"\,"method"\,"api_key"\,"alias"\,"path"] }]'

helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --set image.tag=6.2.13
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --version $REDIS_BITNAMI_CHART_VERSION

helm upgrade tyk-oss tyk-helm/tyk-oss -n $NAMESPACE --create-namespace \
--install \
Expand All @@ -59,6 +60,12 @@ helm upgrade tyk-oss tyk-helm/tyk-oss -n $NAMESPACE --create-namespace \
{{< note success >}}
**Note**

Please make sure you are installing Redis versions that are supported by Tyk. Please refer to Tyk docs to get list of [supported versions]({{< ref "planning-for-production/redis" >}}).
{{< /note >}}

{{< note success >}}
**Note**

For Custom Metrics, commas are escaped to be used in helm --set command. You can remove the backslashes in front of the commas if you are to set it in values.yaml. We have included an example in the default values.yaml comments section.
{{< /note >}}

Expand Down Expand Up @@ -112,10 +119,11 @@ helm install prometheus prometheus-community/prometheus -n monitoring --create-n
```bash
NAMESPACE=tyk-oss
APISecret=foo
REDIS_BITNAMI_CHART_VERSION=19.0.2
PromOperator_Release=prometheus-stack
Prometheus_Custom_Metrics='[{"name":"tyk_http_requests_total"\,"description":"Total of API requests"\,"metric_type":"counter"\,"labels":["response_code"\,"api_name"\,"method"\,"api_key"\,"alias"\,"path"]}\, { "name":"tyk_http_latency"\, "description":"Latency of API requests"\, "metric_type":"histogram"\, "labels":["type"\,"response_code"\,"api_name"\,"method"\,"api_key"\,"alias"\,"path"] }]'

helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --set image.tag=6.2.13
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --version $REDIS_BITNAMI_CHART_VERSION

helm upgrade tyk-oss tyk-helm/tyk-oss -n $NAMESPACE --create-namespace \
--install \
Expand All @@ -131,6 +139,12 @@ helm upgrade tyk-oss tyk-helm/tyk-oss -n $NAMESPACE --create-namespace \
--set-string tyk-pump.pump.podAnnotations."prometheus\.io/path"=/metrics
```

{{< note success >}}
**Note**

Please make sure you are installing Redis versions that are supported by Tyk. Please refer to Tyk docs to get list of [supported versions]({{< ref "planning-for-production/redis" >}}).
{{< /note >}}

### 3. Verification

After some time, you can see that Prometheus is successfully scraping from Tyk Pump:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,15 @@ You can connect the gateway to any Redis instance already deployed (as DBaaS or
In case you don't have a Redis instance yet, here's how to deploy Redis in Kubernetes using Bitnami Helm charts.

```bash
helm install tyk-redis bitnami/redis -n tyk --set image.tag=6.2.13
helm install tyk-redis bitnami/redis -n tyk --version 19.0.2
```

{{< note success >}}
**Note**

Please make sure you are installing Redis versions that are supported by Tyk. Please refer to Tyk docs to get list of [supported versions]({{< ref "planning-for-production/redis" >}}).
{{< /note >}}

Follow the notes from the installation output to get connection details and password.

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,12 @@ MDCB_GroupId=your-group-id
```bash
NAMESPACE=tyk
APISecret=foo
REDIS_BITNAMI_CHART_VERSION=19.0.2

helm repo add tyk-helm https://helm.tyk.io/public/helm/charts/
helm repo update

helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --create-namespace --install --version $REDIS_BITNAMI_CHART_VERSION

helm upgrade hybrid-dp tyk-helm/tyk-data-plane -n $NAMESPACE --create-namespace \
--install \
Expand Down
3 changes: 2 additions & 1 deletion tyk-docs/content/tyk-oss/ce-helm-chart-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ At the end of this quickstart Tyk Gateway should be accessible through service `
```bash
NAMESPACE=tyk-oss
APISecret=foo
REDIS_BITNAMI_CHART_VERSION=19.0.2

helm repo add tyk-helm https://helm.tyk.io/public/helm/charts/
helm repo update

helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --install
helm upgrade tyk-redis oci://registry-1.docker.io/bitnamicharts/redis -n $NAMESPACE --install --version $REDIS_BITNAMI_CHART_VERSION

helm upgrade tyk-oss tyk-helm/tyk-oss -n $NAMESPACE --create-namespace \
--install \
Expand Down
8 changes: 7 additions & 1 deletion tyk-docs/content/tyk-oss/ce-helm-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,15 @@ Copy the following commands to add it:

```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install tyk-redis bitnami/redis -n tyk --set image.tag=6.2.13
helm install tyk-redis bitnami/redis -n tyk --version 19.0.2
```

{{< note success >}}
**Note**

Please make sure you are installing Redis versions that are supported by Tyk. Please refer to Tyk docs to get list of [supported versions]({{< ref "planning-for-production/redis" >}}).
{{< /note >}}

Follow the notes from the installation output to get connection details and password.

```
Expand Down
Loading
Loading