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

[TT-9769] Rename charts #104

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 35 additions & 37 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
env:
TIMEOUT: 15m
TYK_OSS_NS: tyk-oss
TYK_MDCB_DATAPLANE_NS: tyk-mdcb-dataplane
TYK_SINGLE_DC_NS: tyk-single-dc
TYK_DATAPLANE_NS: tyk-dataplane
TYK_STACK_NS: tyk-stack

jobs:
lint-test:
Expand All @@ -36,8 +36,6 @@ jobs:

integration-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -82,67 +80,67 @@ jobs:
helm uninstall redis -n ${{ env.TYK_OSS_NS }} --timeout ${{ env.TIMEOUT }}
kubectl delete namespace ${{ env.TYK_OSS_NS }}

# Tyk Single Data Center tests
- name: Deploy Tyk Single Data Center and dependencies
# Tyk Stack tests
- name: Deploy Tyk Stack and dependencies
run: |
kubectl create namespace ${{ env.TYK_SINGLE_DC_NS }}
kubectl create namespace ${{ env.TYK_STACK_NS }}

# Do not change the name
# Install redis
helm install redis simple-redis --wait --repo 'https://helm.tyk.io/public/helm/charts/' -n ${{ env.TYK_SINGLE_DC_NS }} --timeout ${{ env.TIMEOUT }}
helm install redis simple-redis --wait --repo 'https://helm.tyk.io/public/helm/charts/' -n ${{ env.TYK_STACK_NS }} --timeout ${{ env.TIMEOUT }}

# Install mongo
helm install mongo simple-mongodb --wait --repo 'https://helm.tyk.io/public/helm/charts/' -n ${{ env.TYK_SINGLE_DC_NS }} --timeout ${{ env.TIMEOUT }}
helm install mongo simple-mongodb --wait --repo 'https://helm.tyk.io/public/helm/charts/' -n ${{ env.TYK_STACK_NS }} --timeout ${{ env.TIMEOUT }}

helm dependency update ./tyk-single-dc
helm dependency update ./tyk-stack

helm install --namespace tyk-single-dc tyk-single-dc ./tyk-single-dc \
--set "global.mongo.mongoURL=mongodb://mongo.tyk-single-dc.svc.cluster.local:27017/tyk_analytics" \
--set "global.redis.addrs[0]=redis.tyk-single-dc.svc.cluster.local:6379" \
helm install --namespace tyk-stack tyk-stack ./tyk-stack \
--set "global.mongo.mongoURL=mongodb://mongo.tyk-stack.svc.cluster.local:27017/tyk_analytics" \
--set "global.redis.addrs[0]=redis.tyk-stack.svc.cluster.local:6379" \
--set "global.license.dashboard=${{ secrets.DASH_LICENSE }}" \
--timeout=${{ env.TIMEOUT }}

- name: Run integration tests for Tyk Single DC
run: helm test -n ${{ env.TYK_SINGLE_DC_NS }} tyk-single-dc
run: helm test -n ${{ env.TYK_STACK_NS }} tyk-stack

- if: failure()
name: Check logs in case of failure
run: kubectl logs -n ${{ env.TYK_SINGLE_DC_NS }} tyk-single-dc-test-tyk-single-dc
run: kubectl logs -n ${{ env.TYK_STACK_NS }} tyk-stack-test-tyk-stack

- name: Uninstall Tyk Single DC Dependencies
run: |
helm uninstall redis -n ${{ env.TYK_SINGLE_DC_NS }} --timeout ${{ env.TIMEOUT }}
helm uninstall mongo -n ${{ env.TYK_SINGLE_DC_NS }} --timeout ${{ env.TIMEOUT }}
helm uninstall tyk-single-dc -n ${{ env.TYK_SINGLE_DC_NS }} --timeout ${{ env.TIMEOUT }}
kubectl delete namespace ${{ env.TYK_SINGLE_DC_NS }}
helm uninstall redis -n ${{ env.TYK_STACK_NS }} --timeout ${{ env.TIMEOUT }}
helm uninstall mongo -n ${{ env.TYK_STACK_NS }} --timeout ${{ env.TIMEOUT }}
helm uninstall tyk-stack -n ${{ env.TYK_STACK_NS }} --timeout ${{ env.TIMEOUT }}
kubectl delete namespace ${{ env.TYK_STACK_NS }}

# Tyk MDCB Data Plane tests
- name: Deploy Tyk MDCB Data Plane and Dependencies
# Tyk Data Plane tests
- name: Deploy Tyk Data Plane and Dependencies
run: |
kubectl create namespace ${{ env.TYK_MDCB_DATAPLANE_NS }}
kubectl create namespace ${{ env.TYK_DATAPLANE_NS }}

# Do not change the name
helm install redis simple-redis --wait --repo 'https://helm.tyk.io/public/helm/charts/' -n ${{ env.TYK_MDCB_DATAPLANE_NS }} --timeout ${{ env.TIMEOUT }}
helm install redis simple-redis --wait --repo 'https://helm.tyk.io/public/helm/charts/' -n ${{ env.TYK_DATAPLANE_NS }} --timeout ${{ env.TIMEOUT }}

helm dependency update ./tyk-mdcb-data-plane
helm dependency update ./tyk-data-plane

helm install --namespace ${{ env.TYK_MDCB_DATAPLANE_NS }} tyk-mdcb-data-plane ./tyk-mdcb-data-plane --wait \
helm install --namespace ${{ env.TYK_DATAPLANE_NS }} tyk-data-plane ./tyk-data-plane --wait \
--set global.remoteControlPlane.orgId=${{ secrets.HYBRID_RPC_KEY }} \
--set global.remoteControlPlane.userApiKey=${{ secrets.HYBRID_API_KEY }} \
--set global.remoteControlPlane.connectionString=${{ secrets.HYBRID_MDCB_HOST }}

- name: Run integration tests for Tyk MDCB Data Plane
run: helm test -n ${{ env.TYK_MDCB_DATAPLANE_NS }} tyk-mdcb-data-plane
run: helm test -n ${{ env.TYK_DATAPLANE_NS }} tyk-data-plane

- if: failure()
name: Check logs in case of failure
run: kubectl logs -n ${{ env.TYK_MDCB_DATAPLANE_NS }} tyk-mdcb-data-plane-test-tyk-data-plane
run: kubectl logs -n ${{ env.TYK_DATAPLANE_NS }} tyk-data-plane-test-tyk-data-plane

- name: Uninstall Tyk MDCB Data Plane Dependencies
run: |
helm uninstall tyk-mdcb-data-plane -n ${{ env.TYK_MDCB_DATAPLANE_NS }}
helm uninstall redis -n ${{ env.TYK_MDCB_DATAPLANE_NS }} --timeout ${{ env.TIMEOUT }}
kubectl delete namespace ${{ env.TYK_MDCB_DATAPLANE_NS }}
helm uninstall tyk-data-plane -n ${{ env.TYK_DATAPLANE_NS }}
helm uninstall redis -n ${{ env.TYK_DATAPLANE_NS }} --timeout ${{ env.TIMEOUT }}
kubectl delete namespace ${{ env.TYK_DATAPLANE_NS }}

smoke-tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -185,23 +183,23 @@ jobs:

- name: Deploy Tyk MDCB Data Plane
run: |
kubectl create namespace ${{ env.TYK_MDCB_DATAPLANE_NS }}
kubectl create namespace ${{ env.TYK_DATAPLANE_NS }}

# Do not change the name
helm install redis simple-redis --wait --repo 'https://helm.tyk.io/public/helm/charts/' -n ${{ env.TYK_MDCB_DATAPLANE_NS }} --timeout ${{ env.TIMEOUT }}
helm install redis simple-redis --wait --repo 'https://helm.tyk.io/public/helm/charts/' -n ${{ env.TYK_DATAPLANE_NS }} --timeout ${{ env.TIMEOUT }}

helm dependency update ./tyk-mdcb-data-plane
helm dependency update ./tyk-data-plane

helm install --namespace ${{ env.TYK_MDCB_DATAPLANE_NS }} tyk-mdcb-data-plane ./tyk-mdcb-data-plane --wait \
helm install --namespace ${{ env.TYK_DATAPLANE_NS }} tyk-data-plane ./tyk-data-plane --wait \
--set global.remoteControlPlane.orgId=${{ secrets.HYBRID_RPC_KEY }} \
--set global.remoteControlPlane.userApiKey=${{ secrets.HYBRID_API_KEY }} \
--set global.remoteControlPlane.connectionString=${{ secrets.HYBRID_MDCB_HOST }}

- name: Upgrade Tyk MDCB Data Plane
run: |
helm upgrade -n ${{ env.TYK_MDCB_DATAPLANE_NS }} tyk-mdcb-data-plane ./tyk-mdcb-data-plane --set tyk-gateway.gateway.kind=DaemonSet
helm upgrade -n ${{ env.TYK_DATAPLANE_NS }} tyk-data-plane ./tyk-data-plane --set tyk-gateway.gateway.kind=DaemonSet

- name: Uninstall Tyk MDCB Data Plane
run: |
helm uninstall tyk-mdcb-data-plane -n ${{ env.TYK_MDCB_DATAPLANE_NS }} --timeout ${{ env.TIMEOUT }}
kubectl delete namespace ${{ env.TYK_MDCB_DATAPLANE_NS }}
helm uninstall tyk-data-plane -n ${{ env.TYK_DATAPLANE_NS }} --timeout ${{ env.TIMEOUT }}
kubectl delete namespace ${{ env.TYK_DATAPLANE_NS }}
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ tyk-oss/Chart.lock

/.idea

tyk-mdcb-data-plane/charts/*
tyk-mdcb-data-plane/Chart.lock
tyk-data-plane/charts/*
tyk-data-plane/Chart.lock

tyk-single-dc/charts/*
tyk-single-dc/Chart.lock
tyk-stack/charts/*
tyk-stack/Chart.lock

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Helm umbrella chart (chart of charts) is an easy and really flexible way of inst
| Umbrella Charts | Description | Status |
|-----------------|-------------|--------|
| [tyk-oss](./tyk-oss) | Tyk Open Source | Stable |
| [tyk-single-dc](./tyk-single-dc) | Tyk Self Managed (Single DC) | Beta |
| [tyk-stack](./tyk-stack) | Tyk Self Managed (Single DC) | Beta |
| tyk-mdcb-control-plane | Tyk Self Managed (MDCB) Control Plane | Coming Soon |
| [tyk-mdcb-data-plane](./tyk-mdcb-data-plane) | Tyk Self Managed (MDCB) Data Plane <br> Tyk Hybrid Data Plane | Stable |
| [tyk-data-plane](./tyk-data-plane) | Tyk Self Managed (MDCB) Data Plane <br> Tyk Hybrid Data Plane | Stable |

## Component Charts
* [tyk-gateway](./components/tyk-gateway)
Expand Down
2 changes: 1 addition & 1 deletion components/tyk-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Dashboard also provides the [API Developer Portal](https://tyk.io/docs/tyk-d
This chart defines a standalone Tyk Dashboard component on a [Kubernetes](https://kubernetes.io/) cluster using the [Helm](https://helm.sh/) package manager.

For typical usage, we recommend using following umbrella charts:
* For single data centre deployment, please use [tyk-single-dc](https://github.com/TykTechnologies/tyk-charts/tree/main/tyk-single-dc)
* For single data centre deployment, please use [tyk-stack](https://github.com/TykTechnologies/tyk-charts/tree/main/tyk-stack)
* For multi data centre deployment, please use tyk-mdcb-control-plane (Coming soon!)

[Learn more about Tyk Licensing and Deployment models](https://tyk.io/docs/tyk-on-premises/licensing/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ spec:
# this needs to be setup from values
value: {{ include "tyk-dashboard.gateway_host" .}}
- name: TYK_DB_TYKAPI_PORT
value: "{{ .Values.global.servicePorts.dashboard }}"
value: "{{ .Values.global.servicePorts.gateway }}"
- name: TYK_DB_TYKAPI_SECRET
valueFrom:
secretKeyRef:
Expand Down
2 changes: 1 addition & 1 deletion components/tyk-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This chart defines a standalone open source Tyk Gateway component on a [Kubernet

For typical usage, we recommend using following umbrella charts:
* For Tyk Open Source, please use [tyk-oss](https://github.com/TykTechnologies/tyk-charts/tree/main/tyk-oss)
* For Tyk Hybrid Gateway with Tyk Cloud or MDCB Remote Gateway, please use [tyk-mdcb-data-plane](https://github.com/TykTechnologies/tyk-charts/tree/main/tyk-mdcb-data-plane)
* For Tyk Hybrid Gateway with Tyk Cloud or MDCB Remote Gateway, please use [tyk-data-plane](https://github.com/TykTechnologies/tyk-charts/tree/main/tyk-data-plane)
* Coming soon: For Tyk Self-Managed, please use [tyk-self-managed](https://github.com/TykTechnologies/tyk-charts/tree/main/)

[Learn more about different deployment options](https://tyk.io/docs/apim/)
Expand Down
2 changes: 1 addition & 1 deletion components/tyk-pump/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This chart deploys the open source Tyk pump on a [Kubernetes](https://kubernetes

For typical usage, we recommend using following umbrella charts:
* For Tyk Open Source, please use [tyk-oss](https://github.com/TykTechnologies/tyk-charts/tree/main/tyk-oss)
* For Tyk Hybrid Gateway with Tyk Cloud or MDCB Remote Gateway, please use [tyk-mdcb-data-plane](https://github.com/TykTechnologies/tyk-charts/tree/main/tyk-mdcb-data-plane)
* For Tyk Hybrid Gateway with Tyk Cloud or MDCB Remote Gateway, please use [tyk-data-plane](https://github.com/TykTechnologies/tyk-charts/tree/main/tyk-data-plane)
* Coming soon: For Tyk Self-Managed, please use [tyk-self-managed](https://github.com/TykTechnologies/tyk-charts/tree/main/)

[Learn more about different deployment options](https://tyk.io/docs/apim/)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: tyk-mdcb-data-plane
name: tyk-data-plane
description: A Helm chart for deploy a Tyk Multi Data Center Bridge composed on Kubernetes

# A chart can be either an 'application' or a 'library' chart.
Expand Down
16 changes: 8 additions & 8 deletions tyk-mdcb-data-plane/README.md → tyk-data-plane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> [!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.
`tyk-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.

It includes the Tyk Gateway, an open source Enterprise API Gateway, supporting REST, GraphQL, TCP and gRPC protocols; and Tyk Pump, an analytics purger that moves the data generated by your Tyk gateways to any back-end. Furthermore, it has all the required modifications to easily connect to Tyk Cloud or Multi Data Center (MDCB) control plane.

Expand All @@ -29,7 +29,7 @@ Also, you can set the version of each component through `image.tag`. You could f

## Quick Start

Quick start using `tyk-mdcb-data-plane` and Bitnami Redis chart
Quick start using `tyk-data-plane` and Bitnami Redis chart

```bash
NAMESPACE=tyk
Expand All @@ -41,7 +41,7 @@ MDCB_GroupId=dc-uk-south

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

helm upgrade hybrid-dp tyk-helm/tyk-mdcb-data-plane -n $NAMESPACE --create-namespace \
helm upgrade hybrid-dp tyk-helm/tyk-data-plane -n $NAMESPACE --create-namespace \
--install \
--set global.remoteControlPlane.enabled=true \
--set global.remoteControlPlane.userApiKey=$MDCB_UserKey \
Expand Down Expand Up @@ -75,13 +75,13 @@ To install the chart from the Helm repository in namespace `tyk` with the releas
```bash
helm repo add tyk-helm https://helm.tyk.io/public/helm/charts/
helm repo update
helm show values tyk-helm/tyk-mdcb-data-plane > values-data-plane.yaml
helm show values tyk-helm/tyk-data-plane > values-data-plane.yaml
```

See [Configuration](#configuration) section for the available config options and modify your local `values-data-plane.yaml` file accordingly. Then install the chart:

```bash
helm install tyk-data-plane tyk-helm/tyk-mdcb-data-plane -n tyk --create-namespace -f values-data-plane.yaml
helm install tyk-data-plane tyk-helm/tyk-data-plane -n tyk --create-namespace -f values-data-plane.yaml
```

## Uninstalling the Chart
Expand All @@ -95,19 +95,19 @@ This removes all the Kubernetes components associated with the chart and deletes
## Upgrading Chart

```bash
helm upgrade tyk-data-plane tyk-helm/tyk-mdcb-data-plane -n tyk
helm upgrade tyk-data-plane tyk-helm/tyk-data-plane -n tyk
```

*Note: tyk-hybrid chart users*

If you were using `tyk-hybrid` chart for existing release, you cannot upgrade directly. Please modify the `values.yaml` base on your requirements and install using the new `tyk-mdcb-data-plane` chart.
If you were using `tyk-hybrid` chart for existing release, you cannot upgrade directly. Please modify the `values.yaml` base on your requirements and install using the new `tyk-data-plane` chart.

## Configuration

To get all configurable options with detailed comments:

```bash
helm show values tyk-helm/tyk-mdcb-data-plane > values.yaml
helm show values tyk-helm/tyk-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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
command:
- /bin/sh
- -c
- /tests/mdcb-data-plane-test.sh
- /tests/data-plane-test.sh
volumeMounts:
- mountPath: "/tests"
name: test-tyk-data-plane
Expand All @@ -37,5 +37,5 @@ spec:
volumes:
- name: test-tyk-data-plane
configMap:
name: test-tyk-mdcb-data-plane-map
name: test-tyk-data-plane-map
defaultMode: 0777
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: test-tyk-single-dc-map
name: test-tyk-data-plane-map
annotations:
"helm.sh/hook-delete-policy": hook-succeeded,hook-failed
"helm.sh/hook": test
data:
{{ (.Files.Glob "scripts/tests/tyk-single-dc-test.sh").AsConfig | indent 2 }}
{{ (.Files.Glob "scripts/tests/data-plane-test.sh").AsConfig | indent 2 }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default values for tyk-mdcb-data-plane.
# Default values for tyk-data-plane.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

Expand Down
9 changes: 0 additions & 9 deletions tyk-mdcb-data-plane/Chart.lock

This file was deleted.

18 changes: 0 additions & 18 deletions tyk-single-dc/Chart.lock

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion tyk-single-dc/Chart.yaml → tyk-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: tyk-single-dc
name: tyk-stack
description: A Helm chart for deploying an instance of Tyk Single Datacenter composed of Tyk Gateway, Tyk Pump and Tyk Dashboard

# A chart can be either an 'application' or a 'library' chart.
Expand Down
Loading