diff --git a/.env.example b/.env.example index a0e35085..4991fbea 100644 --- a/.env.example +++ b/.env.example @@ -1,8 +1,8 @@ -DASHBOARD_VERSION=v5.6 -GATEWAY_VERSION=v5.6 +DASHBOARD_VERSION=v5.7 +GATEWAY_VERSION=v5.7 MDCB_VERSION=v2.7 PUMP_VERSION=v1.11 -PORTAL_VERSION=v1.11 +PORTAL_VERSION=v1.12 TYK_HELM_CHART_PATH=tyk-helm TYK_USERNAME=default@example.com TYK_PASSWORD=topsecretpassword @@ -12,15 +12,15 @@ MDCB_LICENSE= PORTAL_LICENSE= OPERATOR_LICENSE= -TYK_WORKER_CONNECTIONSTRING= -TYK_WORKER_ORGID= -TYK_WORKER_AUTHTOKEN= -TYK_WORKER_GROUPID= -TYK_WORKER_USESSL=true -TYK_WORKER_SHARDING_ENABLED=false -TYK_WORKER_SHARDING_TAGS= -TYK_WORKER_GW_PORT=8081 -TYK_WORKER_OPERATOR_CONNECTIONSTRING= +TYK_DATA_PLANE_CONNECTIONSTRING= +TYK_DATA_PLANE_ORGID= +TYK_DATA_PLANE_AUTHTOKEN= +TYK_DATA_PLANE_GROUPID= +TYK_DATA_PLANE_USESSL=true +TYK_DATA_PLANE_SHARDING_ENABLED=false +TYK_DATA_PLANE_SHARDING_TAGS= +TYK_DATA_PLANE_PORT=8081 +TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING= DATADOG_APIKEY= DATADOG_APPKEY= @@ -28,13 +28,9 @@ DATADOG_SITE=datadoghq.com NEWRELIC_LICENSEKEY= NEWRELIC_CLUSTER=minikube +INGRESS_CLASSNAME=nginx + GCP_PROJECT= CLUSTER_LOCATION= CLUSTER_MACHINE_TYPE= CLUSTER_NODE_COUNT= - -INGRESS_CLASSNAME=nginx - -TYK_MDCB_SYNCWORKER_ENABLED=true -TYK_MDCB_SYNCWORKER_HASHKEYS=true -TYK_GW_SLAVEOPTIONS_SYNCHRONISERENABLED=true diff --git a/.github/workflows/aks.yml b/.github/workflows/aks.yml index 867ce470..a73db5e8 100644 --- a/.github/workflows/aks.yml +++ b/.github/workflows/aks.yml @@ -60,10 +60,10 @@ jobs: - name: Deploy tyk-dp run: | - TYK_WORKER_CONNECTIONSTRING=mdcb-svc-tyk-cp-tyk-mdcb.tyk.svc:9091 \ - TYK_WORKER_ORGID=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_ORG}" | base64 -d) \ - TYK_WORKER_AUTHTOKEN=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_AUTH}" | base64 -d) \ - TYK_WORKER_USESSL=false \ + TYK_DATA_PLANE_CONNECTIONSTRING=mdcb-svc-tyk-cp-tyk-mdcb.tyk.svc:9091 \ + TYK_DATA_PLANE_ORGID=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_ORG}" | base64 -d) \ + TYK_DATA_PLANE_AUTHTOKEN=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_AUTH}" | base64 -d) \ + TYK_DATA_PLANE_USESSL=false \ ./up.sh --namespace tyk-dp tyk-dp - name: Sleep 1 minute diff --git a/.github/workflows/eks.yml b/.github/workflows/eks.yml index 9dbd55de..6110087e 100644 --- a/.github/workflows/eks.yml +++ b/.github/workflows/eks.yml @@ -62,10 +62,10 @@ jobs: - name: Deploy tyk-dp run: | - TYK_WORKER_CONNECTIONSTRING=mdcb-svc-tyk-cp-tyk-mdcb.tyk.svc:9091 \ - TYK_WORKER_ORGID=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_ORG}" | base64 -d) \ - TYK_WORKER_AUTHTOKEN=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_AUTH}" | base64 -d) \ - TYK_WORKER_USESSL=false \ + TYK_DATA_PLANE_CONNECTIONSTRING=mdcb-svc-tyk-cp-tyk-mdcb.tyk.svc:9091 \ + TYK_DATA_PLANE_ORGID=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_ORG}" | base64 -d) \ + TYK_DATA_PLANE_AUTHTOKEN=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_AUTH}" | base64 -d) \ + TYK_DATA_PLANE_USESSL=false \ ./up.sh --namespace tyk-dp tyk-dp - name: Sleep 1 minute diff --git a/.github/workflows/gke.yml b/.github/workflows/gke.yml index b34a2611..a33dedaa 100644 --- a/.github/workflows/gke.yml +++ b/.github/workflows/gke.yml @@ -67,10 +67,10 @@ jobs: - name: Deploy tyk-dp run: | - TYK_WORKER_CONNECTIONSTRING=mdcb-svc-tyk-cp-tyk-mdcb.tyk.svc:9091 \ - TYK_WORKER_ORGID=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_ORG}" | base64 -d) \ - TYK_WORKER_AUTHTOKEN=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_AUTH}" | base64 -d) \ - TYK_WORKER_USESSL=false \ + TYK_DATA_PLANE_CONNECTIONSTRING=mdcb-svc-tyk-cp-tyk-mdcb.tyk.svc:9091 \ + TYK_DATA_PLANE_ORGID=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_ORG}" | base64 -d) \ + TYK_DATA_PLANE_AUTHTOKEN=$(kubectl get secrets -n tyk tyk-operator-conf -o=jsonpath="{.data.TYK_AUTH}" | base64 -d) \ + TYK_DATA_PLANE_USESSL=false \ ./up.sh --namespace tyk-dp tyk-dp - name: Sleep 1 minute diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 11a3b054..b595c94f 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -13,7 +13,7 @@ env: TIMEOUT: 30 jobs: - tyk-redis: + tyk-storage: runs-on: ubuntu-latest strategy: fail-fast: false @@ -44,7 +44,7 @@ jobs: - name: Copy .env file run: cp .env.example .env - - name: Deploy tyk-stack with ${{ matrix.redis }} + - name: Deploy tyk-stack with ${{ matrix.storage }} uses: nick-invision/retry@v3 with: max_attempts: ${{ env.MAX_ATTEMPTS }} diff --git a/.github/workflows/tyk-cp.yml b/.github/workflows/tyk-cp.yml index a67be7c5..f52503d4 100644 --- a/.github/workflows/tyk-cp.yml +++ b/.github/workflows/tyk-cp.yml @@ -25,6 +25,7 @@ jobs: - elasticsearch-kibana - jaeger - k6 + - kafka - keycloak - keycloak-sso - keycloak-dcr @@ -36,6 +37,8 @@ jobs: - operator-graphql - operator-httpbin - operator-jwt-hmac + - operator-kafka + - operator-kafka-avro - operator-udg - portal - prometheus diff --git a/.github/workflows/tyk-dp.yml b/.github/workflows/tyk-dp.yml index 1cb1bc0f..26d4be80 100644 --- a/.github/workflows/tyk-dp.yml +++ b/.github/workflows/tyk-dp.yml @@ -25,6 +25,7 @@ jobs: - elasticsearch-kibana - jaeger - k6 + - kafka - keycloak - keycloak-jwt - newrelic @@ -34,6 +35,8 @@ jobs: - operator-graphql - operator-httpbin - operator-jwt-hmac + - operator-kafka + - operator-kafka-avro - operator-udg - prometheus - prometheus-grafana @@ -67,10 +70,10 @@ jobs: max_attempts: ${{ env.MAX_ATTEMPTS }} timeout_minutes: ${{ env.TIMEOUT }} command: | - TYK_WORKER_CONNECTIONSTRING="${{ secrets.TYK_WORKER_CONNECTIONSTRING }}" \ - TYK_WORKER_ORGID="${{ secrets.TYK_WORKER_ORGID }}" \ - TYK_WORKER_AUTHTOKEN="${{ secrets.TYK_WORKER_AUTHTOKEN }}" \ - TYK_WORKER_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_WORKER_OPERATOR_CONNECTIONSTRING }}" \ + TYK_DATA_PLANE_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_CONNECTIONSTRING }}" \ + TYK_DATA_PLANE_ORGID="${{ secrets.TYK_DATA_PLANE_ORGID }}" \ + TYK_DATA_PLANE_AUTHTOKEN="${{ secrets.TYK_DATA_PLANE_AUTHTOKEN }}" \ + TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING }}" \ OPERATOR_LICENSE="${{ secrets.DASH_LICENSE }}" \ DATADOG_APIKEY="${{ secrets.DATADOG_APIKEY }}" \ DATADOG_APPKEY="${{ secrets.DATADOG_APPKEY }}" \ @@ -90,10 +93,10 @@ jobs: max_attempts: ${{ env.MAX_ATTEMPTS }} timeout_minutes: ${{ env.TIMEOUT }} on_retry_command: | - TYK_WORKER_CONNECTIONSTRING="${{ secrets.TYK_WORKER_CONNECTIONSTRING }}" \ - TYK_WORKER_ORGID="${{ secrets.TYK_WORKER_ORGID }}" \ - TYK_WORKER_AUTHTOKEN="${{ secrets.TYK_WORKER_AUTHTOKEN }}" \ - TYK_WORKER_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_WORKER_OPERATOR_CONNECTIONSTRING }}" \ + TYK_DATA_PLANE_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_CONNECTIONSTRING }}" \ + TYK_DATA_PLANE_ORGID="${{ secrets.TYK_DATA_PLANE_ORGID }}" \ + TYK_DATA_PLANE_AUTHTOKEN="${{ secrets.TYK_DATA_PLANE_AUTHTOKEN }}" \ + TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING }}" \ OPERATOR_LICENSE="${{ secrets.DASH_LICENSE }}" \ DATADOG_APIKEY="${{ secrets.DATADOG_APIKEY }}" \ DATADOG_APPKEY="${{ secrets.DATADOG_APPKEY }}" \ @@ -111,10 +114,10 @@ jobs: max_attempts: ${{ env.MAX_ATTEMPTS }} timeout_minutes: ${{ env.TIMEOUT }} on_retry_command: | - TYK_WORKER_CONNECTIONSTRING="${{ secrets.TYK_WORKER_CONNECTIONSTRING }}" \ - TYK_WORKER_ORGID="${{ secrets.TYK_WORKER_ORGID }}" \ - TYK_WORKER_AUTHTOKEN="${{ secrets.TYK_WORKER_AUTHTOKEN }}" \ - TYK_WORKER_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_WORKER_OPERATOR_CONNECTIONSTRING }}" \ + TYK_DATA_PLANE_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_CONNECTIONSTRING }}" \ + TYK_DATA_PLANE_ORGID="${{ secrets.TYK_DATA_PLANE_ORGID }}" \ + TYK_DATA_PLANE_AUTHTOKEN="${{ secrets.TYK_DATA_PLANE_AUTHTOKEN }}" \ + TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING }}" \ OPERATOR_LICENSE="${{ secrets.DASH_LICENSE }}" \ DATADOG_APIKEY="${{ secrets.DATADOG_APIKEY }}" \ DATADOG_APPKEY="${{ secrets.DATADOG_APPKEY }}" \ diff --git a/.github/workflows/tyk-stack.yml b/.github/workflows/tyk-stack.yml index 171a8b09..1a5cdb3b 100644 --- a/.github/workflows/tyk-stack.yml +++ b/.github/workflows/tyk-stack.yml @@ -25,6 +25,7 @@ jobs: - elasticsearch-kibana - jaeger - k6 + - kafka - keycloak - keycloak-sso - keycloak-dcr @@ -36,6 +37,8 @@ jobs: - operator-graphql - operator-httpbin - operator-jwt-hmac + - operator-kafka + - operator-kafka-avro - operator-udg - portal - prometheus diff --git a/docs/CUSTOMIZATION.md b/docs/CUSTOMIZATION.md index 6dbbda8f..06a25f3f 100644 --- a/docs/CUSTOMIZATION.md +++ b/docs/CUSTOMIZATION.md @@ -21,33 +21,33 @@ and it will give errors if something is missing. You can also add or change any Tyk environment variables in the `.env` file, and they will be mapped to the respective `extraEnvs` section in the helm charts. -| Variable | Default | Comments | -|--------------------------------------|:---------------------:|-----------------------------------------------------------------------------------------------------------------| -| DASHBOARD_VERSION | `v5.6` | Dashboard version | -| GATEWAY_VERSION | `v5.6` | Gateway version | -| MDCB_VERSION | `v2.7` | MDCB version | -| PUMP_VERSION | `v1.11` | Pump version | -| PORTAL_VERSION | `v1.11` | Portal version | -| TYK_HELM_CHART_PATH | `tyk-helm` | Path to charts, can be a local directory or a helm repo | -| TYK_USERNAME | `default@example.com` | Default password for all the services deployed | -| TYK_PASSWORD | `topsecretpassword` | Default password for all the services deployed | -| LICENSE | | Dashboard license | -| MDCB_LICENSE | | MDCB license | -| PORTAL_LICENSE | | Portal license | -| OPERATOR_LICENSE | | Portal license | -| TYK_WORKER_CONNECTIONSTRING | | MDCB URL for worker connection | -| TYK_WORKER_ORGID | | Org ID of dashboard user | -| TYK_WORKER_AUTHTOKEN | | Auth token of dashboard user | -| TYK_WORKER_USESSL | `true` | Set to `true` when the MDCB is serving on a TLS connection | -| TYK_WORKER_SHARDING_ENABLED | `false` | Set to `true` to enable API Sharding | -| TYK_WORKER_SHARDING_TAGS | | API Gateway segmentation tags | -| TYK_WORKER_GW_PORT | `8081` | Set the gateway service port to use | -| TYK_WORKER_OPERATOR_CONNECTIONSTRING | | Set the dashboard URL for the operator to be able to manage APIs and Policies | -| DATADOG_APIKEY | | Datadog API key | -| DATADOG_APPKEY | | Datadog Application key. This is used to create a dashboard and create a pipeline for the Tyk logs | -| DATADOG_SITE | `datadoghq.com` | Datadog site. Change to `datadoghq.eu` if using the European site | -| GCP_PROJECT | | The GCP project for terraform authentication on GCP | -| CLUSTER_LOCATION | | Cluster location that will be created on AKS, EKS, or GKE | -| CLUSTER_MACHINE_TYPE | | Machine type for the cluster that will be created on AKS, EKS, or GKE | -| CLUSTER_NODE_COUNT | | Number of nodes for the cluster that will be created on AKS, EKS, or GKE | -| INGRESS_CLASSNAME | `nginx` | The ingress classname to be used to associate the k8s ingress objects with the ingress controller/load balancer | +| Variable | Default | Comments | +|------------------------------------------|:---------------------:|-----------------------------------------------------------------------------------------------------------------| +| DASHBOARD_VERSION | `v5.7` | Dashboard version | +| GATEWAY_VERSION | `v5.7` | Gateway version | +| MDCB_VERSION | `v2.7` | MDCB version | +| PUMP_VERSION | `v1.11` | Pump version | +| PORTAL_VERSION | `v1.12` | Portal version | +| TYK_HELM_CHART_PATH | `tyk-helm` | Path to charts, can be a local directory or a helm repo | +| TYK_USERNAME | `default@example.com` | Default password for all the services deployed | +| TYK_PASSWORD | `topsecretpassword` | Default password for all the services deployed | +| LICENSE | | Dashboard license | +| MDCB_LICENSE | | MDCB license | +| PORTAL_LICENSE | | Portal license | +| OPERATOR_LICENSE | | Portal license | +| TYK_DATA_PLANE_CONNECTIONSTRING | | MDCB URL for worker connection | +| TYK_DATA_PLANE_ORGID | | Org ID of dashboard user | +| TYK_DATA_PLANE_AUTHTOKEN | | Auth token of dashboard user | +| TYK_DATA_PLANE_USESSL | `true` | Set to `true` when the MDCB is serving on a TLS connection | +| TYK_DATA_PLANE_SHARDING_ENABLED | `false` | Set to `true` to enable API Sharding | +| TYK_DATA_PLANE_SHARDING_TAGS | | API Gateway segmentation tags | +| TYK_DATA_PLANE_PORT | `8081` | Set the gateway service port to use | +| TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING | | Set the dashboard URL for the operator to be able to manage APIs and Policies | +| DATADOG_APIKEY | | Datadog API key | +| DATADOG_APPKEY | | Datadog Application key. This is used to create a dashboard and create a pipeline for the Tyk logs | +| DATADOG_SITE | `datadoghq.com` | Datadog site. Change to `datadoghq.eu` if using the European site | +| GCP_PROJECT | | The GCP project for terraform authentication on GCP | +| CLUSTER_LOCATION | | Cluster location that will be created on AKS, EKS, or GKE | +| CLUSTER_MACHINE_TYPE | | Machine type for the cluster that will be created on AKS, EKS, or GKE | +| CLUSTER_NODE_COUNT | | Number of nodes for the cluster that will be created on AKS, EKS, or GKE | +| INGRESS_CLASSNAME | `nginx` | The ingress classname to be used to associate the k8s ingress objects with the ingress controller/load balancer | diff --git a/docs/FEATURES_MATRIX.md b/docs/FEATURES_MATRIX.md index 20115628..124f62b1 100644 --- a/docs/FEATURES_MATRIX.md +++ b/docs/FEATURES_MATRIX.md @@ -12,6 +12,7 @@ | elasticsearch-kibana | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | [bitnami](https://charts.bitnami.com/bitnami)/kibana | 11.2.14 | | jaeger | :warning: | :white_check_mark: | :x: | :x: | [jaegertracing](https://jaegertracing.github.io/helm-charts)/jaeger-operator | 2.46.2 | | k6 | :white_check_mark: | :white_check_mark: | N/A | N/A | [grafana](https://grafana.github.io/helm-charts)/k6-operator | 3.8.0 | +| kafka | :warning: | :white_check_mark: | N/A | :x: | [bitnami](https://charts.bitnami.com/bitnami)/kafka | 30.1.8 | | k6-slo-traffic | N/A | :white_check_mark: | N/A | N/A | N/A | N/A | | keycloak | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | [keycloak-operator](https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/21.0.1/kubernetes) | 25.0.2 | | keycloak-dcr | N/A | :white_check_mark: | N/A | N/A | N/A | N/A | @@ -26,6 +27,8 @@ | operator-graphql | :white_check_mark: | :white_check_mark: | :white_check_mark: | N/A | N/A | N/A | | operator-httpbin | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry: | N/A | N/A | | operator-jwt-hmac | :white_check_mark: | :white_check_mark: | :white_check_mark: | N/A | N/A | N/A | +| operator-kafka | :warning: | :white_check_mark: | :white_check_mark: | N/A | N/A | N/A | +| operator-kafka-avro | :warning: | :white_check_mark: | :white_check_mark: | N/A | N/A | N/A | | operator-udg | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry: | N/A | N/A | | portal | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | [tyk-helm](https://helm.tyk.io/public/helm/charts)/tyk-dev-portal | 2.1.0 | | prometheus | :no_entry: | :white_check_mark: | :white_check_mark: | :no_entry: | [prometheus-community](https://prometheus-community.github.io/helm-charts)/prometheus | 25.24.1 | @@ -42,6 +45,7 @@ | elasticsearch-kibana | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | jaeger | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | k6 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| kafka | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | k6-slo-traffic | N/A | :white_check_mark: | :white_check_mark: | :white_check_mark: | | keycloak | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | keycloak-dcr | N/A | :white_check_mark: | :white_check_mark: | N/A | @@ -55,6 +59,8 @@ | operator-graphql | N/A | :white_check_mark: | :white_check_mark: | :white_check_mark: | | operator-httpbin | N/A | :white_check_mark: | :white_check_mark: | :white_check_mark: | | operator-jwt-hmac | N/A | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| operator-kafka | N/A | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| operator-kafka-avro | N/A | :white_check_mark: | :white_check_mark: | :white_check_mark: | | operator-udg | N/A | :white_check_mark: | :white_check_mark: | :white_check_mark: | | portal | N/A | :white_check_mark: | :white_check_mark: | :white_check_mark: | | prometheus | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | @@ -74,6 +80,7 @@ | elasticsearch-kibana | :white_check_mark: | :white_check_mark: | :white_check_mark: | | jaeger | :white_check_mark: | :x: | :x: | | k6 | N/A | N/A | N/A | +| kafka | :white_check_mark: | :x: | :x: | | k6-slo-traffic | N/A | N/A | N/A | | keycloak | :white_check_mark: | :no_entry: | :no_entry: | | keycloak-dcr | N/A | N/A | N/A | @@ -88,6 +95,8 @@ | operator-graphql | N/A | N/A | N/A | | operator-httpbin | :white_check_mark: | :x: | :x: | | operator-jwt-hmac | N/A | N/A | N/A | +| operator-kafka | N/A | N/A | N/A | +| operator-kafka-avro | N/A | N/A | N/A | | operator-udg | :white_check_mark: | :x: | :x: | | portal | :white_check_mark: | :white_check_mark: | :white_check_mark: | | prometheus | :white_check_mark: | :white_check_mark: | :white_check_mark: | diff --git a/docs/PORTS.md b/docs/PORTS.md index 62c138c8..e9fa1c6b 100644 --- a/docs/PORTS.md +++ b/docs/PORTS.md @@ -29,6 +29,7 @@ All the ports that this library uses. | prometheus-grafana | prometheus-grafana | `9081` | | tyk-cp | mdcb-svc-*-tyk-mdcb | `9090` | | prometheus | pump-svc-*-tyk-pump | `9091` | +| kafka | tyk-kafka | `9092` | | elasticsearch | elasticsearch | `9200` | | opensearch | opensearch | `9201` | | jaeger | tyk-jaeger | `16686` | diff --git a/src/clouds/aws/.env.example b/src/clouds/aws/.env.example index 0cbb0f8b..9315ad86 100644 --- a/src/clouds/aws/.env.example +++ b/src/clouds/aws/.env.example @@ -1,37 +1,34 @@ -DASHBOARD_VERSION=v5.6 -GATEWAY_VERSION=v5.6 +DASHBOARD_VERSION=v5.7 +GATEWAY_VERSION=v5.7 MDCB_VERSION=v2.7 PUMP_VERSION=v1.11 -PORTAL_VERSION=v1.11 +PORTAL_VERSION=v1.12 TYK_HELM_CHART_PATH=tyk-helm TYK_USERNAME=default@example.com TYK_PASSWORD=topsecretpassword +TYK_TIMEOUT=600s LICENSE= MDCB_LICENSE= PORTAL_LICENSE= OPERATOR_LICENSE= -TYK_WORKER_CONNECTIONSTRING= -TYK_WORKER_ORGID= -TYK_WORKER_AUTHTOKEN= -TYK_WORKER_USESSL=true -TYK_WORKER_SHARDING_ENABLED=false -TYK_WORKER_SHARDING_TAGS= -TYK_WORKER_GW_PORT=8081 - -TYK_MDCB_SYNCWORKER_ENABLED=true -TYK_MDCB_SYNCWORKER_HASHKEYS=true -TYK_GW_SLAVEOPTIONS_SYNCHRONISERENABLED=true - -TYK_GW_POLICIES_ALLOWEXPLICITPOLICYID=true -TYK_GW_ENABLEHASHEDKEYSLISTING=true -TYK_DB_ENABLEDELETEKEYBYHASH=true -TYK_DB_ENABLEUPDATEKEYBYHASH=true -TYK_DB_ENABLEHASHEDKEYSLISTING=true +TYK_DATA_PLANE_CONNECTIONSTRING= +TYK_DATA_PLANE_ORGID= +TYK_DATA_PLANE_AUTHTOKEN= +TYK_DATA_PLANE_GROUPID= +TYK_DATA_PLANE_USESSL=true +TYK_DATA_PLANE_SHARDING_ENABLED=false +TYK_DATA_PLANE_SHARDING_TAGS= +TYK_DATA_PLANE_PORT=8081 +TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING= DATADOG_APIKEY= DATADOG_APPKEY= DATADOG_SITE=datadoghq.com +NEWRELIC_LICENSEKEY= +NEWRELIC_CLUSTER=minikube + +INGRESS_CLASSNAME=nginx CLUSTER_LOCATION=us-west-1 CLUSTER_MACHINE_TYPE=c5.xlarge diff --git a/src/clouds/aws/main.tf b/src/clouds/aws/main.tf index ea77c8b4..6ee0bc3c 100644 --- a/src/clouds/aws/main.tf +++ b/src/clouds/aws/main.tf @@ -63,5 +63,12 @@ resource "aws_eks_addon" "this" { addon_name = "aws-ebs-csi-driver" resolve_conflicts_on_create = "OVERWRITE" service_account_role_arn = module.ebs_csi_controller_role.iam_role_arn - depends_on = [module.eks, module.eks_node_groups] + + configuration_values = jsonencode({ + defaultStorageClass = { + enabled = true + } + }) + + depends_on = [module.eks, module.eks_node_groups] } diff --git a/src/clouds/azure/.env.example b/src/clouds/azure/.env.example index 2cf1e908..07af1192 100644 --- a/src/clouds/azure/.env.example +++ b/src/clouds/azure/.env.example @@ -1,37 +1,34 @@ -DASHBOARD_VERSION=v5.6 -GATEWAY_VERSION=v5.6 +DASHBOARD_VERSION=v5.7 +GATEWAY_VERSION=v5.7 MDCB_VERSION=v2.7 PUMP_VERSION=v1.11 -PORTAL_VERSION=v1.11 +PORTAL_VERSION=v1.12 TYK_HELM_CHART_PATH=tyk-helm TYK_USERNAME=default@example.com TYK_PASSWORD=topsecretpassword +TYK_TIMEOUT=600s LICENSE= MDCB_LICENSE= PORTAL_LICENSE= OPERATOR_LICENSE= -TYK_WORKER_CONNECTIONSTRING= -TYK_WORKER_ORGID= -TYK_WORKER_AUTHTOKEN= -TYK_WORKER_USESSL=true -TYK_WORKER_SHARDING_ENABLED=false -TYK_WORKER_SHARDING_TAGS= -TYK_WORKER_GW_PORT=8081 - -TYK_MDCB_SYNCWORKER_ENABLED=true -TYK_MDCB_SYNCWORKER_HASHKEYS=true -TYK_GW_SLAVEOPTIONS_SYNCHRONISERENABLED=true - -TYK_GW_POLICIES_ALLOWEXPLICITPOLICYID=true -TYK_GW_ENABLEHASHEDKEYSLISTING=true -TYK_DB_ENABLEDELETEKEYBYHASH=true -TYK_DB_ENABLEUPDATEKEYBYHASH=true -TYK_DB_ENABLEHASHEDKEYSLISTING=true +TYK_DATA_PLANE_CONNECTIONSTRING= +TYK_DATA_PLANE_ORGID= +TYK_DATA_PLANE_AUTHTOKEN= +TYK_DATA_PLANE_GROUPID= +TYK_DATA_PLANE_USESSL=true +TYK_DATA_PLANE_SHARDING_ENABLED=false +TYK_DATA_PLANE_SHARDING_TAGS= +TYK_DATA_PLANE_PORT=8081 +TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING= DATADOG_APIKEY= DATADOG_APPKEY= DATADOG_SITE=datadoghq.com +NEWRELIC_LICENSEKEY= +NEWRELIC_CLUSTER=minikube + +INGRESS_CLASSNAME=nginx CLUSTER_LOCATION=westus CLUSTER_MACHINE_TYPE=Standard_F4s_v2 diff --git a/src/clouds/gcp/.env.example b/src/clouds/gcp/.env.example index 6064c833..a7ade88c 100644 --- a/src/clouds/gcp/.env.example +++ b/src/clouds/gcp/.env.example @@ -1,37 +1,34 @@ -DASHBOARD_VERSION=v5.6 -GATEWAY_VERSION=v5.6 +DASHBOARD_VERSION=v5.7 +GATEWAY_VERSION=v5.7 MDCB_VERSION=v2.7 PUMP_VERSION=v1.11 -PORTAL_VERSION=v1.11 +PORTAL_VERSION=v1.12 TYK_HELM_CHART_PATH=tyk-helm TYK_USERNAME=default@example.com TYK_PASSWORD=topsecretpassword +TYK_TIMEOUT=600s LICENSE= MDCB_LICENSE= PORTAL_LICENSE= OPERATOR_LICENSE= -TYK_WORKER_CONNECTIONSTRING= -TYK_WORKER_ORGID= -TYK_WORKER_AUTHTOKEN= -TYK_WORKER_USESSL=true -TYK_WORKER_SHARDING_ENABLED=false -TYK_WORKER_SHARDING_TAGS= -TYK_WORKER_GW_PORT=8081 - -TYK_MDCB_SYNCWORKER_ENABLED=true -TYK_MDCB_SYNCWORKER_HASHKEYS=true -TYK_GW_SLAVEOPTIONS_SYNCHRONISERENABLED=true - -TYK_GW_POLICIES_ALLOWEXPLICITPOLICYID=true -TYK_GW_ENABLEHASHEDKEYSLISTING=true -TYK_DB_ENABLEDELETEKEYBYHASH=true -TYK_DB_ENABLEUPDATEKEYBYHASH=true -TYK_DB_ENABLEHASHEDKEYSLISTING=true +TYK_DATA_PLANE_CONNECTIONSTRING= +TYK_DATA_PLANE_ORGID= +TYK_DATA_PLANE_AUTHTOKEN= +TYK_DATA_PLANE_GROUPID= +TYK_DATA_PLANE_USESSL=true +TYK_DATA_PLANE_SHARDING_ENABLED=false +TYK_DATA_PLANE_SHARDING_TAGS= +TYK_DATA_PLANE_PORT=8081 +TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING= DATADOG_APIKEY= DATADOG_APPKEY= DATADOG_SITE=datadoghq.com +NEWRELIC_LICENSEKEY= +NEWRELIC_CLUSTER=minikube + +INGRESS_CLASSNAME=nginx GCP_PROJECT= CLUSTER_LOCATION=us-west1-a diff --git a/src/deployments/kafka/README.md b/src/deployments/kafka/README.md new file mode 100644 index 00000000..825ff7d1 --- /dev/null +++ b/src/deployments/kafka/README.md @@ -0,0 +1,29 @@ +## Kafka +This deployment will stand up a Kafka broker. + +### Example +``` +./up.sh --deployments kafka tyk-stack +``` + +### Support +| Item | Status | +|:------------:|:------------------:| +| OpenShift | :warning: | +| CI Tests | :white_check_mark: | +| Postman Test | :x: | +| SSL | N/A | + +### Supported Service Types with `--expose` flag +| Item | Status | +|:-------------:|:------------------:| +| Port Forward | :white_check_mark: | +| Ingress | :x: | +| Load Balancer | :x: | + +| Icon | Description | +|:------------------:|:-------------------------:| +| :white_check_mark: | Supported and tested | +| :warning: | Not tested | +| :x: | Not supported | +| :no_entry: | Not supported by the tool | diff --git a/src/deployments/kafka/checks.sh b/src/deployments/kafka/checks.sh new file mode 100644 index 00000000..247c5bc1 --- /dev/null +++ b/src/deployments/kafka/checks.sh @@ -0,0 +1,4 @@ +if [[ $TYKGATEWAY == "$mode" ]]; then + logger "$ERROR" "can only run the kafka example with a tyk-stack, tyk-dp or a tyk-cp installations"; + exit 1; +fi diff --git a/src/deployments/kafka/main.safe.sh b/src/deployments/kafka/main.safe.sh new file mode 100644 index 00000000..24cea694 --- /dev/null +++ b/src/deployments/kafka/main.safe.sh @@ -0,0 +1,11 @@ +if [ -z "$kafkaRegistered" ]; then + kafkaRegistered=true; + + KAFKA_SERVICE_PORT=9092; + + kafkaReleaseName="tyk-kafka"; + kafkaDeploymentPath="src/deployments/kafka"; + + source "$kafkaDeploymentPath/checks.sh"; + source "$kafkaDeploymentPath/main.sh"; +fi diff --git a/src/deployments/kafka/main.sh b/src/deployments/kafka/main.sh new file mode 100644 index 00000000..96bb9e6a --- /dev/null +++ b/src/deployments/kafka/main.sh @@ -0,0 +1,15 @@ +logger "$INFO" "installing $kafkaReleaseName in $namespace namespace..."; + +setVerbose; +helm upgrade "$kafkaReleaseName" bitnami/kafka --version 30.1.8 \ + --install \ + --namespace "$namespace" \ + --set "service.ports.client=$KAFKA_SERVICE_PORT" \ + --set "listeners.client.protocol=PLAINTEXT" \ + --set "controller.replicaCount=3" \ + --set "provisioning.topics[0]=test" \ + --set "provisioning.topics[0]=avro" \ + "${helmFlags[@]}" > /dev/null; +unsetVerbose; + +addService "$kafkaReleaseName"; diff --git a/src/deployments/opa/main.sh b/src/deployments/opa/main.sh index 64eb3ae7..84244a8b 100644 --- a/src/deployments/opa/main.sh +++ b/src/deployments/opa/main.sh @@ -11,12 +11,9 @@ if [[ $LOGLEVEL == $DEBUG ]]; then fi args+=( \ - --set "tyk-dashboard.dashboard.extraEnvs[$dashExtraEnvsCtr].name=TYK_DB_SECURITY_OPENPOLICY_ENABLED" \ - --set-string "tyk-dashboard.dashboard.extraEnvs[$dashExtraEnvsCtr].value=true" \ - --set "tyk-dashboard.dashboard.extraEnvs[$((dashExtraEnvsCtr + 1))].name=TYK_DB_SECURITY_OPENPOLICY_ENABLEAPI" \ - --set-string "tyk-dashboard.dashboard.extraEnvs[$((dashExtraEnvsCtr + 1))].value=true" \ - --set "tyk-dashboard.dashboard.extraEnvs[$((dashExtraEnvsCtr + 2))].name=TYK_DB_SECURITY_OPENPOLICY_DEBUG" \ - --set-string "tyk-dashboard.dashboard.extraEnvs[$((dashExtraEnvsCtr + 2))].value=$debug" \ + --set "tyk-dashboard.dashboard.opa.enabled=true" \ + --set "tyk-dashboard.dashboard.opa.api=true" \ + --set "tyk-dashboard.dashboard.opa.debug=$debug" \ --set "tyk-dashboard.dashboard.extraVolumes[$dashExtraVolumesCtr].name=opa-rules" \ --set "tyk-dashboard.dashboard.extraVolumes[$dashExtraVolumesCtr].configMap.name=opa-rules" \ --set "tyk-dashboard.dashboard.extraVolumeMounts[$dashExtraVolumeMountsCtr].name=opa-rules" \ @@ -24,7 +21,6 @@ args+=( \ --set "tyk-dashboard.dashboard.extraVolumeMounts[$dashExtraVolumeMountsCtr].subPath=dashboard.rego" \ ); -dashExtraEnvsCtr=$((dashExtraEnvsCtr + 3)); dashExtraVolumesCtr=$((dashExtraVolumesCtr + 1)); dashExtraVolumeMountsCtr=$((dashExtraVolumeMountsCtr + 1)); diff --git a/src/deployments/opentelemetry/main.safe.sh b/src/deployments/opentelemetry/main.safe.sh index cf965ea7..058666f6 100644 --- a/src/deployments/opentelemetry/main.safe.sh +++ b/src/deployments/opentelemetry/main.safe.sh @@ -1,7 +1,7 @@ if [ -z "$opentelemetryRegistered" ]; then opentelemetryRegistered=true; - opentelemetrReleaseName="tyk-opentelemetry"; + opentelemetryReleaseName="tyk-opentelemetry"; opentelemetryDeploymentPath="src/deployments/opentelemetry"; source "src/deployments/cert-manager/main.safe.sh"; diff --git a/src/deployments/opentelemetry/main.sh b/src/deployments/opentelemetry/main.sh index 4818c852..04a63347 100644 --- a/src/deployments/opentelemetry/main.sh +++ b/src/deployments/opentelemetry/main.sh @@ -1,7 +1,7 @@ -logger "$INFO" "installing $opentelemetrReleaseName in $namespace namespace..."; +logger "$INFO" "installing $opentelemetryReleaseName in $namespace namespace..."; setVerbose; -helm upgrade tyk-otel-collector opentelemetry/opentelemetry-collector --version 0.108.1 \ +helm upgrade "$opentelemetryReleaseName" opentelemetry/opentelemetry-collector --version 0.108.1 \ --install \ --set "mode=deployment" \ --set "image.repository=otel/opentelemetry-collector-contrib" \ @@ -24,12 +24,14 @@ helm upgrade tyk-otel-collector opentelemetry/opentelemetry-collector --version "${helmFlags[@]}" > /dev/null; unsetVerbose; -args=(--set-string "tyk-gateway.gateway.extraEnvs[$gatewayExtraEnvsCtr].name=TYK_GW_OPENTELEMETRY_ENABLED" \ +args=( + --set-string "tyk-gateway.gateway.extraEnvs[$gatewayExtraEnvsCtr].name=TYK_GW_OPENTELEMETRY_ENABLED" \ --set-string "tyk-gateway.gateway.extraEnvs[$gatewayExtraEnvsCtr].value=true" \ --set-string "tyk-gateway.gateway.extraEnvs[$(($gatewayExtraEnvsCtr + 1))].name=TYK_GW_OPENTELEMETRY_EXPORTER" \ --set-string "tyk-gateway.gateway.extraEnvs[$(($gatewayExtraEnvsCtr + 1))].value=grpc" \ --set-string "tyk-gateway.gateway.extraEnvs[$(($gatewayExtraEnvsCtr + 2))].name=TYK_GW_OPENTELEMETRY_ENDPOINT" \ - --set-string "tyk-gateway.gateway.extraEnvs[$(($gatewayExtraEnvsCtr + 2))].value=tyk-otel-collector-opentelemetry-collector:4317"); + --set-string "tyk-gateway.gateway.extraEnvs[$(($gatewayExtraEnvsCtr + 2))].value=$opentelemetryReleaseName-opentelemetry-collector:4318" \ +); gatewayExtraEnvsCtr=$((gatewayExtraEnvsCtr + 3)); addDeploymentArgs "${args[@]}"; diff --git a/src/deployments/operator-federation/comments-subgraph-app.yaml b/src/deployments/operator-federation/comments-subgraph-app.yaml index ee619b5a..f9dd48f8 100644 --- a/src/deployments/operator-federation/comments-subgraph-app.yaml +++ b/src/deployments/operator-federation/comments-subgraph-app.yaml @@ -28,7 +28,7 @@ spec: app: comments-subgraph spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: comments-subgraph command: diff --git a/src/deployments/operator-federation/notifications-subgraph-app.yaml b/src/deployments/operator-federation/notifications-subgraph-app.yaml index 542ead8e..593fa30d 100644 --- a/src/deployments/operator-federation/notifications-subgraph-app.yaml +++ b/src/deployments/operator-federation/notifications-subgraph-app.yaml @@ -28,7 +28,7 @@ spec: app: notifications-subgraph spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: notifications-subgraph command: diff --git a/src/deployments/operator-federation/posts-subgraph-app.yaml b/src/deployments/operator-federation/posts-subgraph-app.yaml index 5959c0ad..e47d0527 100644 --- a/src/deployments/operator-federation/posts-subgraph-app.yaml +++ b/src/deployments/operator-federation/posts-subgraph-app.yaml @@ -28,7 +28,7 @@ spec: app: posts-subgraph spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: posts-subgraph command: diff --git a/src/deployments/operator-federation/users-subgraph-app.yaml b/src/deployments/operator-federation/users-subgraph-app.yaml index a56909b5..4693e092 100644 --- a/src/deployments/operator-federation/users-subgraph-app.yaml +++ b/src/deployments/operator-federation/users-subgraph-app.yaml @@ -28,7 +28,7 @@ spec: app: users-subgraph spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: users-subgraph command: diff --git a/src/deployments/operator-graphql/comments-graph-app.yaml b/src/deployments/operator-graphql/comments-graph-app.yaml index 27f2c4d8..bd8e4055 100644 --- a/src/deployments/operator-graphql/comments-graph-app.yaml +++ b/src/deployments/operator-graphql/comments-graph-app.yaml @@ -28,7 +28,7 @@ spec: app: comments-graph spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: comments-graph command: @@ -38,3 +38,5 @@ spec: env: - name: PORT value: "4103" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: "tyk-opentelemetry-opentelemetry-collector:4317" diff --git a/src/deployments/operator-graphql/notifications-graph-app.yaml b/src/deployments/operator-graphql/notifications-graph-app.yaml index 711ceeda..24f81e0e 100644 --- a/src/deployments/operator-graphql/notifications-graph-app.yaml +++ b/src/deployments/operator-graphql/notifications-graph-app.yaml @@ -28,7 +28,7 @@ spec: app: notifications-graph spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: notifications-graph command: @@ -38,3 +38,5 @@ spec: env: - name: PORT value: "4104" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: "tyk-opentelemetry-opentelemetry-collector:4317" diff --git a/src/deployments/operator-graphql/posts-graph-app.yaml b/src/deployments/operator-graphql/posts-graph-app.yaml index 7a330682..cbf8ca27 100644 --- a/src/deployments/operator-graphql/posts-graph-app.yaml +++ b/src/deployments/operator-graphql/posts-graph-app.yaml @@ -28,7 +28,7 @@ spec: app: posts-graph spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: posts-graph command: @@ -38,3 +38,5 @@ spec: env: - name: PORT value: "4102" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: "tyk-opentelemetry-opentelemetry-collector:4317" diff --git a/src/deployments/operator-graphql/users-graph-app.yaml b/src/deployments/operator-graphql/users-graph-app.yaml index 0a90273b..c0206514 100644 --- a/src/deployments/operator-graphql/users-graph-app.yaml +++ b/src/deployments/operator-graphql/users-graph-app.yaml @@ -28,7 +28,7 @@ spec: app: users-graph spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: users-graph command: @@ -38,3 +38,5 @@ spec: env: - name: PORT value: "4101" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: "tyk-opentelemetry-opentelemetry-collector:4317" diff --git a/src/deployments/operator-httpbin/README.md b/src/deployments/operator-httpbin/README.md index a30c6304..8a636c64 100644 --- a/src/deployments/operator-httpbin/README.md +++ b/src/deployments/operator-httpbin/README.md @@ -1,4 +1,4 @@ -## Tyk Operator HTTP Example +## Tyk Operator HTTPBin Example Deploys the Tyke Operator [Tyk Operator](https://github.com/TykTechnologies/tyk-operator) and its dependency [cert-manager](https://github.com/jetstack/cert-manager). This will also stand up a Federation v1 API example using the tyk-operator. diff --git a/src/deployments/operator-httpbin/main.safe.sh b/src/deployments/operator-httpbin/main.safe.sh index b8e844dd..7a06cd91 100644 --- a/src/deployments/operator-httpbin/main.safe.sh +++ b/src/deployments/operator-httpbin/main.safe.sh @@ -1,10 +1,9 @@ - if [ -z "$operatorHTTPBinRegistered" ]; then operatorHTTPBinRegistered=true; - operatorHTTPDeploymentPath="src/deployments/operator-httpbin"; + operatorHTTPBinDeploymentPath="src/deployments/operator-httpbin"; source "src/deployments/operator/main.safe.sh"; - source "$operatorHTTPDeploymentPath/openshift.sh"; - source "$operatorHTTPDeploymentPath/main.sh"; + source "$operatorHTTPBinDeploymentPath/openshift.sh"; + source "$operatorHTTPBinDeploymentPath/main.sh"; fi diff --git a/src/deployments/operator-httpbin/main.sh b/src/deployments/operator-httpbin/main.sh index c3a9e462..fd9cd76c 100644 --- a/src/deployments/operator-httpbin/main.sh +++ b/src/deployments/operator-httpbin/main.sh @@ -3,15 +3,15 @@ logger "$INFO" "creating Tyk Operator httpbin example..."; addService "httpbin-svc"; setVerbose; -kubectl apply -f "$operatorHTTPDeploymentPath/httpbin-svc.yaml" -n "$namespace" > /dev/null; +kubectl apply -f "$operatorHTTPBinDeploymentPath/httpbin-svc.yaml" -n "$namespace" > /dev/null; kubectl wait pods -n "$namespace" -l app=httpbin --for condition=Ready --timeout="$TYK_TIMEOUT" > /dev/null; -sed "s/replace_service_url/httpbin-svc.$namespace.svc:8000/g" "$operatorHTTPDeploymentPath/api-template-classic.yaml" | \ +sed "s/replace_service_url/httpbin-svc.$namespace.svc:8000/g" "$operatorHTTPBinDeploymentPath/api-template-classic.yaml" | \ sed "s/replace_namespace/$namespace/g" | \ sed "s/replace_protocol/$protocol/g" | \ kubectl apply -n "$namespace" -f - > /dev/null; -sed "s/replace_service_url/httpbin-svc.$namespace.svc:8000/g" "$operatorHTTPDeploymentPath/api-template.yaml" | \ +sed "s/replace_service_url/httpbin-svc.$namespace.svc:8000/g" "$operatorHTTPBinDeploymentPath/api-template.yaml" | \ sed "s/replace_namespace/$namespace/g" | \ sed "s/replace_protocol/$protocol/g" | \ kubectl apply -n "$namespace" -f - > /dev/null; diff --git a/src/deployments/operator-kafka-avro/README.md b/src/deployments/operator-kafka-avro/README.md new file mode 100644 index 00000000..ef66024d --- /dev/null +++ b/src/deployments/operator-kafka-avro/README.md @@ -0,0 +1,47 @@ +## Tyk Operator Kafka Example +Deploys the Tyke Operator [Tyk Operator](https://github.com/TykTechnologies/tyk-operator) and its dependency +[cert-manager](https://github.com/jetstack/cert-manager). This will also stand up a Kafka AVRO to JSON API +example using the tyk-operator. + +The following API definitions will be created with this deployment: +- avro-to-json + +### Minikube +To run on `minikube` you must enable ingress addons + +``` +minikube start +minikube addons enable ingress +``` + +### Example +``` +./up.sh --deployments operator-kafka-avro tyk-stack +``` + +To consume topic: +``` +curl http://localhost:8080/avro-to-json/consume +``` + +### Support +| Item | Status | +|:------------:|:------------------:| +| OpenShift | :warning: | +| CI Tests | :white_check_mark: | +| Postman Test | :white_check_mark: | +| SSL | N/A | + +### Supported Service Types with `--expose` flag +| Item | Status | +|:-------------:|:------:| +| Port Forward | N/A | +| Ingress | N/A | +| Load Balancer | N/A | + +| Icon | Description | +|:------------------:|:-------------------------:| +| :white_check_mark: | Supported and tested | +| :warning: | Not tested | +| :x: | Not supported | +| :no_entry: | Not supported by the tool | diff --git a/src/deployments/operator-kafka-avro/api-template.yaml b/src/deployments/operator-kafka-avro/api-template.yaml new file mode 100644 index 00000000..7f4d8eb4 --- /dev/null +++ b/src/deployments/operator-kafka-avro/api-template.yaml @@ -0,0 +1,106 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: avro-to-json + namespace: replace_namespace +data: + avro-to-json.json: |- + { + "info": { + "title": "avro-to-json", + "version": "1.0.0" + }, + "openapi": "3.0.3", + "servers": [ + { + "url": "http://tyk-gw.local/avro-to-json/" + } + ], + "x-tyk-streaming": { + "streams": { + "consumer": { + "input": { + "kafka": { + "addresses": [ + "replace_svc_name:replace_svc_port" + ], + "client_id": "tyk", + "consumer_group": "avro", + "topics": [ + "avro" + ] + } + }, + "output": { + "http_server": { + "stream_path": "/consume/stream", + "ws_path": "/consume/ws" + } + }, + "pipeline": { + "processors": [ + { + "avro": { + "operator": "to_json", + "encoding": "binary", + "schema": "{\"type\": \"record\",\"name\": \"Notification\",\"fields\":[{\"name\":\"type\",\"type\":{\"type\":\"enum\",\"name\":\"type\",\"symbols\":[\"LIKE\",\"SHARE\",\"COMMENT\"]}},{\"name\":\"msg\",\"type\":\"string\"}]}" + } + } + ] + } + } + } + }, + "security": [], + "paths": {}, + "components": { + "securitySchemes": {} + }, + "x-tyk-api-gateway": { + "info": { + "dbId": "6748c9495f2a990001ca0216", + "id": "dHlrL2F2cm8tdG8tanNvbg", + "orgId": "6748c9155f2a990001ca0214", + "name": "avro-to-json", + "state": { + "active": true, + "internal": false + } + }, + "middleware": { + "global": { + "trafficLogs": { + "enabled": true + } + } + }, + "server": { + "detailedActivityLogs": { + "enabled": true + }, + "detailedTracing": { + "enabled": true + }, + "listenPath": { + "strip": true, + "value": "/avro-to-json/" + } + }, + "upstream": { + "url": "http://httpbin.org/" + } + } + } +--- +apiVersion: tyk.tyk.io/v1alpha1 +kind: TykStreamsApiDefinition +metadata: + name: avro-to-json + namespace: replace_namespace +spec: + tykStreams: + configmapRef: + name: avro-to-json + namespace: replace_namespace + keyName: avro-to-json.json diff --git a/src/deployments/operator-kafka-avro/kafka-producer-app.yaml b/src/deployments/operator-kafka-avro/kafka-producer-app.yaml new file mode 100644 index 00000000..09f3a4b4 --- /dev/null +++ b/src/deployments/operator-kafka-avro/kafka-producer-app.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: notifications-kafka-producer +spec: + replicas: 1 + selector: + matchLabels: + app: notifications-kafka-producer + template: + metadata: + labels: + app: notifications-kafka-producer + spec: + containers: + - image: zalbiraw/go-api-test-service:v3.4 + imagePullPolicy: IfNotPresent + name: notifications-kafka-producer + command: + - ./services/kafka/notifications/producer + env: + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: "tyk-opentelemetry-opentelemetry-collector:4317" + - name: KAFKA_BROKER_URL + value: "replace_svc_name:replace_svc_port" + - name: KAFKA_TOPIC + value: "replace_topic" + - name: PRODUCE_INTERVAL + value: "5s" diff --git a/src/deployments/operator-kafka-avro/main.safe.sh b/src/deployments/operator-kafka-avro/main.safe.sh new file mode 100644 index 00000000..4ecf4840 --- /dev/null +++ b/src/deployments/operator-kafka-avro/main.safe.sh @@ -0,0 +1,9 @@ +if [ -z "$operatorKafkaAvroRegistered" ]; then + operatorKafkaAvroRegistered=true; + + operatorKafkaAvroDeploymentPath="src/deployments/operator-kafka-avro"; + + source "src/deployments/kafka/main.safe.sh"; + source "src/deployments/operator/main.safe.sh"; + source "$operatorKafkaAvroDeploymentPath/main.sh"; +fi diff --git a/src/deployments/operator-kafka-avro/main.sh b/src/deployments/operator-kafka-avro/main.sh new file mode 100644 index 00000000..f11e3509 --- /dev/null +++ b/src/deployments/operator-kafka-avro/main.sh @@ -0,0 +1,15 @@ +logger "$INFO" "creating Tyk Operator Kafka Avro to JSON example..."; + +setVerbose; +sed "s/replace_namespace/$namespace/g" "$operatorKafkaAvroDeploymentPath/kafka-producer-app.yaml" | \ + sed "s/replace_svc_name/$kafkaReleaseName.$namespace.svc/g" | \ + sed "s/replace_svc_port/$KAFKA_SERVICE_PORT/g" | \ + sed "s/replace_topic/avro/g" | \ + kubectl apply -n "$namespace" -f - > /dev/null; + +sed "s/replace_namespace/$namespace/g" "$operatorKafkaAvroDeploymentPath/api-template.yaml" | \ + sed "s/replace_svc_name/$kafkaReleaseName.$namespace.svc/g" | \ + sed "s/replace_svc_port/$KAFKA_SERVICE_PORT/g" | \ + sed "s/replace_topic/avro/g" | \ + kubectl apply -n "$namespace" -f - > /dev/null; +unsetVerbose; diff --git a/src/deployments/operator-kafka/README.md b/src/deployments/operator-kafka/README.md new file mode 100644 index 00000000..0a34d18a --- /dev/null +++ b/src/deployments/operator-kafka/README.md @@ -0,0 +1,52 @@ +## Tyk Operator Kafka Example +Deploys the Tyke Operator [Tyk Operator](https://github.com/TykTechnologies/tyk-operator) and its dependency +[cert-manager](https://github.com/jetstack/cert-manager). This will also stand up a HTTP to Kafka API +example using the tyk-operator. + +The following API definitions will be created with this deployment: +- http-to-kafka + +### Minikube +To run on `minikube` you must enable ingress addons + +``` +minikube start +minikube addons enable ingress +``` + +### Example +``` +./up.sh --deployments operator-kafka tyk-stack +``` + +To consume: +``` +curl http://localhost:8080/http-to-kafka/consume +``` + +To produce: +``` +curl -X POST http://localhost:8080/http-to-kafka/produce -d 'Hello, Tyk!' +``` + +### Support +| Item | Status | +|:------------:|:------------------:| +| OpenShift | :warning: | +| CI Tests | :white_check_mark: | +| Postman Test | :white_check_mark: | +| SSL | N/A | + +### Supported Service Types with `--expose` flag +| Item | Status | +|:-------------:|:------:| +| Port Forward | N/A | +| Ingress | N/A | +| Load Balancer | N/A | + +| Icon | Description | +|:------------------:|:-------------------------:| +| :white_check_mark: | Supported and tested | +| :warning: | Not tested | +| :x: | Not supported | +| :no_entry: | Not supported by the tool | diff --git a/src/deployments/operator-kafka/api-template.yaml b/src/deployments/operator-kafka/api-template.yaml new file mode 100644 index 00000000..27ebcf79 --- /dev/null +++ b/src/deployments/operator-kafka/api-template.yaml @@ -0,0 +1,101 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: http-to-kafka + namespace: replace_namespace +data: + http-to-kafka.json: |- + { + "openapi": "3.0.3", + "info": { + "title": "http-to-kafka", + "version": "1.0.0" + }, + "security": [], + "paths": {}, + "components": { + "securitySchemes": {} + }, + "x-tyk-streaming": { + "streams": { + "consumer": { + "input": { + "kafka": { + "addresses": [ + "replace_svc_name:replace_svc_port" + ], + "consumer_group": "test", + "client_id": "tyk", + "topics": [ + "test" + ] + } + }, + "output": { + "http_server": { + "stream_path": "/consume/stream", + "ws_path": "/consume/ws" + } + } + }, + "producer": { + "input": { + "http_server": { + "path": "/produce" + } + }, + "output": { + "kafka": { + "addresses": [ + "replace_svc_name:replace_svc_port" + ], + "topic": "test" + } + } + } + } + }, + "x-tyk-api-gateway": { + "info": { + "name": "http-to-kafka", + "state": { + "active": true + } + }, + "middleware": { + "global": { + "trafficLogs": { + "enabled": true + } + } + }, + "server": { + "detailedActivityLogs": { + "enabled": true + }, + "detailedTracing": { + "enabled": true + }, + "listenPath": { + "strip": true, + "value": "/http-to-kafka/" + } + }, + "upstream": { + "url": "http://httpbin.org/" + } + } + } +--- +apiVersion: tyk.tyk.io/v1alpha1 +kind: TykStreamsApiDefinition +metadata: + name: http-to-kafka + namespace: replace_namespace +spec: + tykStreams: + configmapRef: + name: http-to-kafka + namespace: replace_namespace + keyName: http-to-kafka.json diff --git a/src/deployments/operator-kafka/main.safe.sh b/src/deployments/operator-kafka/main.safe.sh new file mode 100644 index 00000000..40f844b5 --- /dev/null +++ b/src/deployments/operator-kafka/main.safe.sh @@ -0,0 +1,9 @@ +if [ -z "$operatorKafkaRegistered" ]; then + operatorKafkaRegistered=true; + + operatorKafkaDeploymentPath="src/deployments/operator-kafka"; + + source "src/deployments/kafka/main.safe.sh"; + source "src/deployments/operator/main.safe.sh"; + source "$operatorKafkaDeploymentPath/main.sh"; +fi diff --git a/src/deployments/operator-kafka/main.sh b/src/deployments/operator-kafka/main.sh new file mode 100644 index 00000000..b6e4adb1 --- /dev/null +++ b/src/deployments/operator-kafka/main.sh @@ -0,0 +1,8 @@ +logger "$INFO" "creating Tyk Operator Kafka example..."; + +setVerbose; +sed "s/replace_namespace/$namespace/g" "$operatorKafkaDeploymentPath/api-template.yaml" | \ + sed "s/replace_svc_name/$kafkaReleaseName.$namespace.svc/g" | \ + sed "s/replace_svc_port/$KAFKA_SERVICE_PORT/g" | \ + kubectl apply -n "$namespace" -f - > /dev/null; +unsetVerbose; diff --git a/src/deployments/operator-udg/comments-rest-app.yaml b/src/deployments/operator-udg/comments-rest-app.yaml index 5ac7fe29..11358f9e 100644 --- a/src/deployments/operator-udg/comments-rest-app.yaml +++ b/src/deployments/operator-udg/comments-rest-app.yaml @@ -28,7 +28,7 @@ spec: app: comments-rest spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: comments-rest command: diff --git a/src/deployments/operator-udg/posts-rest-app.yaml b/src/deployments/operator-udg/posts-rest-app.yaml index 98e8c0c4..37a629a2 100644 --- a/src/deployments/operator-udg/posts-rest-app.yaml +++ b/src/deployments/operator-udg/posts-rest-app.yaml @@ -28,7 +28,7 @@ spec: app: posts-rest spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: posts-rest command: diff --git a/src/deployments/operator-udg/users-rest-app.yaml b/src/deployments/operator-udg/users-rest-app.yaml index a6ae259d..93882793 100644 --- a/src/deployments/operator-udg/users-rest-app.yaml +++ b/src/deployments/operator-udg/users-rest-app.yaml @@ -28,7 +28,7 @@ spec: app: users-rest spec: containers: - - image: zalbiraw/go-api-test-service:v3.0 + - image: zalbiraw/go-api-test-service:v3.4 imagePullPolicy: IfNotPresent name: users-rest command: diff --git a/src/deployments/operator/main.sh b/src/deployments/operator/main.sh index 7ff61b38..918f6f62 100644 --- a/src/deployments/operator/main.sh +++ b/src/deployments/operator/main.sh @@ -1,7 +1,7 @@ logger "$INFO" "installing tyk-operator in $namespace namespace..."; setVerbose; -helm upgrade "$operatorReleaseName" tyk-helm/tyk-operator --version 1.0.0 \ +helm upgrade "$operatorReleaseName" tyk-helm/tyk-operator --version 1.1.0 \ --install \ --namespace "$namespace" \ "${operatorSecurityContextArgs[@]}" \ diff --git a/src/helpers/up/check-vars.sh b/src/helpers/up/check-vars.sh index 1614381d..2e66b5a3 100644 --- a/src/helpers/up/check-vars.sh +++ b/src/helpers/up/check-vars.sh @@ -35,20 +35,20 @@ fi if [[ $TYKDP == "$mode" ]]; then chart="tyk-data-plane"; - if [[ -z "$TYK_WORKER_CONNECTIONSTRING" ]]; then - logger "$ERROR" "please make sure TYK_WORKER_CONNECTIONSTRING variable is set in your .env file"; + if [[ -z "$TYK_DATA_PLANE_CONNECTIONSTRING" ]]; then + logger "$ERROR" "please make sure TYK_DATA_PLANE_CONNECTIONSTRING variable is set in your .env file"; invalid=true; fi - if [[ -z "$TYK_WORKER_ORGID" ]]; then - logger "$ERROR" "please make sure TYK_WORKER_ORGID variable is set in your .env file"; + if [[ -z "$TYK_DATA_PLANE_ORGID" ]]; then + logger "$ERROR" "please make sure TYK_DATA_PLANE_ORGID variable is set in your .env file"; invalid=true; fi - if [[ -z "$TYK_WORKER_AUTHTOKEN" ]]; then - logger "$ERROR" "please make sure TYK_WORKER_AUTHTOKEN variable is set in your .env file"; + if [[ -z "$TYK_DATA_PLANE_AUTHTOKEN" ]]; then + logger "$ERROR" "please make sure TYK_DATA_PLANE_AUTHTOKEN variable is set in your .env file"; invalid=true; fi - if [[ -z "$TYK_WORKER_SHARDING_ENABLED" ]]; then - logger "$ERROR" "please make sure TYK_WORKER_SHARDING_ENABLED variable is set in your .env file"; + if [[ -z "$TYK_DATA_PLANE_SHARDING_ENABLED" ]]; then + logger "$ERROR" "please make sure TYK_DATA_PLANE_SHARDING_ENABLED variable is set in your .env file"; invalid=true; fi fi diff --git a/src/main/ssl/main.sh b/src/main/ssl/main.sh index b52af30a..6d76c57d 100644 --- a/src/main/ssl/main.sh +++ b/src/main/ssl/main.sh @@ -26,7 +26,8 @@ kubectl create secret generic "$selfSignedCertsSecretName" \ --dry-run=client -o=yaml | \ kubectl apply --namespace "$namespace" -f - > /dev/null; -args=(--set "tyk-bootstrap.bootstrap.dashboard.sslInsecureSkipVerify=true" \ +args=( + --set "tyk-bootstrap.bootstrap.sslInsecureSkipVerify=true" \ --set "global.tls.dashboard=true" \ --set "tyk-dashboard.dashboard.tls.secretName=$certsSecretName" \ diff --git a/src/main/tyk-cp.sh b/src/main/tyk-cp.sh index 1ccba3e2..e7ba939d 100644 --- a/src/main/tyk-cp.sh +++ b/src/main/tyk-cp.sh @@ -1,13 +1,14 @@ source src/main/storage/main.sh; tykReleaseName="tyk-cp"; -tykReleaseVersion="2.1.0"; +tykReleaseVersion="2.2.0"; args=( --set "global.license.dashboard=$LICENSE" \ --set "global.license.operator=$OPERATOR_LICENSE" \ --set "global.adminUser.email=$TYK_USERNAME" \ --set "global.adminUser.password=$TYK_PASSWORD" \ + --set "tyk-gateway.gateway.image.repository=tykio/tyk-gateway-ee" \ --set "tyk-gateway.gateway.image.tag=$GATEWAY_VERSION" \ --set "tyk-gateway.gateway.service.port=8080" \ --set "tyk-dashboard.dashboard.image.tag=$DASHBOARD_VERSION" \ @@ -46,4 +47,4 @@ addSummary "\tTyk Control Plane deployed\n \ \tMDCB connection string: $ip:$port\n \ \tOrganisation ID: $orgID\n\n \ You can deploy a worker gateway and connect it to this Control Plane by running the following command:\n\n \ -TYK_WORKER_CONNECTIONSTRING=$ip:$port TYK_WORKER_ORGID=$orgID TYK_WORKER_AUTHTOKEN=$authToken TYK_WORKER_USESSL=false ./up.sh --namespace tyk-dp$exposeWorker tyk-dp"; +TYK_DATA_PLANE_CONNECTIONSTRING=$ip:$port TYK_DATA_PLANE_ORGID=$orgID TYK_DATA_PLANE_AUTHTOKEN=$authToken TYK_DATA_PLANE_USESSL=false ./up.sh --namespace tyk-dp$exposeWorker tyk-dp"; diff --git a/src/main/tyk-dp.sh b/src/main/tyk-dp.sh index 6fb11ac3..e390b8f0 100644 --- a/src/main/tyk-dp.sh +++ b/src/main/tyk-dp.sh @@ -1,26 +1,27 @@ -if [ -z "$TYK_WORKER_GROUPID" ]; then - TYK_WORKER_GROUPID=$(echo "$(kubectl config current-context | base64)/$namespace"); +if [ -z "$TYK_DATA_PLANE_GROUPID" ]; then + TYK_DATA_PLANE_GROUPID=$(echo "$(kubectl config current-context | base64)/$namespace"); fi args=( - --set "global.remoteControlPlane.connectionString=$TYK_WORKER_CONNECTIONSTRING" \ - --set "global.remoteControlPlane.orgId=$TYK_WORKER_ORGID" \ - --set "global.remoteControlPlane.userApiKey=$TYK_WORKER_AUTHTOKEN" \ - --set "global.remoteControlPlane.useSSL=$TYK_WORKER_USESSL" \ - --set "global.remoteControlPlane.groupID=$TYK_WORKER_GROUPID" \ - --set "global.servicePorts.gateway=$TYK_WORKER_GW_PORT" \ + --set "global.remoteControlPlane.connectionString=$TYK_DATA_PLANE_CONNECTIONSTRING" \ + --set "global.remoteControlPlane.orgId=$TYK_DATA_PLANE_ORGID" \ + --set "global.remoteControlPlane.userApiKey=$TYK_DATA_PLANE_AUTHTOKEN" \ + --set "global.remoteControlPlane.useSSL=$TYK_DATA_PLANE_USESSL" \ + --set "global.remoteControlPlane.groupID=$TYK_DATA_PLANE_GROUPID" \ + --set "global.servicePorts.gateway=$TYK_DATA_PLANE_PORT" \ + --set "tyk-gateway.gateway.image.repository=tykio/tyk-gateway-ee" \ --set "tyk-gateway.gateway.image.tag=$GATEWAY_VERSION" \ - --set "tyk-gateway.gateway.sharding.enabled=$TYK_WORKER_SHARDING_ENABLED" \ - --set "tyk-gateway.gateway.sharding.tags=$TYK_WORKER_SHARDING_TAGS" \ + --set "tyk-gateway.gateway.sharding.enabled=$TYK_DATA_PLANE_SHARDING_ENABLED" \ + --set "tyk-gateway.gateway.sharding.tags=$TYK_DATA_PLANE_SHARDING_TAGS" \ ); -if [ -z "$TYK_WORKER_SHARDING_TAGS" ]; then +if [ -z "$TYK_DATA_PLANE_SHARDING_TAGS" ]; then tykReleaseName="tyk-dp"; else - tykReleaseName="tyk-dp-$TYK_WORKER_SHARDING_TAGS"; + tykReleaseName="tyk-dp-$TYK_DATA_PLANE_SHARDING_TAGS"; fi -tykReleaseVersion="2.1.0"; +tykReleaseVersion="2.2.0"; logger "$DEBUG" "tykReleaseName=$tykReleaseName"; @@ -35,17 +36,17 @@ addDeploymentArgs "${loadbalancerArgs[@]}"; addDeploymentArgs "${ingressArgs[@]}"; upgradeTyk; -if [[ -n "$TYK_WORKER_OPERATOR_CONNECTIONSTRING" ]]; then +if [[ -n "$TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING" ]]; then logger "$INFO" "creating tyk-operator secret..."; kubectl create secret generic tyk-operator-conf \ --from-literal="TYK_MODE=pro" \ --from-literal="TYK_OPERATOR_LICENSEKEY=$OPERATOR_LICENSE" \ - --from-literal="TYK_URL=$TYK_WORKER_OPERATOR_CONNECTIONSTRING" \ - --from-literal="TYK_AUTH=$TYK_WORKER_AUTHTOKEN" \ - --from-literal="TYK_ORG=$TYK_WORKER_ORGID" \ + --from-literal="TYK_URL=$TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING" \ + --from-literal="TYK_AUTH=$TYK_DATA_PLANE_AUTHTOKEN" \ + --from-literal="TYK_ORG=$TYK_DATA_PLANE_ORGID" \ --dry-run=client -o=yaml | \ kubectl apply --namespace "$namespace" -f - > /dev/null; fi addSummary "\tTyk Worker Gateway deployed\n -\tMDCB Connection: $TYK_WORKER_CONNECTIONSTRING"; +\tMDCB Connection: $TYK_DATA_PLANE_CONNECTIONSTRING"; diff --git a/src/main/tyk-gateway.sh b/src/main/tyk-gateway.sh index 405f66f9..55692120 100644 --- a/src/main/tyk-gateway.sh +++ b/src/main/tyk-gateway.sh @@ -5,7 +5,7 @@ args=(--set "tyk-gateway.gateway.image.repository=tykio/tyk-gateway" \ --set "tyk-pump.pump.image.repository=tykio/tyk-pump-docker-pub"); tykReleaseName="tyk-oss"; -tykReleaseVersion="2.1.0"; +tykReleaseVersion="2.2.0"; addService "gateway-svc-$tykReleaseName-tyk-gateway"; checkTykRelease; diff --git a/src/main/tyk-stack.sh b/src/main/tyk-stack.sh index 199099ae..75d6cc8a 100644 --- a/src/main/tyk-stack.sh +++ b/src/main/tyk-stack.sh @@ -1,13 +1,14 @@ source src/main/storage/main.sh; tykReleaseName="tyk-stack"; -tykReleaseVersion="2.1.0"; +tykReleaseVersion="2.2.0"; args=( --set "global.license.dashboard=$LICENSE" \ --set "global.license.operator=$OPERATOR_LICENSE" \ --set "global.adminUser.email=$TYK_USERNAME" \ --set "global.adminUser.password=$TYK_PASSWORD" \ + --set "tyk-gateway.gateway.image.repository=tykio/tyk-gateway-ee" \ --set "tyk-gateway.gateway.image.tag=$GATEWAY_VERSION" \ --set "tyk-gateway.gateway.service.port=8080" \ --set "tyk-dashboard.dashboard.image.tag=$DASHBOARD_VERSION" \ diff --git a/tyk-k8s-demo.postman_collection.json b/tyk-k8s-demo.postman_collection.json index bb163978..7e6943c4 100644 --- a/tyk-k8s-demo.postman_collection.json +++ b/tyk-k8s-demo.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "685ff936-782b-4941-be66-7312e2eae6f6", + "_postman_id": "01ceae7c-e40d-46b6-a1ee-4c2be07a912e", "name": "tyk-k8s-demo", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "13702323" @@ -203,6 +203,10 @@ "name": "k6-slo-traffic", "item": [] }, + { + "name": "kafka", + "item": [] + }, { "name": "keycloak", "item": [ @@ -837,6 +841,111 @@ } ] }, + { + "name": "operator-kafka", + "item": [ + { + "name": "anything", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"API is loaded\", function () {", + " var health = pm.response.json();", + " pm.expect(health.data).to.eql(\"HelloWorld\");", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "HelloWorld", + "options": { + "raw": { + "language": "text" + } + } + }, + "url": { + "raw": "http://localhost:{{gateway.port}}/http-to-kafka/anything", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "{{gateway.port}}", + "path": [ + "http-to-kafka", + "anything" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "operator-kafka-avro", + "item": [ + { + "name": "anything", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"API is loaded\", function () {", + " var health = pm.response.json();", + " pm.expect(health.data).to.eql(\"HelloWorld\");", + "});" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "packages": {}, + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "HelloWorld", + "options": { + "raw": { + "language": "text" + } + } + }, + "url": { + "raw": "http://localhost:{{gateway.port}}/avro-to-json/anything", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "{{gateway.port}}", + "path": [ + "avro-to-json", + "anything" + ] + } + }, + "response": [] + } + ] + }, { "name": "operator-jwt-hmac", "item": [